Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait 2013-09-06 14:06:12 +05:30
commit 034380b004
4 changed files with 26 additions and 7 deletions

View File

@ -20,7 +20,7 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
1. Screenshots (annotated with what should change) 1. Screenshots (annotated with what should change)
1. Screenshots from other products if you want us to implement features present in other products. 1. Screenshots from other products if you want us to implement features present in other products.
1. Basically, the more you help us, the faster your request is likely to be completed. 1. Basically, the more you help us, the faster your request is likely to be completed.
1. A one line future request like **Implement Capacity Planning** will be closed. 1. A one line feature request like **Implement Capacity Planning** will be closed.
## Pull Requests ## Pull Requests

View File

@ -62,8 +62,18 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
if(cint(doc.update_stock)!=1) if(cint(doc.update_stock)!=1) {
cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']); // show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
var from_delivery_note = false;
from_delivery_note = cur_frm.get_doclist({parentfield: "entries"})
.some(function(item) {
return item.delivery_note ? true : false;
});
if(!from_delivery_note)
cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
}
if(doc.outstanding_amount!=0) if(doc.outstanding_amount!=0)
cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher); cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher);

View File

@ -33,9 +33,8 @@ def boot_session(bootinfo):
# load subscription info # load subscription info
import conf import conf
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode', for key in ['max_users', 'expires_on', 'max_space', 'status', 'commercial_support']:
'commercial_support']: if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
from `tabCompany`""", as_dict=1, update={"doctype":":Company"}) from `tabCompany`""", as_dict=1, update={"doctype":":Company"})

View File

@ -16,7 +16,17 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
refresh: function(doc, dt, dn) { refresh: function(doc, dt, dn) {
this._super(); this._super();
if(!doc.__billing_complete && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice); if(!doc.__billing_complete && doc.docstatus==1) {
// show Make Invoice button only if Delivery Note is not created from Sales Invoice
var from_sales_invoice = false;
from_sales_invoice = cur_frm.get_doclist({parentfield: "delivery_note_details"})
.some(function(item) {
return item.prevdoc_doctype==="Sales Invoice" ? true : false;
});
if(!from_sales_invoice)
cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice);
}
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
cur_frm.add_custom_button('Make Installation Note', this.make_installation_note); cur_frm.add_custom_button('Make Installation Note', this.make_installation_note);