Commit Graph
12 Commits
Author SHA1 Message Date
kurogeek 4a19c60ba2 fix: print the posted discount and tax amounts
ERPNext takes an Additional Discount off the items' net amounts and,
for a discount on Grand Total, splits it between net and taxes: each
charge is booked at tax_amount_after_discount_amount and Total Taxes
and Charges sums those. The print showed the discount as entered and
the pre-discount tax_amount, so on a Grand Total discount the VAT line
disagreed with the invoice.

The totals includes now print the discount's net share (sum of
item.distributed_discount_amount), Net Total, and each charge after
discount, so the lines add up to Grand Total whichever total the
discount applies on and with inclusive or exclusive tax. A discount
that is not distributed (cash / non-trade) stays after the charges.
2026-09-17 10:19:30 +00:00
kurogeek 71eda0bec9 fix: print Total, Additional Discount, Net Total in that order
Default Standard Sales Invoice and Tax Invoice/Receipt printed the
Additional Discount Amount among the charges, after the Total line but
with no total after the discount. App copies of ERPNext's totals
includes are swapped in via doc.print_templates:

- taxes.html: a discount on Net Total is followed by the Net Total line
  ahead of the charges; a discount on Grand Total stays after them.
- total.html: with inclusive tax, "Total (Without Tax)" is the total
  before the discount (net_total + discount_amount); upstream printed
  net_total, which already has the discount taken off, so the same
  figure appeared before and after the discount line.
2026-09-17 10:02:23 +00:00
kurogeek d074657511 feat: add Default Standard Quotation print format 2026-09-16 07:46:59 +00:00
kurogeek caad6e77da fix: heading dates wrapped at the hyphen in PDF
The floated block shrinks to fit and WebKit breaks 15-09-2026 after a
hyphen; keep each date line on one line.
2026-09-15 07:11:51 +00:00
kurogeek 8aeecfca2f feat: no bank account details on Default Standard Tax Invoice/Receipt
A receipt acknowledges payment; the bank block belongs on the invoice.
2026-09-15 07:03:46 +00:00
kurogeek e85ec3a585 feat: Tax Invoice/Receipt print format headed Tax Invoice/Receipt
The heading fell back to the DocType name; a Print Heading on the
document still takes precedence.
2026-09-15 06:56:22 +00:00
kurogeek 015ce48639 feat: print formats hide Disable Rounded Total and Rounded Total when disabled
rounded_total keeps a value when rounding is disabled, so the standard
layout printed it alongside Grand Total.
2026-09-15 06:50:55 +00:00
kurogeek 9a8602f74e feat: Thai language for every customization
- translations/th.csv: custom field labels, messages, print format and
  letter head text, the 22 Tax Withholding Category names; overrides the
  upstream Thai for the standard labels the print formats show
- print formats embed Sarabun (public/fonts, OFL) so PDFs render Thai on
  servers without a Thai font
- letter head labels go through _()
- withholding row description is translated when stored
- in_words: Thai "...บาทถ้วน" wording via num2words when the language is
  Thai (ThaiSalesInvoice.set_total_in_words); print formats re-derive it
  in the print language (get_in_words)
- fixture `modified` bumped so migrate re-imports the changed documents
2026-09-15 06:50:55 +00:00
kurogeek 33310c51ae feat: add Default Standard Tax Invoice/Receipt print format
Exact copy of Default Standard Sales Invoice, shipped as a fixture
alongside it.
2026-09-14 10:13:33 +00:00
kurogeek f0961de744 feat: customer contact column on Default Standard Sales Invoice
- Split the Customer block into two columns: name / address / tax id on
  the left, contact person with phone, mobile and email on the right
  (only when the invoice has a contact person; phone read from Contact)
- Thailand Address Template: drop the blank line between the address and
  the phone / fax / email lines
2026-09-14 09:42:27 +00:00
kurogeek dc8509d6d7 feat: tidy Default Standard Sales Invoice layout
- Hide Total Quantity, Update Billed Amount in Delivery Note, Amount
  Eligible for Commission and Company Tax ID (already in the letterhead)
- Move Posting Date / Payment Due Date into the print heading, right-aligned
- Add a Customer block (name, address, contact, tax id) under the heading
- Render Total (Without Tax) in the same right-half grid as Taxes / Totals
- Put In Words in the empty left column of Totals, level with Grand Total
- Print Format CSS: one 1.8 line-height rhythm with no row margins, 5px
  letterhead margin, 5px margins around the item table
2026-09-14 08:57:08 +00:00
kurogeek 8d3b843da8 default Sales Invoice Print Format 2026-09-11 15:35:06 +07:00