Skip to content

Commit

Permalink
Merge pull request #9 from av-dev2/fix_create_sales_invoice
Browse files Browse the repository at this point in the history
fix: exclude item on creating invoice if the item is not billabl or i…
  • Loading branch information
aakvatech authored Apr 9, 2022
2 parents ef13bc6 + 526594b commit b4aa8d4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def create_invoice(self):
workshop = frappe.get_doc("Service Workshop", self.workshop)
if self.services and len(self.services) > 0:
for item in self.services:
if not item.is_billable:
continue

items.append(
{
"item_code": item.item,
Expand All @@ -152,6 +155,9 @@ def create_invoice(self):
)
if self.supplied_parts and len(self.supplied_parts) > 0:
for item in self.supplied_parts:
if not item.is_billable or item.is_return or item.qty == 0:
continue

items.append(
{
"item_code": item.item,
Expand Down

0 comments on commit b4aa8d4

Please sign in to comment.