mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
added website pages for orders, tickets and added sales invoice print format
This commit is contained in:
@@ -310,7 +310,8 @@ cur_frm.cscript.barcode = function(doc, cdt, cdn) {
|
||||
var callback = function(r, rt) {
|
||||
cur_frm.cscript.item_code(doc, cdt, cdn);
|
||||
}
|
||||
get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname, doc, cdt, cdn, 1, callback);
|
||||
get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname,
|
||||
doc, cdt, cdn, 1, callback);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query =
|
||||
|
||||
@@ -352,4 +352,20 @@ class DocType(SellingController):
|
||||
return get_obj('Sales Common').get_item_list( self, is_stopped)
|
||||
|
||||
def on_update(self):
|
||||
pass
|
||||
pass
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_orders():
|
||||
# find customer id
|
||||
customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user},
|
||||
"customer")
|
||||
|
||||
if customer:
|
||||
orders = webnotes.conn.sql("""select name, creation, currency from `tabSales Order`
|
||||
where customer=%s""", customer, as_dict=1)
|
||||
for order in orders:
|
||||
order.items = webnotes.conn.sql("""select item_name, qty, export_rate, delivered_qty
|
||||
from `tabSales Order Item` where parent=%s order by idx""", order.name, as_dict=1)
|
||||
return orders
|
||||
else:
|
||||
return []
|
||||
Reference in New Issue
Block a user