[Fix] Minor issue in landed cost voucher

This commit is contained in:
Rohit Waghchaure 2017-01-19 18:38:53 +05:30
parent e2f4b35b11
commit a3a977d02a

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