Merge pull request #7535 from rohitwaghchaure/landed_cost_voucher_issue

[Fix] Minor issue in landed cost voucher
This commit is contained in:
Nabin Hait 2017-01-20 12:12:17 +05:30 committed by GitHub
commit bfcacbf2ca

View File

@ -12,6 +12,7 @@ class LandedCostVoucher(Document):
def get_items_from_purchase_receipts(self):
self.set("items", [])
for pr in self.get("purchase_receipts"):
if pr.receipt_document_type and pr.receipt_document:
pr_items = frappe.db.sql("""select pr_item.item_code, pr_item.description,
pr_item.qty, pr_item.base_rate, pr_item.base_amount, pr_item.name
from `tab{doctype} Item` pr_item where parent = %s