[fixes][account][packing slip]
This commit is contained in:
parent
1cfab4e21d
commit
d246de8417
@ -69,11 +69,13 @@ class DocType:
|
||||
raise_exception=1)
|
||||
|
||||
def validate_duplicate_account(self):
|
||||
if (self.doc.fields.get('__islocal') or not self.doc.name) and \
|
||||
sql("""select name from tabAccount where account_name=%s and company=%s""",
|
||||
(self.doc.account_name, self.doc.company)):
|
||||
msgprint("Account Name: %s already exists, please rename"
|
||||
% self.doc.account_name, raise_exception=1)
|
||||
|
||||
if self.doc.fields.get('__islocal') or not self.doc.name:
|
||||
company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
|
||||
if sql("""select name from tabAccount where name=%s""",
|
||||
(self.doc.account_name + " - " + company_abbr)):
|
||||
msgprint("Account Name: %s already exists, please rename"
|
||||
% self.doc.account_name, raise_exception=1)
|
||||
|
||||
def validate_root_details(self):
|
||||
#does not exists parent
|
||||
|
@ -138,3 +138,17 @@ cur_frm.cscript.calc_net_total_pkg = function(doc, ps_detail) {
|
||||
refresh_many(['net_weight_pkg', 'net_weight_uom', 'gross_weight_uom', 'gross_weight_pkg']);
|
||||
}
|
||||
|
||||
var make_row = function(title,val,bold){
|
||||
var bstart = '<b>'; var bend = '</b>';
|
||||
return '<tr><td class="datalabelcell">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
|
||||
+'<td class="datainputcell" style="text-align:left;">'+ val +'</td>'
|
||||
+'</tr>'
|
||||
}
|
||||
|
||||
cur_frm.pformat.net_weight_pkg= function(doc){
|
||||
return '<table style="width:100%">' + make_row('Net Weight', doc.net_weight_pkg) + '</table>'
|
||||
}
|
||||
|
||||
cur_frm.pformat.gross_weight_pkg= function(doc){
|
||||
return '<table style="width:100%">' + make_row('Gross Weight', doc.gross_weight_pkg) + '</table>'
|
||||
}
|
@ -94,12 +94,10 @@ class DocType:
|
||||
* Item Quantity dict of current packing slip doc
|
||||
* No. of Cases of this packing slip
|
||||
"""
|
||||
item_codes = ", ".join([('"' + d.item_code + '"') for d in
|
||||
self.doclist])
|
||||
|
||||
items = [d.item_code for d in self.doclist.get({"parentfield": "item_details"})]
|
||||
|
||||
if not item_codes: webnotes.msgprint("No Items to Pack",
|
||||
if not items: webnotes.msgprint("No Items to Pack",
|
||||
raise_exception=1)
|
||||
|
||||
# gets item code, qty per item code, latest packed qty per item code and stock uom
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-03-07 11:42:59",
|
||||
"creation": "2013-04-08 13:10:16",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-04-05 16:06:40",
|
||||
"modified": "2013-04-11 15:06:05",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -70,7 +70,7 @@
|
||||
"fieldtype": "Float",
|
||||
"label": "Net Weight",
|
||||
"print_width": "100px",
|
||||
"read_only": 1,
|
||||
"read_only": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
@ -80,7 +80,7 @@
|
||||
"label": "Weight UOM",
|
||||
"options": "UOM",
|
||||
"print_width": "100px",
|
||||
"read_only": 1,
|
||||
"read_only": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
@ -95,6 +95,7 @@
|
||||
"fieldname": "dn_detail",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "DN Detail"
|
||||
"label": "DN Detail",
|
||||
"read_only": 0
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user