fix(Sales Invoice): Reset disposal_date on returning the Asset
This commit is contained in:
parent
4cf3d9ac20
commit
f8ee8058e7
@ -932,15 +932,16 @@ class SalesInvoice(SellingController):
|
||||
if self.is_return:
|
||||
fixed_asset_gl_entries = get_gl_entries_on_asset_movement(asset,
|
||||
item.base_net_amount, item.finance_book, True)
|
||||
asset.db_set("disposal_date", None)
|
||||
else:
|
||||
fixed_asset_gl_entries = get_gl_entries_on_asset_movement(asset,
|
||||
item.base_net_amount, item.finance_book)
|
||||
asset.db_set("disposal_date", self.posting_date)
|
||||
|
||||
for gle in fixed_asset_gl_entries:
|
||||
gle["against"] = self.customer
|
||||
gl_entries.append(self.get_gl_dict(gle, item=item))
|
||||
|
||||
asset.db_set("disposal_date", self.posting_date)
|
||||
self.set_asset_status(asset)
|
||||
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user