summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-07-15 06:18:06 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-07-15 06:18:06 +0000
commit884524fc6d8edebb0a4cbcb03c3038bdb46b45c5 (patch)
tree863e5c637ea589771859072c350f3c63b3faefed /indoteknik_custom/models/account_move.py
parentb496b7907c60d8b262ddba42e55dd8485f718fce (diff)
parent855f63e1c39ba1ff4d84360845949bc260462c83 (diff)
Merged in receipt-bill (pull request #52)
Receipt bill
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index c2e93632..99439915 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -13,6 +13,8 @@ class AccountMove(models.Model):
resi_tukar_faktur = fields.Char(string='Resi Faktur')
date_terima_tukar_faktur = fields.Date(string='Terima Faktur')
shipper_faktur_id = fields.Many2one('delivery.carrier', string='Shipper Faktur')
+ due_extension = fields.Integer(string='Due Extension', default=0)
+ new_due_date = fields.Date(string='New Due')
def unlink(self):
res = super(AccountMove, self).unlink()
@@ -70,6 +72,8 @@ class AccountMove(models.Model):
invoice_day_to_due = 0
if invoice.payment_state not in ['paid', 'in_payment', 'reversed'] and invoice.invoice_date_due:
invoice_day_to_due = invoice.invoice_date_due - date.today()
+ if invoice.new_due_date:
+ invoice_day_to_due = invoice.new_due_date - date.today()
invoice_day_to_due = invoice_day_to_due.days
invoice.invoice_day_to_due = invoice_day_to_due