mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 07:32:50 +00:00
[enhancement] added description, batch_no in packing slip
This commit is contained in:
@@ -65,9 +65,7 @@ class PackingSlip(Document):
|
|||||||
frappe.throw(_("""Case No(s) already in use. Try from Case No {0}""").format(self.get_recommended_case_no()))
|
frappe.throw(_("""Case No(s) already in use. Try from Case No {0}""").format(self.get_recommended_case_no()))
|
||||||
|
|
||||||
def validate_qty(self):
|
def validate_qty(self):
|
||||||
"""
|
"""Check packed qty across packing slips and delivery note"""
|
||||||
Check packed qty across packing slips and delivery note
|
|
||||||
"""
|
|
||||||
# Get Delivery Note Items, Item Quantity Dict and No. of Cases for this Packing slip
|
# Get Delivery Note Items, Item Quantity Dict and No. of Cases for this Packing slip
|
||||||
dn_details, ps_item_qty, no_of_cases = self.get_details_for_packing()
|
dn_details, ps_item_qty, no_of_cases = self.get_details_for_packing()
|
||||||
|
|
||||||
@@ -98,7 +96,7 @@ class PackingSlip(Document):
|
|||||||
from `tabPacking Slip` ps, `tabPacking Slip Item` psi
|
from `tabPacking Slip` ps, `tabPacking Slip Item` psi
|
||||||
where ps.name = psi.parent and ps.docstatus = 1
|
where ps.name = psi.parent and ps.docstatus = 1
|
||||||
and ps.delivery_note = dni.parent and psi.item_code=dni.item_code) as packed_qty,
|
and ps.delivery_note = dni.parent and psi.item_code=dni.item_code) as packed_qty,
|
||||||
stock_uom, item_name
|
stock_uom, item_name, description, dni.batch_no
|
||||||
from `tabDelivery Note Item` dni
|
from `tabDelivery Note Item` dni
|
||||||
where parent=%s %s
|
where parent=%s %s
|
||||||
group by item_code""" % ("%s", condition),
|
group by item_code""" % ("%s", condition),
|
||||||
@@ -155,6 +153,8 @@ class PackingSlip(Document):
|
|||||||
ch.item_code = item.item_code
|
ch.item_code = item.item_code
|
||||||
ch.item_name = item.item_name
|
ch.item_name = item.item_name
|
||||||
ch.stock_uom = item.stock_uom
|
ch.stock_uom = item.stock_uom
|
||||||
|
ch.description = item.description
|
||||||
|
ch.batch_no = item.batch_no
|
||||||
ch.qty = flt(item.qty) - flt(item.packed_qty)
|
ch.qty = flt(item.qty) - flt(item.packed_qty)
|
||||||
self.update_item_details()
|
self.update_item_details()
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,21 @@
|
|||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"width": "200px"
|
"width": "200px"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "batch_no",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Batch No",
|
||||||
|
"options": "Batch",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Description",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "qty",
|
"fieldname": "qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
@@ -90,7 +105,7 @@
|
|||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-02-19 01:07:00.840553",
|
"modified": "2015-04-21 01:42:24.312967",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Packing Slip Item",
|
"name": "Packing Slip Item",
|
||||||
|
|||||||
Reference in New Issue
Block a user