mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n
This commit is contained in:
@@ -26,20 +26,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
});
|
||||
|
||||
if(!from_sales_invoice)
|
||||
cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice);
|
||||
cur_frm.add_custom_button(wn._('Make Invoice'), this.make_sales_invoice);
|
||||
}
|
||||
|
||||
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(wn._('Make Installation Note'), this.make_installation_note);
|
||||
|
||||
if (doc.docstatus==1) {
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
|
||||
this.show_stock_ledger();
|
||||
this.show_general_ledger();
|
||||
}
|
||||
|
||||
if(doc.docstatus==0 && !doc.__islocal) {
|
||||
cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
|
||||
cur_frm.add_custom_button(wn._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
|
||||
}
|
||||
|
||||
set_print_hide(doc, dt, dn);
|
||||
|
||||
@@ -124,7 +124,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
|
||||
// in the "alternate_description" field
|
||||
cur_frm.cscript.add_image = function(doc, dt, dn) {
|
||||
if(!doc.image) {
|
||||
msgprint('Please select an "Image" first');
|
||||
msgprint(wn._('Please select an "Image" first'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ cur_frm.cscript.weight_to_validate = function(doc,cdt,cdn){
|
||||
|
||||
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom)
|
||||
{
|
||||
alert('Weight is mentioned,\nPlease mention "Weight UOM" too');
|
||||
alert(wn._('Weight is mentioned,\nPlease mention "Weight UOM" too'));
|
||||
validated=0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,21 +27,21 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
|
||||
if(doc.docstatus == 1 && doc.status != 'Stopped') {
|
||||
if(doc.material_request_type === "Purchase")
|
||||
cur_frm.add_custom_button("Make Supplier Quotation",
|
||||
cur_frm.add_custom_button(wn._("Make Supplier Quotation"),
|
||||
this.make_supplier_quotation);
|
||||
|
||||
if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
|
||||
cur_frm.add_custom_button("Transfer Material", this.make_stock_entry);
|
||||
cur_frm.add_custom_button(wn._("Transfer Material"), this.make_stock_entry);
|
||||
|
||||
if(flt(doc.per_ordered, 2) < 100) {
|
||||
if(doc.material_request_type === "Purchase")
|
||||
cur_frm.add_custom_button('Make Purchase Order',
|
||||
cur_frm.add_custom_button(wn._('Make Purchase Order'),
|
||||
this.make_purchase_order);
|
||||
|
||||
cur_frm.add_custom_button('Stop Material Request',
|
||||
cur_frm.add_custom_button(wn._('Stop Material Request'),
|
||||
cur_frm.cscript['Stop Material Request']);
|
||||
}
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
}
|
||||
|
||||
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
||||
cur_frm.add_custom_button('Unstop Material Request',
|
||||
cur_frm.add_custom_button(wn._('Unstop Material Request'),
|
||||
cur_frm.cscript['Unstop Material Request']);
|
||||
|
||||
},
|
||||
@@ -154,12 +154,12 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur
|
||||
cur_frm.cscript.qty = function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
if (flt(d.qty) < flt(d.min_order_qty))
|
||||
alert("Warning: Material Requested Qty is less than Minimum Order Qty");
|
||||
alert(wn._("Warning: Material Requested Qty is less than Minimum Order Qty"));
|
||||
};
|
||||
|
||||
cur_frm.cscript['Stop Material Request'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
var check = confirm("Do you really want to STOP this Material Request?");
|
||||
var check = confirm(wn._("Do you really want to STOP this Material Request?"));
|
||||
|
||||
if (check) {
|
||||
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
|
||||
@@ -170,7 +170,7 @@ cur_frm.cscript['Stop Material Request'] = function() {
|
||||
|
||||
cur_frm.cscript['Unstop Material Request'] = function(){
|
||||
var doc = cur_frm.doc;
|
||||
var check = confirm("Do you really want to UNSTOP this Material Request?");
|
||||
var check = confirm(wn._("Do you really want to UNSTOP this Material Request?"));
|
||||
|
||||
if (check) {
|
||||
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
|
||||
|
||||
@@ -45,13 +45,13 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.validate_case_nos = function(doc) {
|
||||
doc = locals[doc.doctype][doc.name];
|
||||
if(cint(doc.from_case_no)==0) {
|
||||
msgprint("Case No. cannot be 0")
|
||||
msgprint(wn._("Case No. cannot be 0"))
|
||||
validated = false;
|
||||
} else if(!cint(doc.to_case_no)) {
|
||||
doc.to_case_no = doc.from_case_no;
|
||||
refresh_field('to_case_no');
|
||||
} else if(cint(doc.to_case_no) < cint(doc.from_case_no)) {
|
||||
msgprint("'To Case No.' cannot be less than 'From Case No.'");
|
||||
msgprint(wn._("'To Case No.' cannot be less than 'From Case No.'"));
|
||||
validated = false;
|
||||
}
|
||||
}
|
||||
@@ -72,14 +72,14 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) {
|
||||
for(var i=0; i<ps_detail.length; i++) {
|
||||
for(var j=0; j<ps_detail.length; j++) {
|
||||
if(i!=j && ps_detail[i].item_code && ps_detail[i].item_code==ps_detail[j].item_code) {
|
||||
msgprint("You have entered duplicate items. Please rectify and try again.");
|
||||
msgprint(wn._("You have entered duplicate items. Please rectify and try again."));
|
||||
validated = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(flt(ps_detail[i].qty)<=0) {
|
||||
msgprint("Invalid quantity specified for item " + ps_detail[i].item_code +
|
||||
". Quantity should be greater than 0.");
|
||||
msgprint(wn._("Invalid quantity specified for item ") + ps_detail[i].item_code +
|
||||
"."+wn._(" Quantity should be greater than 0."));
|
||||
validated = false;
|
||||
}
|
||||
}
|
||||
@@ -95,9 +95,9 @@ cur_frm.cscript.calc_net_total_pkg = function(doc, ps_detail) {
|
||||
for(var i=0; i<ps_detail.length; i++) {
|
||||
var item = ps_detail[i];
|
||||
if(item.weight_uom != doc.net_weight_uom) {
|
||||
msgprint("Different UOM for items will lead to incorrect \
|
||||
(Total) Net Weight value. Make sure that Net Weight of each item is \
|
||||
in the same UOM.")
|
||||
msgprint(wn._("Different UOM for items will lead to incorrect")+
|
||||
wn._("(Total) Net Weight value. Make sure that Net Weight of each item is")+
|
||||
wn._("in the same UOM."))
|
||||
validated = false;
|
||||
}
|
||||
net_weight_pkg += flt(item.net_weight) * flt(item.qty);
|
||||
|
||||
@@ -17,15 +17,15 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
|
||||
|
||||
if(this.frm.doc.docstatus == 1) {
|
||||
if(!this.frm.doc.__billing_complete) {
|
||||
cur_frm.add_custom_button('Make Purchase Invoice',
|
||||
cur_frm.add_custom_button(wn._('Make Purchase Invoice'),
|
||||
this.make_purchase_invoice);
|
||||
}
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
|
||||
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript['Send SMS']);
|
||||
|
||||
this.show_stock_ledger();
|
||||
this.show_general_ledger();
|
||||
} else {
|
||||
cur_frm.add_custom_button(wn._('From Purchase Order'),
|
||||
cur_frm.add_custom_button(wn._(wn._('From Purchase Order')),
|
||||
function() {
|
||||
wn.model.map_current_doc({
|
||||
method: "buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
|
||||
@@ -140,7 +140,7 @@ cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('batch_no').get_q
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert("Please enter Item Code.");
|
||||
alert(wn._("Please enter Item Code."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
if(this.frm.doc.docstatus === 1 &&
|
||||
wn.boot.profile.can_create.indexOf("Journal Voucher")!==-1) {
|
||||
if(this.frm.doc.purpose === "Sales Return") {
|
||||
this.frm.add_custom_button("Make Credit Note", function() { me.make_return_jv(); });
|
||||
this.frm.add_custom_button(wn._("Make Credit Note"), function() { me.make_return_jv(); });
|
||||
this.add_excise_button();
|
||||
} else if(this.frm.doc.purpose === "Purchase Return") {
|
||||
this.frm.add_custom_button("Make Debit Note", function() { me.make_return_jv(); });
|
||||
this.frm.add_custom_button(wn._("Make Debit Note"), function() { me.make_return_jv(); });
|
||||
this.add_excise_button();
|
||||
}
|
||||
}
|
||||
@@ -195,7 +195,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
|
||||
add_excise_button: function() {
|
||||
if(wn.boot.control_panel.country === "India")
|
||||
this.frm.add_custom_button("Make Excise Invoice", function() {
|
||||
this.frm.add_custom_button(wn._("Make Excise Invoice"), function() {
|
||||
var excise = wn.model.make_new_doc_and_get_name('Journal Voucher');
|
||||
excise = locals['Journal Voucher'][excise];
|
||||
excise.voucher_type = 'Excise Voucher';
|
||||
@@ -318,7 +318,7 @@ cur_frm.fields_dict['mtn_details'].grid.get_field('batch_no').get_query = functi
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msgprint("Please enter Item Code to get batch no");
|
||||
msgprint(wn._("Please enter Item Code to get batch no"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.validate_items = function(doc) {
|
||||
cl = getchildren('Stock Entry Detail', doc.name, 'mtn_details');
|
||||
if (!cl.length) {
|
||||
alert("Item table can not be blank");
|
||||
alert(wn._("Item table can not be blank"));
|
||||
validated = false;
|
||||
}
|
||||
}
|
||||
@@ -391,4 +391,4 @@ cur_frm.fields_dict.customer.get_query = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict.supplier.get_query = function(doc, cdt, cdn) {
|
||||
return{ query:"controllers.queries.supplier_query" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,13 +48,13 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
this.show_download_template();
|
||||
this.show_upload();
|
||||
if(this.frm.doc.reconciliation_json) {
|
||||
this.frm.set_intro("You can submit this Stock Reconciliation.");
|
||||
this.frm.set_intro(wn._("You can submit this Stock Reconciliation."));
|
||||
} else {
|
||||
this.frm.set_intro("Download the Template, fill appropriate data and \
|
||||
attach the modified file.");
|
||||
this.frm.set_intro(wn._("Download the Template, fill appropriate data and \
|
||||
attach the modified file."));
|
||||
}
|
||||
} else if(this.frm.doc.docstatus == 1) {
|
||||
this.frm.set_intro("Cancelling this Stock Reconciliation will nullify its effect.");
|
||||
this.frm.set_intro(wn._("Cancelling this Stock Reconciliation will nullify its effect."));
|
||||
this.show_stock_ledger();
|
||||
this.show_general_ledger();
|
||||
} else {
|
||||
@@ -66,20 +66,20 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
|
||||
show_download_template: function() {
|
||||
var me = this;
|
||||
this.frm.add_custom_button("Download Template", function() {
|
||||
this.title = "Stock Reconcilation Template";
|
||||
wn.tools.downloadify([["Stock Reconciliation"],
|
||||
this.frm.add_custom_button(wn._("Download Template"), function() {
|
||||
this.title = wn._("Stock Reconcilation Template");
|
||||
wn.tools.downloadify([[wn._("Stock Reconciliation")],
|
||||
["----"],
|
||||
["Stock Reconciliation can be used to update the stock on a particular date,"
|
||||
+ " usually as per physical inventory."],
|
||||
["When submitted, the system creates difference entries"
|
||||
+ " to set the given stock and valuation on this date."],
|
||||
["It can also be used to create opening stock entries and to fix stock value."],
|
||||
[wn._("Stock Reconciliation can be used to update the stock on a particular date, ")
|
||||
+ wn._("usually as per physical inventory.")],
|
||||
[wn._("When submitted, the system creates difference entries ")
|
||||
+ wn._("to set the given stock and valuation on this date.")],
|
||||
[wn._("It can also be used to create opening stock entries and to fix stock value.")],
|
||||
["----"],
|
||||
["Notes:"],
|
||||
["Item Code and Warehouse should already exist."],
|
||||
["You can update either Quantity or Valuation Rate or both."],
|
||||
["If no change in either Quantity or Valuation Rate, leave the cell blank."],
|
||||
[wn._("Notes:")],
|
||||
[wn._("Item Code and Warehouse should already exist.")],
|
||||
[wn._("You can update either Quantity or Valuation Rate or both.")],
|
||||
[wn._("If no change in either Quantity or Valuation Rate, leave the cell blank.")],
|
||||
["----"],
|
||||
["Item Code", "Warehouse", "Quantity", "Valuation Rate"]], null, this);
|
||||
return false;
|
||||
@@ -113,8 +113,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
show_download_reconciliation_data: function() {
|
||||
var me = this;
|
||||
if(this.frm.doc.reconciliation_json) {
|
||||
this.frm.add_custom_button("Download Reconcilation Data", function() {
|
||||
this.title = "Stock Reconcilation Data";
|
||||
this.frm.add_custom_button(wn._("Download Reconcilation Data"), function() {
|
||||
this.title = wn._("Stock Reconcilation Data");
|
||||
wn.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this);
|
||||
return false;
|
||||
}, "icon-download");
|
||||
|
||||
@@ -7,11 +7,11 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
|
||||
cur_frm.cscript.merge = function(doc, cdt, cdn) {
|
||||
if (!doc.merge_with) {
|
||||
msgprint("Please enter the warehouse to which you want to merge?");
|
||||
msgprint(wn._("Please enter the warehouse to which you want to merge?"));
|
||||
return;
|
||||
}
|
||||
var check = confirm("Are you sure you want to merge this warehouse into "
|
||||
+ doc.merge_with + "?");
|
||||
var check = confirm(wn._("Are you sure you want to merge this warehouse into "
|
||||
+ doc.merge_with + "?"));
|
||||
if (check) {
|
||||
return $c_obj(make_doclist(cdt, cdn), 'merge_warehouses', '', '');
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
wn.pages['stock-ageing'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: 'Stock Ageing',
|
||||
title: wn._('Stock Ageing'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ wn.require("app/js/stock_grid_report.js");
|
||||
erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
this._super({
|
||||
title: "Stock Ageing",
|
||||
title: wn._("Stock Ageing"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -30,37 +30,37 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
},
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "name", name: "Item", field: "name", width: 300,
|
||||
{id: "name", name: wn._("Item"), field: "name", width: 300,
|
||||
link_formatter: {
|
||||
open_btn: true,
|
||||
doctype: '"Item"'
|
||||
}},
|
||||
{id: "item_name", name: "Item Name", field: "item_name",
|
||||
{id: "item_name", name: wn._("Item Name"), field: "item_name",
|
||||
width: 100, formatter: this.text_formatter},
|
||||
{id: "description", name: "Description", field: "description",
|
||||
{id: "description", name: wn._("Description"), field: "description",
|
||||
width: 200, formatter: this.text_formatter},
|
||||
{id: "brand", name: "Brand", field: "brand", width: 100},
|
||||
{id: "average_age", name: "Average Age", field: "average_age",
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "average_age", name: wn._("Average Age"), field: "average_age",
|
||||
formatter: this.currency_formatter},
|
||||
{id: "earliest", name: "Earliest", field: "earliest",
|
||||
{id: "earliest", name: wn._("Earliest"), field: "earliest",
|
||||
formatter: this.currency_formatter},
|
||||
{id: "latest", name: "Latest", field: "latest",
|
||||
{id: "latest", name: wn._("Latest"), field: "latest",
|
||||
formatter: this.currency_formatter},
|
||||
{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
|
||||
];
|
||||
},
|
||||
filters: [
|
||||
{fieldtype:"Select", label: "Warehouse", link:"Warehouse",
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse..."},
|
||||
{fieldtype:"Select", label: "Brand", link:"Brand",
|
||||
{fieldtype:"Select", label: wn._("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val;
|
||||
}, link_formatter: {filter_input: "brand"}},
|
||||
{fieldtype:"Select", label: "Plot By",
|
||||
{fieldtype:"Select", label: wn._("Plot By"),
|
||||
options: ["Average Age", "Earliest", "Latest"]},
|
||||
{fieldtype:"Date", label: "To Date"},
|
||||
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: "Reset Filters"}
|
||||
{fieldtype:"Date", label: wn._("To Date")},
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
wn.pages['stock-analytics'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: 'Stock Analytics',
|
||||
title: wn._('Stock Analytics'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ wn.require("app/js/stock_analytics.js");
|
||||
wn.pages['stock-balance'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: 'Stock Balance',
|
||||
title: wn._('Stock Balance'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -20,58 +20,58 @@ wn.pages['stock-balance'].onload = function(wrapper) {
|
||||
erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
init: function(wrapper) {
|
||||
this._super(wrapper, {
|
||||
title: "Stock Balance",
|
||||
title: wn._("Stock Balance"),
|
||||
doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
|
||||
"Stock Entry", "Project"],
|
||||
});
|
||||
},
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "name", name: "Item", field: "name", width: 300,
|
||||
{id: "name", name: wn._("Item"), field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{id: "item_name", name: "Item Name", field: "item_name", width: 100},
|
||||
{id: "description", name: "Description", field: "description", width: 200,
|
||||
{id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100},
|
||||
{id: "description", name: wn._("Description"), field: "description", width: 200,
|
||||
formatter: this.text_formatter},
|
||||
{id: "brand", name: "Brand", field: "brand", width: 100},
|
||||
{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
|
||||
{id: "opening_qty", name: "Opening Qty", field: "opening_qty", width: 100,
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "opening_qty", name: wn._("Opening Qty"), field: "opening_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "inflow_qty", name: "In Qty", field: "inflow_qty", width: 100,
|
||||
{id: "inflow_qty", name: wn._("In Qty"), field: "inflow_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "outflow_qty", name: "Out Qty", field: "outflow_qty", width: 100,
|
||||
{id: "outflow_qty", name: wn._("Out Qty"), field: "outflow_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "closing_qty", name: "Closing Qty", field: "closing_qty", width: 100,
|
||||
{id: "closing_qty", name: wn._("Closing Qty"), field: "closing_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
|
||||
{id: "opening_value", name: "Opening Value", field: "opening_value", width: 100,
|
||||
{id: "opening_value", name: wn._("Opening Value"), field: "opening_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "inflow_value", name: "In Value", field: "inflow_value", width: 100,
|
||||
{id: "inflow_value", name: wn._("In Value"), field: "inflow_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "outflow_value", name: "Out Value", field: "outflow_value", width: 100,
|
||||
{id: "outflow_value", name: wn._("Out Value"), field: "outflow_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "closing_value", name: "Closing Value", field: "closing_value", width: 100,
|
||||
{id: "closing_value", name: wn._("Closing Value"), field: "closing_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
];
|
||||
},
|
||||
|
||||
filters: [
|
||||
{fieldtype:"Select", label: "Brand", link:"Brand",
|
||||
{fieldtype:"Select", label: wn._("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val || item._show;
|
||||
}, link_formatter: {filter_input: "brand"}},
|
||||
{fieldtype:"Select", label: "Warehouse", link:"Warehouse",
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse...", filter: function(val, item, opts, me) {
|
||||
return me.apply_zero_filter(val, item, opts, me);
|
||||
}},
|
||||
{fieldtype:"Select", label: "Project", link:"Project",
|
||||
{fieldtype:"Select", label: wn._("Project"), link:"Project",
|
||||
default_value: "Select Project...", filter: function(val, item, opts, me) {
|
||||
return me.apply_zero_filter(val, item, opts, me);
|
||||
}, link_formatter: {filter_input: "project"}},
|
||||
{fieldtype:"Date", label: "From Date"},
|
||||
{fieldtype:"Label", label: "To"},
|
||||
{fieldtype:"Date", label: "To Date"},
|
||||
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: "Reset Filters"}
|
||||
{fieldtype:"Date", label: wn._("From Date")},
|
||||
{fieldtype:"Label", label: wn._("To")},
|
||||
{fieldtype:"Date", label: wn._("To Date")},
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
],
|
||||
|
||||
setup_plot_check: function() {
|
||||
|
||||
@@ -111,7 +111,7 @@ wn.module_page["Stock"] = [
|
||||
"label": wn._("Stock Settings"),
|
||||
"route": "Form/Stock Settings",
|
||||
"doctype":"Stock Settings",
|
||||
"description": "Settings for Stock Module"
|
||||
"description": wn._("Settings for Stock Module")
|
||||
},
|
||||
{
|
||||
"route":"Sales Browser/Item Group",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
wn.pages['stock-ledger'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: 'Stock Ledger',
|
||||
title: wn._('Stock Ledger'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ wn.require("app/js/stock_grid_report.js");
|
||||
erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
this._super({
|
||||
title: "Stock Ledger",
|
||||
title: wn._("Stock Ledger"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -28,29 +28,29 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
setup_columns: function() {
|
||||
this.hide_balance = (this.is_default("item_code") || this.voucher_no) ? true : false;
|
||||
this.columns = [
|
||||
{id: "posting_datetime", name: "Posting Date", field: "posting_datetime", width: 120,
|
||||
{id: "posting_datetime", name: wn._("Posting Date"), field: "posting_datetime", width: 120,
|
||||
formatter: this.date_formatter},
|
||||
{id: "item_code", name: "Item Code", field: "item_code", width: 160,
|
||||
{id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160,
|
||||
link_formatter: {
|
||||
filter_input: "item_code",
|
||||
open_btn: true,
|
||||
doctype: '"Item"',
|
||||
}},
|
||||
{id: "description", name: "Description", field: "description", width: 200,
|
||||
{id: "description", name: wn._("Description"), field: "description", width: 200,
|
||||
formatter: this.text_formatter},
|
||||
{id: "warehouse", name: "Warehouse", field: "warehouse", width: 100,
|
||||
{id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100,
|
||||
link_formatter: {filter_input: "warehouse"}},
|
||||
{id: "brand", name: "Brand", field: "brand", width: 100},
|
||||
{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
|
||||
{id: "qty", name: "Qty", field: "qty", width: 100,
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "qty", name: wn._("Qty"), field: "qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "balance", name: "Balance Qty", field: "balance", width: 100,
|
||||
{id: "balance", name: wn._("Balance Qty"), field: "balance", width: 100,
|
||||
formatter: this.currency_formatter,
|
||||
hidden: this.hide_balance},
|
||||
{id: "balance_value", name: "Balance Value", field: "balance_value", width: 100,
|
||||
{id: "balance_value", name: wn._("Balance Value"), field: "balance_value", width: 100,
|
||||
formatter: this.currency_formatter, hidden: this.hide_balance},
|
||||
{id: "voucher_type", name: "Voucher Type", field: "voucher_type", width: 120},
|
||||
{id: "voucher_no", name: "Voucher No", field: "voucher_no", width: 160,
|
||||
{id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120},
|
||||
{id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160,
|
||||
link_formatter: {
|
||||
filter_input: "voucher_no",
|
||||
open_btn: true,
|
||||
@@ -60,11 +60,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
|
||||
},
|
||||
filters: [
|
||||
{fieldtype:"Select", label: "Warehouse", link:"Warehouse",
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse...", filter: function(val, item, opts) {
|
||||
return item.warehouse == val || val == opts.default_value;
|
||||
}},
|
||||
{fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...",
|
||||
{fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...",
|
||||
filter: function(val, item, opts) {
|
||||
return item.item_code == val || !val;
|
||||
}},
|
||||
@@ -72,20 +72,20 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val || item._show;
|
||||
}, link_formatter: {filter_input: "brand"}},
|
||||
{fieldtype:"Data", label: "Voucher No",
|
||||
{fieldtype:"Data", label: wn._("Voucher No"),
|
||||
filter: function(val, item, opts) {
|
||||
if(!val) return true;
|
||||
return (item.voucher_no && item.voucher_no.indexOf(val)!=-1);
|
||||
}},
|
||||
{fieldtype:"Date", label: "From Date", filter: function(val, item) {
|
||||
{fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) {
|
||||
return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Label", label: "To"},
|
||||
{fieldtype:"Date", label: "To Date", filter: function(val, item) {
|
||||
{fieldtype:"Label", label: wn._("To")},
|
||||
{fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) {
|
||||
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: "Reset Filters"}
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
wn.pages['stock-level'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: 'Stock Level',
|
||||
title: wn._('Stock Level'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
var me = this;
|
||||
|
||||
this._super({
|
||||
title: "Stock Level",
|
||||
title: wn._("Stock Level"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -37,70 +37,70 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
Projected Qty = Actual Qty + Planned Qty + Requested Qty \
|
||||
+ Ordered Qty - Reserved Qty </li> \
|
||||
<ul> \
|
||||
<li>Actual Qty: Quantity available in the warehouse. </li> \
|
||||
<li>Planned Qty: Quantity, for which, Production Order has been raised, \
|
||||
but is pending to be manufactured. </li> \
|
||||
<li>Requested Qty: Quantity requested for purchase, but not ordered. </li> \
|
||||
<li>Ordered Qty: Quantity ordered for purchase, but not received.</li> \
|
||||
<li>Reserved Qty: Quantity ordered for sale, but not delivered. </li> \
|
||||
</ul> \
|
||||
<li>"+wn._("Actual Qty: Quantity available in the warehouse.") +"</li>"+
|
||||
"<li>"+wn._("Planned Qty: Quantity, for which, Production Order has been raised,")+
|
||||
wn._("but is pending to be manufactured.")+ "</li> " +
|
||||
"<li>"+wn._("Requested Qty: Quantity requested for purchase, but not ordered.") + "</li>" +
|
||||
"<li>" + wn._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "</li>" +
|
||||
"<li>" + wn._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "</li>" +
|
||||
"</ul> \
|
||||
</ul>");
|
||||
});
|
||||
},
|
||||
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "item_code", name: "Item Code", field: "item_code", width: 160,
|
||||
{id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160,
|
||||
link_formatter: {
|
||||
filter_input: "item_code",
|
||||
open_btn: true,
|
||||
doctype: '"Item"',
|
||||
}},
|
||||
{id: "item_name", name: "Item Name", field: "item_name", width: 100,
|
||||
{id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100,
|
||||
formatter: this.text_formatter},
|
||||
{id: "description", name: "Description", field: "description", width: 200,
|
||||
{id: "description", name: wn._("Description"), field: "description", width: 200,
|
||||
formatter: this.text_formatter},
|
||||
{id: "brand", name: "Brand", field: "brand", width: 100,
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100,
|
||||
link_formatter: {filter_input: "brand"}},
|
||||
{id: "warehouse", name: "Warehouse", field: "warehouse", width: 100,
|
||||
{id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100,
|
||||
link_formatter: {filter_input: "warehouse"}},
|
||||
{id: "uom", name: "UOM", field: "uom", width: 60},
|
||||
{id: "actual_qty", name: "Actual Qty",
|
||||
{id: "uom", name: wn._("UOM"), field: "uom", width: 60},
|
||||
{id: "actual_qty", name: wn._("Actual Qty"),
|
||||
field: "actual_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "planned_qty", name: "Planned Qty",
|
||||
{id: "planned_qty", name: wn._("Planned Qty"),
|
||||
field: "planned_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "requested_qty", name: "Requested Qty",
|
||||
{id: "requested_qty", name: wn._("Requested Qty"),
|
||||
field: "requested_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "ordered_qty", name: "Ordered Qty",
|
||||
{id: "ordered_qty", name: wn._("Ordered Qty"),
|
||||
field: "ordered_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "reserved_qty", name: "Reserved Qty",
|
||||
{id: "reserved_qty", name: wn._("Reserved Qty"),
|
||||
field: "reserved_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "projected_qty", name: "Projected Qty",
|
||||
{id: "projected_qty", name: wn._("Projected Qty"),
|
||||
field: "projected_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "re_order_level", name: "Re-Order Level",
|
||||
{id: "re_order_level", name: wn._("Re-Order Level"),
|
||||
field: "re_order_level", width: 80, formatter: this.currency_formatter},
|
||||
{id: "re_order_qty", name: "Re-Order Qty",
|
||||
{id: "re_order_qty", name: wn._("Re-Order Qty"),
|
||||
field: "re_order_qty", width: 80, formatter: this.currency_formatter},
|
||||
];
|
||||
},
|
||||
|
||||
filters: [
|
||||
{fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...",
|
||||
{fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...",
|
||||
filter: function(val, item, opts) {
|
||||
return item.item_code == val || !val;
|
||||
}},
|
||||
|
||||
{fieldtype:"Select", label: "Warehouse", link:"Warehouse",
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse...", filter: function(val, item, opts) {
|
||||
return item.warehouse == val || val == opts.default_value;
|
||||
}},
|
||||
|
||||
{fieldtype:"Select", label: "Brand", link:"Brand",
|
||||
{fieldtype:"Select", label: wn._("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val;
|
||||
}},
|
||||
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: "Reset Filters"}
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
|
||||
@@ -5,14 +5,14 @@ wn.query_reports["Batch-Wise Balance History"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"label": "From Date",
|
||||
"label": wn._("From Date"),
|
||||
"fieldtype": "Date",
|
||||
"width": "80",
|
||||
"default": sys_defaults.year_start_date,
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": "To Date",
|
||||
"label": wn._("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"width": "80",
|
||||
"default": wn.datetime.get_today()
|
||||
|
||||
@@ -5,13 +5,13 @@ wn.query_reports["Itemwise Recommended Reorder Level"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"label": "From Date",
|
||||
"label": wn._("From Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": sys_defaults.year_start_date
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": "To Date",
|
||||
"label": wn._("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": get_today()
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ wn.query_reports["Warehouse-Wise Stock Balance"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"label": "From Date",
|
||||
"label": wn._("From Date"),
|
||||
"fieldtype": "Date",
|
||||
"width": "80",
|
||||
"default": sys_defaults.year_start_date,
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": "To Date",
|
||||
"label": wn._("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"width": "80",
|
||||
"default": wn.datetime.get_today()
|
||||
|
||||
Reference in New Issue
Block a user