fix: post customer withholding as a Deduct tax row, not a deduction
With a deduction row ERPNext treats Paid Amount as cash received and credits the party for paid + deduction, so a gross Paid Amount (what Get Outstanding Invoices fills) over-credited Debtors and posted the gross to the bank. Use the taxes table with add_deduct_tax=Deduct like supplier TDS: Paid Amount is the gross settlement, bank receives paid minus withholding, receivable is debited. Override Payment Entry build_gl_map to flag the bank entry post_net_value so the merged bank line shows the net amount.
This commit is contained in:
@@ -145,6 +145,7 @@ fixtures = [
|
||||
|
||||
override_doctype_class = {
|
||||
"Sales Invoice": "default_thai_company.tax_withholding.ThaiSalesInvoice",
|
||||
"Payment Entry": "default_thai_company.tax_withholding.ThaiPaymentEntry",
|
||||
}
|
||||
|
||||
# Document Events
|
||||
|
||||
Reference in New Issue
Block a user