Skip to content

Commit

Permalink
fix: rounding adjustment in transfer folio
Browse files Browse the repository at this point in the history
  • Loading branch information
anhilmy committed Aug 21, 2024
1 parent 3710bb3 commit 30f87ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class InnFolioTransaction(Document):
def validate(self):
amount = int(self.amount)
amount = float(self.amount)
if amount == 0:
raise ValueError("Amount cannot be zero")

Expand Down
2 changes: 1 addition & 1 deletion inn/inn_hotels/page/pos_extended/pos_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def transfer_to_folio(invoice_doc, folio_name):
create_folio_trx(invoice_doc["name"], folio_name, taxe["tax_amount_after_discount_amount"], tax_type[ii], ftb_doc, remarks[ii], idx, guest_account_receiveable, taxe["account_head"])
idx = idx + 1

if invoice_doc["rounding_adjustment"] != 0:
if "rounding_adjustment" in invoice_doc and invoice_doc["rounding_adjustment"] != 0:
roundoff_remark = 'Rounding off Amount of Transfer Restaurant Charges from Restaurant Order: ' + invoice_doc["name"]
create_folio_trx(invoice_doc["name"], folio_name, invoice_doc["rounding_adjustment"], "Round Off", ftb_doc, roundoff_remark, idx, guest_account_receiveable)

Expand Down

0 comments on commit 30f87ca

Please sign in to comment.