mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-07 12:54:05 +02:00
Shop: Create null inventory fix transaction in case amount is correct
This commit is contained in:
parent
ac4f2f2c62
commit
d74ca2b6c0
1 changed files with 5 additions and 1 deletions
|
@ -164,6 +164,10 @@ class Shop:
|
|||
self.db.commit()
|
||||
return True
|
||||
else:
|
||||
transaction = self._transaction(description = "BrmBar inventory fix of {}pcs {} in system to {}pcs in reality".format(amount_in_system, item.name,amount_in_reality))
|
||||
item.debit(transaction, 0, "Inventory fix - amount was correct")
|
||||
item.credit(transaction, 0, "Inventory fix - amount was correct")
|
||||
self.db.commit()
|
||||
return False
|
||||
def fix_cash(self, amount):
|
||||
amount_in_reality = amount
|
||||
|
@ -183,4 +187,4 @@ class Shop:
|
|||
self.db.commit()
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue