why doesn't this modification to XML receipt work?


K

kskinne

how can i modify the fullpage.xml file so that if the sale is charged to the
customer's store account, the title of the receipt is 'SALES INVOICE' -
otherwise we want the title to be 'SALES RECEIPT'...i tried modifying the
file as shown below without success:

<IF><CONDITION> Tender.Descriptor.TenderType = 4 </CONDITION>
<THEN>
<TEXT> "SALES INVOICE" </TEXT>
</THEN>
<ELSE>
<TEXT> "SALES RECEIPT" </TEXT>
</ELSE>
</IF>

not sure if this can be done?

thanks,
kevin
 
Ad

Advertisements

G

Glenn Adams [MVP - Retail Mgmt]

try Tender.Descriptor.TenderType = tenderAccount
 
K

kskinne

nope, that doesn't work either - it still says SALES RECEIPT regardless of
which tender type i select when tendering the transaction. any other ideas?
should i be using something else to test for this? i also tried this:

<FOR each="tender">
<IF><CONDITION> Tender.Descriptor.TenderType = 4 & Tender.AmountIn <>
0</CONDITION>
<THEN>
<TEXT> "SALES INVOICE" </TEXT>
</THEN>
<ELSE>
<TEXT> "SALES RECEIPT" </TEXT>
</ELSE>
</IF>
</FOR>

without any luck, thought maybe testing for this would only work if i was
testing each tender, but that doesn't seem to work either

thanks Glenn,
Kevin
 
J

Jason Hunt

Check the Report Library, one of the receipts on there has an example.
 
K

kskinne

assuming you mean on the customersource website - i am working with microsoft
on getting our registration of RMS associated with my passport login, right
now it's not. but as soon as I am able to get access to RMS info on
customersource, i'll try to check it out. in the meantime if you know
specifically what report mod your thinking of, could you post an example for
me? thanks

kevin
 
K

kskinne

ok, i checked out the receipts available for download, and none of them are
doing what i'm trying to do. they are testing to see if:

Transaction.TotalQuantityPurchased > 0

the problem with that is, it will be true regardless of the tender type
being selected. for both a sale that is paid in cash and a sale that is
charged on account, both instances the TotalQuantityPurchased is > 0... I
need to change the title of the receipt to 'SALES INVOICE' but only if the
item is being charged on account. i couldn't find any samples that showed
how to do that. any other ideas?

thanks,
kevin
 
Ad

Advertisements

J

Jason Hunt

Hi Kevin,

Sorry, I was thinking of the wrong thing.

Glenn's suggestion should work:

<CONDITION> Tender.Descriptor.TenderType = TenderAccount </CONDITION>

Make sure you remember to re-load the XML file after you make any changes.
The receipt templates are stored in the database, so if you update the .xml
file, RMS won't recognize those changes until you reload it.

- Jason
 
K

kskinne

this is exactly what i have in the header section of my XML file:

<IF><CONDITION> Transaction.ReceiptReturningItems = TRUE </CONDITION>
<THEN><TEXT> "CREDIT MEMO" </TEXT></THEN>
<ELSE>
<IF><CONDITION> Tender.Descriptor.TenderType = TenderAccount
</CONDITION>
<THEN><TEXT> "SALES INVOICE" </TEXT></THEN>
<ELSE><TEXT> "SALES RECEIPT" </TEXT></ELSE>
</IF>
</ELSE>
</IF>

i have re-loaded this file as the receipt template in manager too. but it
still isn't working (the first IF statement that changes the title to CREDIT
MEMO if items are being returned works fine though)

it is not changing the title to SALES INVOICE if I do a test sale and charge
the item to the customer's store account.

the if statement appears to be well-formed, and when i print the receipt it
is not erroring out, it's just that regardless of the tender type i select,
my condition always evaluates to FALSE

can someone test this in their own receipt template and see if it works for
them??

thank you for your help,
kevin
 
K

kskinne

Jason or Glenn,

Does Tender.Descriptor.TenderType actually represent the tender that was
selected during the tendering process at the end of a transaction? Or is
there some other property that I should be evaluating instead? I just got
thinking, maybe I am evaluating the wrong tender.

Thanks,
Kevin
 
K

kskinne

