more changes to last purchase rate
This commit is contained in:
parent
cec150b487
commit
314c202340
@ -268,7 +268,7 @@ class DocType(TransactionBase):
|
|||||||
from `tabPurchase Order` po, `tabPurchase Order Item` po_item
|
from `tabPurchase Order` po, `tabPurchase Order Item` po_item
|
||||||
where po.docstatus = 1 and po_item.item_code = %s and po.name != %s and
|
where po.docstatus = 1 and po_item.item_code = %s and po.name != %s and
|
||||||
po.name = po_item.parent
|
po.name = po_item.parent
|
||||||
order by po.transaction_date DESC
|
order by po.transaction_date desc, po.name desc
|
||||||
limit 1""", (item_code, doc_name), as_dict=1)
|
limit 1""", (item_code, doc_name), as_dict=1)
|
||||||
|
|
||||||
# get last purchase receipt item details
|
# get last purchase receipt item details
|
||||||
@ -278,7 +278,7 @@ class DocType(TransactionBase):
|
|||||||
from `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pr_item
|
from `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pr_item
|
||||||
where pr.docstatus = 1 and pr_item.item_code = %s and pr.name != %s and
|
where pr.docstatus = 1 and pr_item.item_code = %s and pr.name != %s and
|
||||||
pr.name = pr_item.parent
|
pr.name = pr_item.parent
|
||||||
order by pr.posting_date DESC, pr.posting_time DESC
|
order by pr.posting_date desc, pr.posting_time desc, pr.name desc
|
||||||
limit 1""", (item_code, doc_name), as_dict=1)
|
limit 1""", (item_code, doc_name), as_dict=1)
|
||||||
|
|
||||||
# get the latest of the two
|
# get the latest of the two
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user