Skip to content

[FIX] budget_control_expense: uncommit only ml expense account#548

Open
Pani-k-folk wants to merge 1 commit into15.0from
15.0-fix-budget_control_expense-check_ex_account
Open

[FIX] budget_control_expense: uncommit only ml expense account#548
Pani-k-folk wants to merge 1 commit into15.0from
15.0-fix-budget_control_expense-check_ex_account

Conversation

@Pani-k-folk
Copy link
Copy Markdown

แก้ไขกรณีเมื่อ Post JV ของ Expense ที่มี Vat แล้วระบบสร้าง Journal Item 2 บรรทัด (ค่าใช้จ่าย และภาษี)
ทำให้คืนงบประมาณเกิน

ตัวอย่าง
EX-1 Amount 100 Vat 7%
EX-2 Amount 55 ไม่มี vat

เมื่อ Post JV ระบบสร้าง

ml1 เป็น Account = Expense Account ของ EX-1
ml2 เป็น Account = Vat Account ของ EX-1
ml3 เป็น Account = Expense Account ของ EX-2

เมื่อคืน commit

ml1 คืน commit 100 บาท เหลือ 45 บาท
ml2 คืน commit 100 บาท เกิน 55 บาท
ml3 คืน commit 55 บาท เกิน 90 บาท

ทำให้จังหวะ return overbudget เกิดปัญหาเนื่องจากไม่สามารถทำให้ยอด Amount commit เป็น 0 ได้

การแก้ไข

  • แก้ไขให้มีการตรวจสอบ Account ของ ml ว่าตรงกับ EX หรือไม่หากตรงให้คืน commit จาก ml นั้น

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant