mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
f
This commit is contained in:
@@ -158,7 +158,7 @@ cur_frm.fields_dict['sales_order_no'].get_query = function(doc) {
|
||||
if(doc.project_name){
|
||||
cond += '`tabSales Order`.project_name ="'+doc.project_name+'"';
|
||||
}
|
||||
return repl('SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "%(company)s" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_delivered,0) < 100 and %(cond)s `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50', {company:doc.company,cond:cond})
|
||||
return repl('SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "%(company)s" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_delivered,0) < 99.99 and %(cond)s `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50', {company:doc.company,cond:cond})
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ cur_frm.cscript['Make Sales Invoice'] = function() {
|
||||
//-----------------------------------Make Installation Note----------------------------------------------
|
||||
cur_frm.cscript['Make Installation Note'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
if(doc.per_installed < 100){
|
||||
if(doc.per_installed < 99.99){
|
||||
n = createLocal('Installation Note');
|
||||
$c('dt_map', args={
|
||||
'docs':compress_doclist([locals['Installation Note'][n]]),
|
||||
|
||||
@@ -222,9 +222,9 @@ cur_frm.cscript.rejected_qty = function(doc, cdt, cdn) {
|
||||
//================================= Purchase Order No Get Query ====================================
|
||||
cur_frm.fields_dict['purchase_order_no'].get_query = function(doc) {
|
||||
if (doc.supplier)
|
||||
return 'SELECT DISTINCT `tabPurchase Order`.`name` FROM `tabPurchase Order` WHERE `tabPurchase Order`.`supplier` = "' +doc.supplier + '" and`tabPurchase Order`.`docstatus` = 1 and `tabPurchase Order`.`status` != "Stopped" and ifnull(`tabPurchase Order`.`per_received`, 0) < 100 and `tabPurchase Order`.`currency` = ifnull("' +doc.currency+ '","") and `tabPurchase Order`.company = "'+ doc.company +'" and `tabPurchase Order`.%(key)s LIKE "%s" ORDER BY `tabPurchase Order`.`name` DESC LIMIT 50';
|
||||
return 'SELECT DISTINCT `tabPurchase Order`.`name` FROM `tabPurchase Order` WHERE `tabPurchase Order`.`supplier` = "' +doc.supplier + '" and`tabPurchase Order`.`docstatus` = 1 and `tabPurchase Order`.`status` != "Stopped" and ifnull(`tabPurchase Order`.`per_received`, 0) < 99.99 and `tabPurchase Order`.`currency` = ifnull("' +doc.currency+ '","") and `tabPurchase Order`.company = "'+ doc.company +'" and `tabPurchase Order`.%(key)s LIKE "%s" ORDER BY `tabPurchase Order`.`name` DESC LIMIT 50';
|
||||
else
|
||||
return 'SELECT DISTINCT `tabPurchase Order`.`name` FROM `tabPurchase Order` WHERE `tabPurchase Order`.`docstatus` = 1 and `tabPurchase Order`.`company` = "'+ doc.company +'" and `tabPurchase Order`.`status` != "Stopped" and ifnull(`tabPurchase Order`.`per_received`, 0) < 100 and `tabPurchase Order`.%(key)s LIKE "%s" ORDER BY `tabPurchase Order`.`name` DESC LIMIT 50';
|
||||
return 'SELECT DISTINCT `tabPurchase Order`.`name` FROM `tabPurchase Order` WHERE `tabPurchase Order`.`docstatus` = 1 and `tabPurchase Order`.`company` = "'+ doc.company +'" and `tabPurchase Order`.`status` != "Stopped" and ifnull(`tabPurchase Order`.`per_received`, 0) < 99.99 and `tabPurchase Order`.%(key)s LIKE "%s" ORDER BY `tabPurchase Order`.`name` DESC LIMIT 50';
|
||||
}
|
||||
|
||||
// QA INspection report get_query
|
||||
|
||||
Reference in New Issue
Block a user