another question - is it possible that the tendertype variable can only be
used when it is referencing a collection? in other words do i need to have
this in a FOR statement, where I am testing each tender? (see my second post
- that's what i was attempting to do there). just throwing out ideas, i'm
not sure how to get this working correctly...

thanks,
kevin
 
G

Glenn Adams [MVP - Retail Mgmt]

Yeah, I think you hit on it here - you would need to check for each tender -
RMS allows split tenders, so the receipt always has to assume there is more
than one. Didn't think about that before.
 
Ad

Advertisements

K

kskinne

Hi Glenn -

based on this then, what would be the best way to do this. i tried
replacing this:

<IF><CONDITION> Tender.Descriptor.TenderType = TenderAccount </CONDITION>
<THEN><TEXT> "SALES INVOICE" </TEXT></THEN>
<ELSE><TEXT> "SALES INVOICE" </TEXT></ELSE>
</IF>

with this instead:

<FOR each="tender">
<IF><CONDITION> Tender.Descriptor.TenderType = TenderAccount &
Tender.AmountIn <> 0 </CONDITION>
<THEN>
<TEXT> "a" </TEXT></THEN>
<ELSE><TEXT> "b" </TEXT></ELSE>
</IF>
</FOR>

however when i try to reselect this file in manager, it won't let me because
it says it is not a well-formed xml document. what is wrong with my syntax?
and if the syntax is correct will this work? i'm worried that if i use this,
it will insert a title for each tender and i'll have a bunch of 'SALES
RECEIPTS' written across the top instead of just one.

any help is appreciated - thank you for your help so far.

kevin
 
J

Jason Hunt

You have to use HTML codes for the ampersand and the greater-than/less-than
symbols:

<IF><CONDITION> Tender.Descriptor.TenderType = TenderAccount &amp;
Tender.AmountIn &lt;&gt; 0 </CONDITION>

The receipts that come with RMS should also illustrate this.
 
K

kskinne

oops - sorry about that, i should have caught that...

ok, so i made that change, and then it allowed me to load the updated XML
file without problems in manager. however, then i went into POS and did a
transaction, and charged it to the store account tender. when the receipt
printed, it still said 'RECEIPT' on the top instead of 'INVOICE'. so the IF
statement is still not evaluating my transaction the way i need it to.

plus, now that I have placed the tender within a FOR statement, instead of
saying 'sales receipt' once in the top, it says it multiple times (???), at
least until it reaches the margin and runs out of space

hopefully one of you guys can maybe come up with a better way of
accomplishing the same thing, or at least fixing the way I'm trying to do it?
because this just doesn't seem to be working - problem is i don't see why,
when i look at the code, it looks like it should work...

thanks,
kevin
 
K

kskinne

ok, i've got something that is working for me now:

<IF>
<CONDITION> Transaction.ReceiptReturningItems = TRUE </CONDITION>
<THEN><TEXT> "CREDIT MEMO" </TEXT></THEN>
<ELSE>
<FOR each="tender">
<IF><CONDITION> Tender.AmountIn <> 0 </CONDITION>
<THEN>
<IF><CONDITION> Tender.Descriptor.TenderType =
TenderAccount </CONDITION>
<THEN><TEXT> "SALES INVOICE" </TEXT></THEN>
<ELSE><TEXT> "SALES RECEIPT" </TEXT></ELSE>
</IF>
</THEN>
<ELSE><TEXT> "" </TEXT></ELSE>
</IF>
</FOR>
</ELSE>
</IF>

this evaluates correctly and eliminates the duplicate titles. thank you
Glenn and Jason for helping me get to the point where i was able to work this
out. i appreciate the help

Kevin
 
J

Jason Hunt

Hi Kevni,

Glad to hear you got it working.

Don't forget to download the XML documentation from www.jeanholland.com, it
is invaluble when customizing receipts/etc.
 
Ad

Advertisements

M

Michael Fellows

Kevin,
Thanks for taking the time to figure this out with assists from Glenn and
Jason. Seems to me that this should be a standard item in the receipt
templates for the many businesses that do a combination of sales completed
and on account.
 
K

kskinne

yes i couldn't agree more...another thing i would really like to see is a
separate TransactionType enum property for returns, instead of being lumped
in with TransactionTypeSales

thanks,
kevin
 
P

Platinum

I would like to say that was fantastic how you all solved that, it is a
problem I needed too, thanks. I am not a programmer so could you advise were
these lines of code would need to be in the receipt templates, and do you
need to have the customer account type set to account.
More questions sorry, new to RMS just trying to get it set up. Is there a
way of showing on invoices (receipts) the amount for an item excluding VAT,
rather than the finished amount, just some of my account customers need to
know prices excluding vat. Also my current receipts on the epos printer
format shows VAT and the A4 printer format it shows Sales Tax, how can I
change this?

Any help is appreciated. Thanks
 
Ad

Advertisements

M

Mark @ CES com>

Hi,

Nice little xml mod you've got here.

I'm trying to put this into the receipt file myself, but I'm a novice with
html as I only learn by looking at existing templates/code.

Can anyone tell me where this code has to go in the full page receipt layout
please.

Many Thanks

Mark @ CES
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top