Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding batch to sales invoice items #60

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading