Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5380 มุมมอง

def _amount_residual(self, cr, uid, ids, name, args, context=None):
        result = {}
        for invoice in self.browse(cr, uid, ids, context=context):
            result[invoice.id] = 0.0
            if invoice.move_id:
                for m in invoice.move_id.line_id:
                    if m.account_id.type in ('receivable','payable'):
                        result[invoice.id] += m.amount_residual_currency
            #prevent the residual amount on the invoice to be less than 0
            result[invoice.id] = max(result[invoice.id], 0.0)            
        return result

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

This is the amount that is left unpaid after all payments ware reconciled with the invoice. With other words, the customer needs to pay this remaining amount of mony so we can close the invoice.

อวตาร
ละทิ้ง
ผู้เขียน

Hi Jordan, If this is the amount that is left unpaid why is my balance gets doubled after validation?