Discussion Forum: Thread 320055

 Author: CanadaFirst View Messages Posted By CanadaFirst
 Posted: Apr 19, 2022 19:16
 Subject: Invoice template issues
 Viewed: 75 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

CanadaFirst (32083)

Location:  Canada, Quebec
Member Since Contact Type Status
Mar 27, 2017 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Canada First Bricks
We use a custom invoice which was working fine until we decided to put the grand
total nearer to the top of the totals because of some offsite payments (in Canada
only, not the US so no tax issues) using the total instead of grand total.

The problem is, when we send an invoice to Canada, which has values in additional
charge 1 and 2 because of taxes, it doesn't display the information after
the grand total. If we send an invoice to the USA, the whole thing works.

It used to work perfectly and I only copy/pasted the grand total nearer to the
top and it seems to have broken it.

Anyone know what's going on or if there is an issue I'm missing?

CODE: removed the so that the code appears

Your invoice total is DISPCURRENCYSIGN. Please pay onsite by
clicking on button in this invoice or the 'pay' button on your order
list. Thanks for choosing Canada First Bricks!

/COMMENTS
LINE
Order Summary:
LINE
Total Items: ORDERITEMS
Unique Items (lots): ORDERLOTS
Grand Total: BASECURRENCYSIGNBASEGRANDTOTALCURRENCYCONV-EQ:Y
Coupon Applied: COUPONVALUE
Total: BASECURRENCYSIGNORDERTOTAL
Shipping: BASECURRENCYSIGNORDERSHIPPING
Insurance: BASECURRENCYSIGNORDERINSURANCE
GST/HST #(CENSORED NUMBERS) RT0001: BASECURRENCYSIGNORDERADDCHRG1
PST #(CENSORED NUMBERS) TQ0001: BASECURRENCYSIGNORDERADDCHRG2ORDERSALESTAX-EQ:Y
Credit: BASECURRENCYSIGN
Grand Total in DISPCURRENCYNAME: DISPCURRENCYSIGNDISPGRANDTOTAL/CURRENCYCONV-EQ:YCOUPON-EQ:Y
LINE
Coupon Note: COUPONNOTE/COUPON-EQ:Y
LINE
Items in Order:
LINE
ORDERDETAIL
 Author: jbroman View Messages Posted By jbroman
 Posted: Apr 20, 2022 00:27
 Subject: Re: Invoice template issues
 Viewed: 26 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

jbroman (985)

Location:  Canada, British Columbia
Member Since Contact Type Status
Oct 16, 2018 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Big Boy's Bricks
Can you take a screenshot of the template?
That way we could see if one of the brackets got placed wrong.
 Author: CanadaFirst View Messages Posted By CanadaFirst
 Posted: Apr 20, 2022 11:48
 Subject: Re: Invoice template issues
 Viewed: 27 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

CanadaFirst (32083)

Location:  Canada, Quebec
Member Since Contact Type Status
Mar 27, 2017 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Canada First Bricks
In Help, jbroman writes:
  Can you take a screenshot of the template?
That way we could see if one of the brackets got placed wrong.

Here is the current version.

On US orders it's perfectly fine. On Canadian orders the top part with the
totals, numbers of parts and lots and so on works but not the list of items and
the rest. Basically it seems to fail starting at coupon note.

The person who made the invoice made it when we started our shop and doesn't
rememeber how it works so it's possible that there is some very messy code
in there, sorry.
 
 Author: beaverbrick View Messages Posted By beaverbrick
 Posted: Apr 20, 2022 12:18
 Subject: Re: Invoice template issues
 Viewed: 28 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

beaverbrick (566)

Location:  United Kingdom, England
Member Since Contact Type Status
Jan 2, 2014 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store Closed Store: Brick Beaver
In Help, CanadaFirst writes:
  In Help, jbroman writes:
  Can you take a screenshot of the template?
That way we could see if one of the brackets got placed wrong.

Here is the current version.

On US orders it's perfectly fine. On Canadian orders the top part with the
totals, numbers of parts and lots and so on works but not the list of items and
the rest. Basically it seems to fail starting at coupon note.

The person who made the invoice made it when we started our shop and doesn't
rememeber how it works so it's possible that there is some very messy code
in there, sorry.

On the line beginning 'PST #...' there is an ORDERSALESTAX-EQ:Y conditional
macro (which means sellers and buyers address are both in US). I can't see
an end to that macro.
If there is no end, that means only US orders will see anything after that macro,
which sounds like it could be your issue.
 Author: CanadaFirst View Messages Posted By CanadaFirst
 Posted: Apr 20, 2022 12:59
 Subject: Re: Invoice template issues
 Viewed: 20 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

CanadaFirst (32083)

