สมอง SML

คลังความรู้ / คำศัพท์ไทย ↔ โค้ด

#glossary#document#money#totals

ยอดรวมท้ายเอกสาร

ในระบบนี้คืออะไร

แผงล่างของจอเอกสาร (TransBottomPanel.tsx) แสดงยอดรวมที่ backend คำนวณเอง ไม่ใช้ค่าที่ client ส่งมา (transcalc.go:9-10) แล้วเก็บไว้ที่หัว ic_trans (trans.go:657-688)

ป้ายบนจอ → คอลัมน์

ป้ายบนจอ ตัวแปร UI คอลัมน์ ic_trans
รวมมูลค่าสินค้า (:330) totalValue total_value
ส่วนลดก่อนภาษี (:336) discountWord discount_word (ข้อความ เช่น "5%" หรือ "10")
มูลค่าส่วนลด (:347) totalDiscount total_discount
หักเงินมัดจำ (:353) advanceAmount advance_amount
ยอดเงินก่อนภาษี (:364) totalBeforeVat total_before_vat
ยอดภาษีมูลค่าเพิ่ม (:370) totalVatValue total_vat_value
มูลค่าหลังคิดภาษี (:376) afterVat total_after_vat
มูลค่ายกเว้นภาษี (:382) totalExceptVat total_except_vat
รวมมูลค่าทั้งสิ้น (:387) totalAmount total_amount
  • ส่วนหัวมีช่อง "มูลค่าสุทธิ" (TransTopForm.tsx:275) สำหรับเอกสารบางชนิดที่กรอกยอดที่หัว
  • ถ้าใช้หลายสกุลเงิน จะมีแถว "มูลค่าสินค้า (สกุลเงิน)", "มูลค่าส่วนลด (สกุลเงิน)", "มูลค่าสุทธิ (สกุลเงิน)" เพิ่ม (TransBottomPanel.tsx:104-123) ดู สกุลเงิน และอัตราแลกเปลี่ยน (currency / exchange_rate / multi_currency)
  • ในบรรทัดรายการ: price, price_exclude_vat, discount, discount_amount, sum_amount, sum_amount_exclude_vat, total_vat_value (trans.go:692-728)

ข้อควรระวัง

ลิงก์

การคำนวณยอดท้ายบิล VAT และส่วนลด (Document Totals / vatCalc) · ประเภทภาษี แยกนอก/รวมใน และภาษีซื้อ-ขาย (VAT type / vat_type / gl_journal_vat_buy / gl_journal_vat_sale) · เงินล่วงหน้า และเงินมัดจำ (advance / deposit / advance_amount) · หัวเอกสารสินค้า/ซื้อ/ขาย (ic_trans) · glossary-overview

ที่มาในโค้ด

  • frontend/account/transaction/TransBottomPanel.tsx:104-123, :330-387
  • frontend/account/transaction/TransTopForm.tsx:275
  • backend/internal/application/process/trans.go:657-688, :692-728
  • backend/internal/application/process/transcalc.go:9-10
  • backend/internal/application/process/trans_tax.go:66-74