Skip to content

Commit

Permalink
Merge pull request #60 from navariltd/develop16
Browse files Browse the repository at this point in the history
Adding batch to sales invoice items
  • Loading branch information
maniamartial authored Jun 9, 2024
2 parents c68c18a + b99fdc7 commit 6e8240a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def check_tin(self, tin):
frappe.log_error(error_message, "CheckTin Request Error")
frappe.log_error(f"Response content: {response}")
frappe.throw(f"{tin} Not registered")


obr_base_auth=OBRAPIBase()
token=obr_base_auth.authenticate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function showInvoiceDetailsDialog(result, doctype) {
read_only: true
}



]
});
Expand Down
10 changes: 6 additions & 4 deletions burundi_compliance/burundi_compliance/data/sale_invoice_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ def get_invoice_items(self):
total_vat = 0
else:
total_vat = 0
item_designation=item.item_code +"-" + item.batch_no if item.batch_no else item.item_code
items.append({
"item_designation": item.item_code,
"item_code": item.item_code,
"item_designation": item_designation,
"item_quantity": abs(item.qty),
"item_price": item.rate,
"item_total_amount": item.amount,
Expand All @@ -127,7 +128,6 @@ def get_invoice_items(self):
"item_price_nvat": abs(int(item.amount)),
"item_price_wvat": abs(int(item.amount + total_vat))
})

return items

def get_sales_data_for_stock_update(self, method=None):
Expand All @@ -146,10 +146,12 @@ def get_sales_data_for_stock_update(self, method=None):
item_movement_type = "SN"
if self.doc.is_return==1:
item_movement_type = "ER"

item_designation = item.item_code + " - " + item.batch_no if item.batch_no else item.item_code
data = {
"system_or_device_id": get_system_tax_id(),
"item_code": item.item_code,
"item_designation": item.item_name,
"item_designation": item_designation,
"item_quantity": item.qty,
"item_measurement_unit": item_uom,
"item_purchase_or_sale_price": item.rate,
Expand Down

0 comments on commit 6e8240a

Please sign in to comment.