Merge pull request #16189 from rohitwaghchaure/transferred_qty_issue

[Fix] Transferred qty cannot be null
This commit is contained in:
rohitwaghchaure 2018-12-10 17:37:02 +05:30 committed by GitHub
commit 398e47ecad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ class JobCard(Document):
if self.items:
self.transferred_qty = frappe.db.get_value('Stock Entry', {'job_card': self.name,
'work_order': self.work_order, 'docstatus': 1}, 'sum(fg_completed_qty)')
'work_order': self.work_order, 'docstatus': 1}, 'sum(fg_completed_qty)') or 0
self.db_set("transferred_qty", self.transferred_qty)