[design] wip
This commit is contained in:
parent
2eed5a35e3
commit
f870527e7c
@ -51,7 +51,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
|
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
|
||||||
cur_frm.set_intro(intro_txt);
|
cur_frm.set_intro(intro_txt);
|
||||||
|
|
||||||
cur_frm.appframe.add_button(__('Chart of Cost Centers'),
|
cur_frm.add_custom_button(__('Chart of Cost Centers'),
|
||||||
function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
|
function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ cur_frm.cscript.refresh = function(doc) {
|
|||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
cur_frm.cscript.voucher_type(doc);
|
cur_frm.cscript.voucher_type(doc);
|
||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button(__('View Ledger'), function() {
|
cur_frm.add_custom_button(__('View Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"voucher_no": doc.name,
|
"voucher_no": doc.name,
|
||||||
"from_date": doc.posting_date,
|
"from_date": doc.posting_date,
|
||||||
|
@ -31,7 +31,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
frappe.boot.doctype_icons["Journal Voucher"]);
|
frappe.boot.doctype_icons["Journal Voucher"]);
|
||||||
|
|
||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button(__('View Ledger'), function() {
|
cur_frm.add_custom_button(__('View Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"voucher_no": doc.name,
|
"voucher_no": doc.name,
|
||||||
"from_date": doc.posting_date,
|
"from_date": doc.posting_date,
|
||||||
|
@ -49,7 +49,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
cur_frm.dashboard.reset();
|
cur_frm.dashboard.reset();
|
||||||
|
|
||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button('View Ledger', function() {
|
cur_frm.add_custom_button('View Ledger', function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"voucher_no": doc.name,
|
"voucher_no": doc.name,
|
||||||
"from_date": doc.posting_date,
|
"from_date": doc.posting_date,
|
||||||
@ -60,10 +60,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
frappe.set_route("query-report", "General Ledger");
|
frappe.set_route("query-report", "General Ledger");
|
||||||
}, "icon-table");
|
}, "icon-table");
|
||||||
|
|
||||||
var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
|
// var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
|
||||||
cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
|
// cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
|
||||||
|
|
||||||
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
|
||||||
|
|
||||||
if(cint(doc.update_stock)!=1) {
|
if(cint(doc.update_stock)!=1) {
|
||||||
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
|
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
|
||||||
|
@ -85,9 +85,6 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
|||||||
cur_frm.toggle_enable("exp_approver", doc.approval_status=="Draft");
|
cur_frm.toggle_enable("exp_approver", doc.approval_status=="Draft");
|
||||||
cur_frm.toggle_enable("approval_status", (doc.exp_approver==user && doc.docstatus==0));
|
cur_frm.toggle_enable("approval_status", (doc.exp_approver==user && doc.docstatus==0));
|
||||||
|
|
||||||
if(!doc.__islocal && user!=doc.exp_approver)
|
|
||||||
cur_frm.frm_head.appframe.set_title_right("");
|
|
||||||
|
|
||||||
if(doc.docstatus==0 && doc.exp_approver==user && doc.approval_status=="Approved")
|
if(doc.docstatus==0 && doc.exp_approver==user && doc.approval_status=="Approved")
|
||||||
cur_frm.savesubmit();
|
cur_frm.savesubmit();
|
||||||
|
|
||||||
@ -159,4 +156,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
|||||||
if(cint(frappe.boot.notification_settings && frappe.boot.notification_settings.expense_claim)) {
|
if(cint(frappe.boot.notification_settings && frappe.boot.notification_settings.expense_claim)) {
|
||||||
cur_frm.email_doc(frappe.boot.notification_settings.expense_claim_message);
|
cur_frm.email_doc(frappe.boot.notification_settings.expense_claim_message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,6 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(__("This Leave Application is pending approval. Only the Leave Apporver can update status."))
|
cur_frm.set_intro(__("This Leave Application is pending approval. Only the Leave Apporver can update status."))
|
||||||
cur_frm.toggle_enable("status", false);
|
cur_frm.toggle_enable("status", false);
|
||||||
if(!doc.__islocal) {
|
|
||||||
cur_frm.frm_head.appframe.set_title_right("");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(doc.status=="Approved") {
|
if(doc.status=="Approved") {
|
||||||
|
@ -43,7 +43,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
|
|||||||
show_stock_ledger: function() {
|
show_stock_ledger: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(this.frm.doc.docstatus===1) {
|
if(this.frm.doc.docstatus===1) {
|
||||||
this.frm.appframe.add_button(__("Stock Ledger"), function() {
|
cur_frm.add_custom_button(__("Stock Ledger"), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
voucher_no: me.frm.doc.name,
|
voucher_no: me.frm.doc.name,
|
||||||
from_date: me.frm.doc.posting_date,
|
from_date: me.frm.doc.posting_date,
|
||||||
@ -59,7 +59,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
|
|||||||
show_general_ledger: function() {
|
show_general_ledger: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(this.frm.doc.docstatus===1 && cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
|
if(this.frm.doc.docstatus===1 && cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
|
||||||
cur_frm.appframe.add_button(__('Accounting Ledger'), function() {
|
cur_frm.add_custom_button(__('Accounting Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
voucher_no: me.frm.doc.name,
|
voucher_no: me.frm.doc.name,
|
||||||
from_date: me.frm.doc.posting_date,
|
from_date: me.frm.doc.posting_date,
|
||||||
|
@ -31,7 +31,7 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
|
|||||||
frappe.boot.doctype_icons["Customer"], "btn-default");
|
frappe.boot.doctype_icons["Customer"], "btn-default");
|
||||||
this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity,
|
this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity,
|
||||||
frappe.boot.doctype_icons["Opportunity"], "btn-default");
|
frappe.boot.doctype_icons["Opportunity"], "btn-default");
|
||||||
this.frm.appframe.add_button(__("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.frm.doc.__islocal) {
|
if(!this.frm.doc.__islocal) {
|
||||||
|
@ -32,7 +32,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
cur_frm.add_custom_button(__('Set as Lost'),
|
cur_frm.add_custom_button(__('Set as Lost'),
|
||||||
cur_frm.cscript['Declare Order Lost'], "icon-exclamation", "btn-default");
|
cur_frm.cscript['Declare Order Lost'], "icon-exclamation", "btn-default");
|
||||||
}
|
}
|
||||||
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
|
@ -5,7 +5,7 @@ cur_frm.list_route = "Sales Browser/Item Group";
|
|||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
cur_frm.cscript.set_root_readonly(doc);
|
cur_frm.cscript.set_root_readonly(doc);
|
||||||
cur_frm.appframe.add_button(__("Item Group Tree"), function() {
|
cur_frm.add_custom_button(__("Item Group Tree"), function() {
|
||||||
frappe.set_route("Sales Browser", "Item Group");
|
frappe.set_route("Sales Browser", "Item Group");
|
||||||
}, "icon-sitemap")
|
}, "icon-sitemap")
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
|||||||
cur_frm.add_custom_button(__('Make Installation Note'), this.make_installation_note);
|
cur_frm.add_custom_button(__('Make Installation Note'), this.make_installation_note);
|
||||||
|
|
||||||
if (doc.docstatus==1) {
|
if (doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
this.show_stock_ledger();
|
this.show_stock_ledger();
|
||||||
this.show_general_ledger();
|
this.show_general_ledger();
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% if(!doc) { %}
|
{% if(!doc) { %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">{%= __("Item") %}</div>
|
<div class="col-sm-6">{%= __("Items") %}</div>
|
||||||
<div class="col-sm-2 text-right">{%= __("Qty") %}</div>
|
<div class="col-sm-2 text-right">{%= __("Qty") %}</div>
|
||||||
<div class="col-sm-2 text-right">{%= __("Rate") %}</div>
|
<div class="col-sm-2 text-right">{%= __("Rate") %}</div>
|
||||||
<div class="col-sm-2 text-right">{%= __("Amount") %}</div>
|
<div class="col-sm-2 text-right">{%= __("Amount") %}</div>
|
||||||
@ -14,13 +14,36 @@
|
|||||||
<br>{%= doc.item_name %}{% } %}
|
<br>{%= doc.item_name %}{% } %}
|
||||||
{% if(doc.item_name != doc.description) { %}
|
{% if(doc.item_name != doc.description) { %}
|
||||||
<p>{%= doc.description %}</p>{% } %}
|
<p>{%= doc.description %}</p>{% } %}
|
||||||
{% if(doc.sales_order || doc.against_sales_order) { %}
|
<div>
|
||||||
<p><span class="label label-default"
|
{% if(doc.sales_order || doc.against_sales_order) { %}
|
||||||
title="{%= __("Sales Order") %}">
|
<span class="label label-default"
|
||||||
<i class="icon-file"></i>
|
title="{%= __("Sales Order") %}">
|
||||||
{%= doc.sales_order || doc.against_sales_order %}
|
<i class="icon-file"></i>
|
||||||
</span></p>
|
{%= doc.sales_order || doc.against_sales_order %}
|
||||||
{% } %}
|
</span>
|
||||||
|
{% } %}
|
||||||
|
{% if(doc.warehouse) {
|
||||||
|
var label_class = "label-default",
|
||||||
|
title = "Warehouse",
|
||||||
|
actual_qty = (doc.doctype==="Sales Order"
|
||||||
|
? doc.projected_qty : doc.actual_qty);
|
||||||
|
if(actual_qty != undefined) {
|
||||||
|
if(actual_qty > doc.qty) {
|
||||||
|
var label_class = "label-success";
|
||||||
|
var title = "In Stock"
|
||||||
|
} else {
|
||||||
|
var title = "Not In Stock"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
<span style="margin-left: 10px;"
|
||||||
|
title="{%= title %}">
|
||||||
|
<span class="label {%= label_class %}">
|
||||||
|
{%= doc.warehouse %}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
{% } %}
|
||||||
|
</div>
|
||||||
{% include "templates/form_grid/includes/visible_cols.html" %}
|
{% include "templates/form_grid/includes/visible_cols.html" %}
|
||||||
{% if(doc.schedule_date) { %}
|
{% if(doc.schedule_date) { %}
|
||||||
<div><span title="{%= __("Reqd By Date") %}" class="label {%=
|
<div><span title="{%= __("Reqd By Date") %}" class="label {%=
|
||||||
@ -46,28 +69,6 @@
|
|||||||
%}
|
%}
|
||||||
{% include "templates/form_grid/includes/progress.html" %}
|
{% include "templates/form_grid/includes/progress.html" %}
|
||||||
{% } %}
|
{% } %}
|
||||||
{% if(doc.warehouse) {
|
|
||||||
var label_class = "label-default",
|
|
||||||
title = "Warehouse",
|
|
||||||
actual_qty = (doc.doctype==="Sales Order"
|
|
||||||
? doc.projected_qty : doc.actual_qty);
|
|
||||||
if(actual_qty != undefined) {
|
|
||||||
if(actual_qty > doc.qty) {
|
|
||||||
var label_class = "label-success";
|
|
||||||
var title = "In Stock"
|
|
||||||
} else {
|
|
||||||
var title = "Not In Stock"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%}
|
|
||||||
<div style="overflow:hidden; min-height: 25px;
|
|
||||||
white-space:nowrap; text-overflow: ellipsis;"
|
|
||||||
title="{%= title %}">
|
|
||||||
<span class="label {%= label_class %}">
|
|
||||||
{%= doc.warehouse %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% } %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- rate -->
|
<!-- rate -->
|
||||||
|
Loading…
Reference in New Issue
Block a user