Location:  Canada, Quebec
Member Since Contact Type Status
Mar 27, 2017 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Canada First Bricks
Ok, so I removed it and now the invoice works, however I don't know how to
make it show US taxes when they are collected and I'm a bit afraid to change
anything on my own and break it again.
 Author: beaverbrick View Messages Posted By beaverbrick
 Posted: Apr 20, 2022 13:28
 Subject: Re: Invoice template issues
 Viewed: 17 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

beaverbrick (566)

Location:  United Kingdom, England
Member Since Contact Type Status
Jan 2, 2014 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store Closed Store: Brick Beaver
In Help, CanadaFirst writes:
  Ok, so I removed it and now the invoice works, however I don't know how to
make it show US taxes when they are collected and I'm a bit afraid to change
anything on my own and break it again.

Depends how you want it to appear.
Check out the attached image for a couple of options, which will hopefully give
you the right idea.
Just sing out if you need further help
 
 Author: CanadaFirst View Messages Posted By CanadaFirst
 Posted: Apr 20, 2022 13:59
 Subject: Re: Invoice template issues
 Viewed: 17 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

CanadaFirst (32083)

Location:  Canada, Quebec
Member Since Contact Type Status
Mar 27, 2017 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Canada First Bricks
In Help, beaverbrick writes:
  In Help, CanadaFirst writes:
  Ok, so I removed it and now the invoice works, however I don't know how to
make it show US taxes when they are collected and I'm a bit afraid to change
anything on my own and break it again.

Depends how you want it to appear.
Check out the attached image for a couple of options, which will hopefully give
you the right idea.
Just sing out if you need further help

That worked, thanks so much!
 Author: jbroman View Messages Posted By jbroman
 Posted: Apr 20, 2022 04:34
 Subject: Re: Invoice template issues
 Viewed: 36 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

jbroman (985)

Location:  Canada, British Columbia
Member Since Contact Type Status
Oct 16, 2018 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Big Boy's Bricks
I changed the greater-than and less-than signs to brackets to avoid the macro.
To make it visual easier, I also included two screenshot of the two options.
Let us know if it worked.


  Your invoice total (DISPCURRENCYSIGN)(DISPGRANDTOTAL). Please pay onsite by clicking on the button in this invoice or the 'pay' button on your order list. Thanks for choosing Canada First Bricks!

(/COMMENTS)
(LINE)
Order Summary:
(LINE)
Total Items: (ORDERITEMS)
Unique Items (lots): (ORDERLOTS)
Grand Total: (BASECURRENCYSIGN)(BASEGRANDTOTAL)(CURRENCYCONV-EQ:Y)

I think this bolded and underlined part is too high up. Move it to the end of
the credit line. It is the opening "tag" for that command, the end "tag" is at
the end of "Grand Total in the (DISPCURRENCYNAME): line.
Having it here may cause a circular reference.

Or you could move the line, bolded and italicized below, under the "Grand Total"
line.
  (LINE)
Coupon Applied: (COUPONVALUE)

This line should be after (COUPON-EQ:Y)

  Total: (BASECURRENCYSIGN)(ORDERTOTAL)
Shipping: (BASECURRENCYSIGN)(ORDERSHIPPING)
Insurance: (BASECURRENCYSIGN)(ORDERINSURANCE)
GST/HST #(CENSORED NUMBERS) RT0001: (BASECURRENCYSIGN)(ORDERADDCHRG1)
PST #(CENSORED NUMBERS) TQ0001: (BASECURRENCYSIGN)(ORDERADDCHRG2)(ORDERSALESTAX-EQ:Y)
Sales Tax: (BASECURRENCYSIGN)(ORDERSALESTAX)(/ORDERSALESTAX-EQ:Y)

You need this line if selling to the US. It will not show for non US orders.

  Credit: (BASECURRENCYSIGN)(ORDERCREDIT)
Grand Total in (DISPCURRENCYNAME): (DISPCURRENCYSIGN)(DISPGRANDTOTAL)(/CURRENCYCONV-EQ:Y)
(COUPON-EQ:Y)
(LINE)
Coupon Note: (COUPONNOTE)(/COUPON-EQ:Y)
(LINE)
Items in Order:
(LINE)
ORDERDETAIL)
 


 Author: CanadaFirst View Messages Posted By CanadaFirst
 Posted: Apr 20, 2022 09:33
 Subject: Re: Invoice template issues
 Viewed: 33 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

CanadaFirst (32083)

Location:  Canada, Quebec
Member Since Contact Type Status
Mar 27, 2017 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Canada First Bricks
Thank you. I will post the screenshots later, got orders to ship out but for
now just moving what you suggested solved part of the issue.

Moving this:

(CURRENCYCONV-EQ:Y)

Made it so that now I have the totals and everything but the order details with
the items and all are now only on the invoice to US orders, not on Canadian orders
and only on some international orders for some reason.

Once my orders are shipped out for the day I will get back here and hopefully
we can resolve this completely.

Thank you again!