Merge branch 'v5.0' into foreign_currency_calc

This commit is contained in:
Nabin Hait 2015-01-22 12:15:06 +05:30
commit 0c8bde5805
22 changed files with 94 additions and 429 deletions

View File

@ -1,349 +0,0 @@
{
"country_code": "in",
"name": "Indian Chart of Accounts - Schedule VI",
"is_active": "Yes",
"tree": {
"Assets": {
"Current Assets": {
"Cash And Cash Equivalent": {
"Bank Balance": {
"Balance Account": {},
"Balance Account 9876543211": {}
},
"Cash-In-Hand": {
"Cash Balance": {
"account_type": "Cash"
},
"Petty Cash Balance": {
"account_type": "Cash"
},
"account_type": "Cash"
},
"Cheques On Hand": {
"Cheque With Account": {}
}
},
"Current Investment": {
"In Short Term Fixed Deposits": {},
"Investment In Debentures And Bonds": {},
"Investment In Equity": {},
"Investment In Government Securities": {},
"Investment In Mutual Fund": {},
"Investment In Partnership Firm": {},
"Investment In Preference Shares": {}
},
"Inventories": {
"account_type": "Stock",
"group_or_ledger": "Group"
},
"Other Current Assets": {
"Duties and Taxes": {
"Excise Duty Receivable": {
"Education Cess Receivable On Excise Duty": {},
"Excise Duty Receivable": {},
"Higher Education Cess Receivable On Excise Duty": {}
},
"Sales Tax Receivable": {},
"Service Tax Receivable": {
"Education Cess Receivable On Service Tax": {},
"Higher Education Cess Receivable On Service Tax": {},
"Service Tax Receivable": {}
},
"TDS Receivable": {},
"VAT Receivable": {}
},
"Miscellaneous Expense to the Extent Not Written Off": {
"Preliminary Expense": {}
}
},
"Short Terms Loans And Advances": {
"Advances with Revenue Authority": {
"Advance Income Tax/Refund Due": {},
"Advance To Suppliers": {},
"Balance With Revenue Authorities (Indirect Taxes)": {},
"Prepaid Expenses": {}
},
"Loans And Advances From Related Parties": {
"Doubtful": {},
"Other Advances Unsecured and Considered as Good": {
"Unsecured Recoverable in Cash or in Kind or for Value to be Received": {}
},
"Secured, Considered Good": {
"Advance To Associate Concerns": {}
}
}
},
"Trade Recievables": {
"Others": {
"Doubtful": {},
"Secured, Considered Good": {},
"Unsecured, Considered Good": {}
},
"Outstanding For More Than Six Months": {
"Doubtful": {},
"Secured, Considered Good": {},
"Unsecured, Considered Good": {}
},
"Sundry Debtors": {
"account_type": "Receivable"
}
}
},
"Non-Current Assets": {
"Deferred Tax Assets (Net)": {},
"Fixed Assets": {
"Capital Work-In-Progress": {
"Building Under Construction": {}
},
"Intangible Assets": {
"Goodwill": {}
},
"Intangible Assets Under Development": {},
"Tangible Assets": {
"Buildings": {},
"Computer/Laptops": {},
"Furnitures And Fixtures": {},
"Land": {},
"Office Equipments": {},
"Plant And Equipments": {},
"Vehicles": {}
}
},
"Long Term Loans And Advances": {
"Capital Assets": {
"Doubtful": {},
"Secured, Considered Good": {},
"Unsecured, Considered Good": {}
},
"Loans And Advances To Related Parties": {},
"Other Loans And Advances": {},
"Security Deposit": {
"Doubtful": {},
"Secured, Considered Good": {
"Earnest Money Deposit": {},
"Other Deposit": {}
},
"Unsecured, Considered Good": {}
}
},
"Non-Current Investments": {
"Investment In Debentures And Bonds": {},
"Investment In Equity Instrument": {},
"Investment In Government Or Trust Securities": {},
"Investment In Mutual Fund": {},
"Investment In Partnership Firm": {},
"Investment In Preference Shares": {},
"Investment In Property": {},
"Other": {
"Fixed Deposit With Banks-Earmarked": {},
"Gold": {}
}
},
"Other Non Current Assets": {
"Long Term Trade Recievables": {
"Doubtful": {},
"Secured, Considered Good": {},
"Unsecured, Considered Good": {}
},
"Miscellaneous Exps to the Extent Not Written Off": {
"Preliminery Expense": {},
"Software": {}
},
"Others": {}
}
},
"root_type": "Asset"
},
"Equity And Liabilities": {
"Current Liabilities": {
"Other Current Liabilities": {
"Advance From Customers": {},
"Duties and Taxes": {
"Central Sales Tax Payable": {},
"Excise Duty Payable": {
"Education Cess Payable On Excise Duty": {},
"Excise Duty Payable": {},
"Higher Education Cess Payable On Excise Duty": {}
},
"Service Tax Payable": {
"Education Cess Payable On Service Tax": {},
"Higher Education Cess Payable On Service Tax": {},
"Service Tax Payable": {}
},
"TDS Paybale": {},
"VAT Payable": {}
},
"Out Standing Cheques for Clearance": {}
},
"Short Term Borrowings": {
"Depsoits": {},
"Loans And Advances From Related Parties": {},
"Others": {},
"Secured Loans From Bank": {
"Bank Loan (Short Term)": {}
}
},
"Short Term Provisions": {
"Other Provisions": {
"Electricity And Power Charges Payable": {},
"Employee Providend Fund Payable": {},
"Internet Expenses Payable": {},
"Mobile Expenses Payable": {},
"Provision For Expenses": {},
"Provision For Taxation": {},
"Secueity Expenses Payable": {},
"Telephone Expenses Payable": {},
"Wages Payable": {}
},
"Provision For Employees Benefit": {
"EPF Payable": {},
"Unpaid Remuneration": {}
}
},
"Trade Payables": {
"Sundry Creditors For Material/Supplies": {
"account_type": "Payable"
},
"Sundry Creditors For Services": {
"account_type": "Payable"
}
}
},
"Non-Current Liabilities": {
"Deferred Tax Liabilities (Net)": {},
"Long Term Borrowings": {
"Secured Loans From Bank": {
"Bank Loan (Long Term)": {}
},
"Unsecured Loans": {
"From Others": {}
}
},
"Long Term Provisions": {},
"Other Long Term Liabilities": {}
},
"Share Application Money Pending Allotment": {
"Share Application Money Pending Allotment": {}
},
"Shareholder's Funds": {
"Money Received Against Share Warrants": {},
"Reserve And Surplus": {
"Capital Redemption Reserve": {},
"Capital Reserve": {},
"Debenture Redeemption Reserve": {},
"Other Reserve": {},
"Revaluation Reserve": {},
"Securities Premium Reserve": {},
"Shares Option Outstanding Account": {},
"Surplus (Profit and Loss Account)": {}
},
"Share Capital": {
"Authorised Share Capital": {},
"Issued, Subscribed And Paid Up Capital": {}
}
},
"root_type": "Liability"
},
"Total Expenses": {
"Changes In Inventories of Finished Goods, Work-In-Progress And Stock-In-Trade": {},
"Cost of Materials Consumed": {
"Closing Stock": {},
"Opening Stock": {},
"Purchases of Raw Materials And Stores": {
"Raw Material": {},
"Stores And Consumables": {}
}
},
"Depreciation And Amortization Expense": {
"Depreciation": {},
"Preliminary Expenses": {}
},
"Employement Benefit Expenses": {
"Commision To Joint M.D": {},
"Commision To M.D": {},
"Directors Remuneration": {},
"Directors Setting Fees": {},
"Salaries, Bonus, PF And ESIC": {},
"Staff Welfare Expense": {}
},
"Financial Cost": {
"Bank Charges": {},
"Bank Gurantee Charges": {},
"Interest On Car Loan": {},
"Interest On Cash Credit Facality": {},
"Interest On Other Loans": {}
},
"Other Expenses": {
"Administrative and Selling Expenses": {
"Advertisement And Publicity": {},
"Annual Service Fees": {},
"Auditors Remuneration": {},
"Car Expenses (Including Insurance)": {},
"Computer Maintenace": {},
"Conveyance Expense": {},
"Custom Duty": {},
"Donation": {},
"Excise/ Service Tax Expenses": {},
"Export Expenses": {},
"General Expenses": {},
"Insurance Expenses": {},
"Interest On Delayed Payment of Taxes": {},
"Internal Audit Fee": {},
"Internet And Website Expenses": {},
"Labour Welfare Expenses": {},
"Legal Expenses": {},
"Loan Processing Fees": {},
"Office Cleaning Expense": {},
"Packing and Forwarding Expense": {},
"Post and Courrier Charges": {},
"Postage And Telegram": {},
"Prelimenary Expense W/Off": {},
"Professional Charges": {},
"Rent Rates And Taxes": {},
"Repair And Maintenance Building": {},
"Security Expesnes": {},
"Software Expense W/Off": {},
"Stamping Charge": {},
"Stationery Expenses": {},
"Telephone Expense": {},
"Tender Fee And Testing Charges": {},
"Travelling Expenses (Including Foreign Travelling)": {}
},
"Direct Expenses": {
"Centeral Sales Tax": {},
"Electrical Repairing Expense": {},
"Freight Forwarding and Octroi Expenses (Local)": {},
"Jobwork Charges": {},
"Machinery Repair and Maintenance": {},
"Material Testing Expense": {},
"Measuring Expense": {},
"Packing Material Expense": {},
"Power and Fuel Charges": {},
"Processing Labour Charges": {},
"Stores and Spares": {},
"Workshop Expense": {}
}
},
"Purchase of Stock-In-Trade": {
"Purchase of Stock-In-Trade": {}
},
"root_type": "Expense"
},
"Total Revenue": {
"Other Income": {
"Interest": {},
"Other Financial Services": {},
"Other Non Operating Income": {}
},
"Revenue From Operations": {
"Central Sales(Exclusive of Excise Duty)": {},
"Export Sales": {},
"Job Work Receipts": {},
"Other Operating Income": {},
"Product Sales": {},
"Sales of Services": {}
},
"root_type": "Income"
}
}
}

View File

@ -35,7 +35,7 @@ class FiscalYear(Document):
if (getdate(self.year_end_date) - getdate(self.year_start_date)).days > 366:
frappe.throw(_("Fiscal Year Start Date and Fiscal Year End Date cannot be more than a year apart."))
check_duplicate_fiscal_year(self)
@frappe.whitelist()
@ -60,7 +60,7 @@ def auto_create_fiscal_year():
start_year = new_fy.year_start_date[:4]
end_year = new_fy.year_end_date[:4]
new_fy.year = start_year if start_year==end_year else (start_year + "-" + end_year)
new_fy.insert()
except:
pass
except frappe.NameError:
pass

View File

@ -109,7 +109,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
},
on_submit: function() {
$.each(this.frm.doc["items"], function(i, row) {
$.each(this.frm.doc["items"] || [], function(i, row) {
if(row.purchase_receipt) frappe.model.clear_doc("Purchase Receipt", row.purchase_receipt)
})
}

View File

@ -14,5 +14,6 @@ frappe.listview_settings['Sales Invoice'] = {
} else if (doc.outstanding_amount > 0 && doc.due_date <= frappe.datetime.get_today()) {
return [__("Overdue"), "red", "oustanding_amount,>,0|due_date,<=,Today"]
}
}
},
right_column: "grand_total_export"
};

View File

@ -15,7 +15,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){
frappe.add_breadcrumbs("Accounts");
var main = $(wrapper).find(".layout-main"),
var main = wrapper.page.main,
chart_area = $("<div>")
.css({"margin-bottom": "15px", "min-height": "200px"})
.appendTo(main),

View File

@ -27,9 +27,6 @@ frappe.query_reports["General Ledger"] = {
"reqd": 1,
"width": "60px"
},
{
"fieldtype": "Break",
},
{
"fieldname":"account",
"label": __("Account"),
@ -38,7 +35,7 @@ frappe.query_reports["General Ledger"] = {
"get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value();
return {
"doctype": "Account",
"doctype": "Account",
"filters": {
"company": company,
}
@ -50,6 +47,9 @@ frappe.query_reports["General Ledger"] = {
"label": __("Voucher No"),
"fieldtype": "Data",
},
{
"fieldtype": "Break",
},
{
"fieldname":"group_by_voucher",
"label": __("Group by Voucher"),
@ -62,4 +62,4 @@ frappe.query_reports["General Ledger"] = {
"fieldtype": "Check",
}
]
}
}

View File

@ -154,7 +154,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
project_name: function(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
if(item.project_name) {
$.each(this.frm.doc["items"],
$.each(this.frm.doc["items"] || [],
function(i, other_item) {
if(!other_item.project_name) {
other_item.project_name = item.project_name;
@ -180,7 +180,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
calculate_item_values: function() {
var me = this;
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
frappe.model.round_floats_in(item);
item.amount = flt(item.rate * item.qty, precision("amount", item));
item.item_tax_amount = 0.0;
@ -196,7 +196,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
var me = this;
this.frm.doc.net_total = this.frm.doc.net_total_import = 0.0;
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
me.frm.doc.net_total += item.base_amount;
me.frm.doc.net_total_import += item.amount;
});
@ -205,7 +205,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
},
calculate_totals: function() {
var tax_count = this.frm.doc["taxes"].length;
var tax_count = this.frm.doc["taxes"] ? this.frm.doc["taxes"].length : 0;
this.frm.doc.grand_total = flt(tax_count ?
this.frm.doc["taxes"][tax_count - 1].total : this.frm.doc.net_total);
this.frm.doc.grand_total_import = flt(tax_count ?
@ -255,7 +255,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
if(this.frm.doc["items"].length) {
if(!frappe.meta.get_docfield(this.frm.doc["items"][0].doctype, "item_tax_amount", this.frm.doctype)) {
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
delete item["item_tax_amount"];
});
}
@ -263,7 +263,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
if(this.frm.doc["taxes"].length) {
if(!frappe.meta.get_docfield(this.frm.doc["taxes"][0].doctype, "tax_amount_after_discount_amount", this.frm.doctype)) {
$.each(this.frm.doc["taxes"], function(i, tax) {
$.each(this.frm.doc["taxes"] || [], function(i, tax) {
delete tax["tax_amount_after_discount_amount"];
});
}

View File

@ -56,13 +56,5 @@ def get_data():
"icon": "icon-phone",
"icon": "octicon octicon-issue-opened",
"type": "module"
},
"Shopping Cart": {
"color": "#B7E090",
"icon": "icon-shopping-cart",
"icon": "octicon octicon-gift",
"label": _("Shopping Cart"),
"link": "Form/Shopping Cart Settings",
"type": "module"
}
}

18
erpnext/config/website.py Normal file
View File

@ -0,0 +1,18 @@
from frappe import _
def get_data():
return [
{
"label": _("Shopping Cart"),
"icon": "icon-wrench",
"items": [
{
"type": "doctype",
"name": "Shopping Cart Settings",
"label": _("Shopping Cart Settings"),
"description": _("Settings for online shopping cart such as shipping rules, price list etc."),
"hide_count": True
}
]
}
]

View File

@ -6,6 +6,7 @@ import frappe
def execute():
frappe.reload_doc('accounts', 'doctype', 'mode_of_payment')
frappe.reload_doc('accounts', 'doctype', 'mode_of_payment_account')
mode_of_payment_list = frappe.db.sql("""select name, default_account
from `tabMode of Payment`""", as_dict=1)
@ -14,7 +15,7 @@ def execute():
if d.get("default_account"):
parent_doc = frappe.get_doc("Mode of Payment", d.get("name"))
parent_doc.set("mode_of_payment_details",
parent_doc.set("accounts",
[{"company": frappe.db.get_value("Account", d.get("default_account"), "company"),
"default_account": d.get("default_account")}])
parent_doc.save()

View File

@ -7,7 +7,7 @@ frappe.provide('erpnext');
$(document).bind('toolbar_setup', function() {
frappe.app.name = "ERPNext";
$('.navbar-brand').html('ERPNext');
$('.navbar-brand').html('<i class="octicon octicon-home visible-xs"></i><span class="hidden-xs">ERPNext</span>');
$('[data-link="docs"]').attr("href", "https://erpnext.com/user-guide")
});

View File

@ -363,7 +363,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
if (item) {
append_item(item);
} else {
$.each(this.frm.doc["items"], function(i, d) {
$.each(this.frm.doc["items"] || [], function(i, d) {
append_item(d);
});
}
@ -478,7 +478,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
var tax_accounts = [];
var company_currency = this.get_company_currency();
$.each(this.frm.doc["taxes"], function(i, tax) {
$.each(this.frm.doc["taxes"] || [], function(i, tax) {
var tax_amount_precision = precision("tax_amount", tax);
var tax_rate_precision = precision("rate", tax);
$.each(JSON.parse(tax.item_wise_tax_detail || '{}'),
@ -507,7 +507,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
var distinct_item_names = [];
var distinct_items = [];
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
if(distinct_item_names.indexOf(item.item_code || item.item_name)===-1) {
distinct_item_names.push(item.item_code || item.item_name);
distinct_items.push(item);
@ -592,7 +592,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
initialize_taxes: function() {
var me = this;
$.each(this.frm.doc["taxes"], function(i, tax) {
$.each(this.frm.doc["taxes"] || [], function(i, tax) {
tax.item_wise_tax_detail = {};
tax_fields = ["total", "tax_amount_after_discount_amount",
"tax_amount_for_current_item", "grand_total_for_current_item",
@ -614,16 +614,16 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
var actual_tax_dict = {};
// maintain actual tax rate based on idx
$.each(this.frm.doc["taxes"], function(i, tax) {
$.each(this.frm.doc["taxes"] || [], function(i, tax) {
if (tax.charge_type == "Actual") {
actual_tax_dict[tax.idx] = flt(tax.rate, precision("tax_amount", tax));
}
});
$.each(this.frm.doc["items"], function(n, item) {
$.each(this.frm.doc["items"] || [], function(n, item) {
var item_tax_map = me._load_item_tax_rate(item.item_tax_rate);
$.each(me.frm.doc["taxes"], function(i, tax) {
$.each(me.frm.doc["taxes"] || [], function(i, tax) {
// tax_amount represents the amount of tax for the current step
var current_tax_amount = me.get_current_tax_amount(item, tax, item_tax_map);
@ -726,7 +726,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
},
_cleanup: function() {
$.each(this.frm.doc["taxes"], function(i, tax) {
$.each(this.frm.doc["taxes"] || [], function(i, tax) {
$.each(["tax_amount_for_current_item", "grand_total_for_current_item",
"tax_fraction_for_current_item", "grand_total_fraction_for_current_item"],
function(i, fieldname) { delete tax[fieldname]; });

View File

@ -21,12 +21,10 @@ pscript['onload_Sales Browser'] = function(wrapper){
callback: function(r) {
var root = r.message[0]["value"];
erpnext.sales_chart = new erpnext.SalesChart(ctype, root, page,
$(wrapper)
.find(".layout-main-section")
.css({
"min-height": "300px",
"padding-bottom": "25px"
}));
page.main.css({
"min-height": "300px",
"padding-bottom": "25px"
}));
}
});
}

View File

@ -248,7 +248,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
var me = this;
if (!this.discount_amount_applied) {
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
frappe.model.round_floats_in(item);
item.amount = flt(item.rate * item.qty, precision("amount", item));
@ -261,11 +261,11 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
determine_exclusive_rate: function() {
var me = this;
$.each(me.frm.doc["items"], function(n, item) {
$.each(me.frm.doc["items"] || [], function(n, item) {
var item_tax_map = me._load_item_tax_rate(item.item_tax_rate);
var cumulated_tax_fraction = 0.0;
$.each(me.frm.doc["taxes"], function(i, tax) {
$.each(me.frm.doc["taxes"] || [], function(i, tax) {
tax.tax_fraction_for_current_item = me.get_current_tax_fraction(tax, item_tax_map);
if(i==0) {
@ -325,7 +325,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
var me = this;
this.frm.doc.net_total = this.frm.doc.net_total_export = 0.0;
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
me.frm.doc.net_total += item.base_amount;
me.frm.doc.net_total_export += item.amount;
});
@ -335,7 +335,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
calculate_totals: function() {
var me = this;
var tax_count = this.frm.doc["taxes"].length;
var tax_count = this.frm.doc["taxes"] ? this.frm.doc["taxes"].length: 0;
this.frm.doc.grand_total = flt(tax_count ? this.frm.doc["taxes"][tax_count - 1].total : this.frm.doc.net_total);
this.frm.doc.grand_total_export = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate);
@ -364,7 +364,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
var grand_total_for_discount_amount = this.get_grand_total_for_discount_amount();
// calculate item amount after Discount Amount
if (grand_total_for_discount_amount) {
$.each(this.frm.doc["items"], function(i, item) {
$.each(this.frm.doc["items"] || [], function(i, item) {
distributed_amount = flt(me.frm.doc.base_discount_amount) * item.base_amount / grand_total_for_discount_amount;
item.base_amount = flt(item.base_amount - distributed_amount, precision("base_amount", item));
});
@ -382,7 +382,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
var total_actual_tax = 0.0;
var actual_taxes_dict = {};
$.each(this.frm.doc["taxes"], function(i, tax) {
$.each(this.frm.doc["taxes"] || [], function(i, tax) {
if (tax.charge_type == "Actual")
actual_taxes_dict[tax.idx] = tax.tax_amount;
else if (actual_taxes_dict[tax.row_id] !== null) {

View File

@ -43,7 +43,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
<p class="text-center">' +
__('Sit tight while your system is being setup. This may take a few moments.') +
'</p>' },
complete_html: function() { return '<h1 class="text-muted text-center"><i class="icon-thumbs-up"></i></h1>\
complete_html: function() { return '<h1 class="text-muted text-center"></h1>\
<h2 class="text-center">'+__('Setup Complete')+'</h2>\
<p class="text-center">' +
__('Your setup is complete. Refreshing...') +
@ -210,6 +210,8 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
placeholder: __('e.g. "My Company LLC"')},
{fieldname:'company_abbr', label: __('Company Abbreviation'), fieldtype:'Data',
description: __('Max 5 characters'), placeholder: __('e.g. "MC"'), reqd:1},
{fieldname:'bank_account', label: __('Bank Account'), fieldtype:'Data',
placeholder: __('e.g. "XYZ National Bank"'), reqd:1 },
{fieldname:'fy_start_date', label:__('Financial Year Start Date'), fieldtype:'Date',
description: __('Your financial year begins on'), reqd:1},
{fieldname:'fy_end_date', label:__('Financial Year End Date'), fieldtype:'Date',
@ -236,7 +238,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
var year_end_date =
frappe.datetime.add_days(frappe.datetime.add_months(
frappe.datetime.user_to_obj(slide.get_input("fy_start_date").val()), 12), -1);
slide.get_field("fy_end_date").set_input(frappe.datetime.obj_to_user(year_end_date));
slide.get_field("fy_end_date").set_input(year_end_date);
});
}
@ -371,12 +373,11 @@ frappe.wiz.Wizard = Class.extend({
frappe.set_route(this.page_name, "0");
},
make: function() {
frappe.ui.set_user_background(null, "#page-setup-wizard");
this.parent = $('<div class="setup-wizard-wrapper">').appendTo(this.parent);
},
get_message: function(html) {
return $(repl('<div class="panel panel-default" data-state="setup-complete">\
<div class="panel-body" style="padding: 40px;">%(html)s</div>\
return $(repl('<div data-state="setup-complete">\
<div style="padding: 40px;" class="text-center">%(html)s</div>\
</div>', {html:html}))
},
show_working: function() {

View File

@ -142,6 +142,8 @@ def create_fiscal_year_and_company(args):
'chart_of_accounts': args.get(('chart_of_accounts')),
}).insert()
# Bank Account
args["curr_fiscal_year"] = curr_fiscal_year
def create_price_lists(args):

View File

@ -73,7 +73,7 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
set_total_taxes_and_charges: function() {
total_taxes_and_charges = 0.0;
$.each(this.frm.doc.taxes, function(i, d) {
$.each(this.frm.doc.taxes || [], function(i, d) {
total_taxes_and_charges += flt(d.amount)
});
cur_frm.set_value("total_taxes_and_charges", total_taxes_and_charges);
@ -83,11 +83,11 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
var me = this;
if(this.frm.doc.taxes.length) {
var total_item_cost = 0.0;
$.each(this.frm.doc.items, function(i, d) {
$.each(this.frm.doc.items || [], function(i, d) {
total_item_cost += flt(d.amount)
});
$.each(this.frm.doc.items, function(i, item) {
$.each(this.frm.doc.items || [], function(i, item) {
item.applicable_charges = flt(item.amount) * flt(me.frm.doc.total_taxes_and_charges) / flt(total_item_cost)
});
refresh_field("items");

View File

@ -2,14 +2,14 @@
{% if(!doc) { %}
<div class="row">
<div class="col-sm-6">{%= __("Items") %}</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">{%= __("Amount") %}</div>
<div class="col-sm-6 col-xs-8">{%= __("Items") %}</div>
<div class="col-sm-2 hidden-xs text-right">{%= __("Qty") %}</div>
<div class="col-sm-2 hidden-xs text-right">{%= __("Rate") %}</div>
<div class="col-sm-2 col-xs-4 text-right">{%= __("Amount") %}</div>
</div>
{% } else { %}
<div class="row">
<div class="col-sm-6"><strong>{%= doc.item_code %}</strong>
<div class="col-sm-6 col-xs-8"><strong>{%= doc.item_code %}</strong>
{% if(doc.item_name != doc.item_code) { %}
<br>{%= doc.item_name %}{% } %}
{% if(doc.item_name != doc.description) { %}
@ -56,7 +56,7 @@
</div>
<!-- qty -->
<div class="col-sm-2 text-right">
<div class="col-sm-2 hidden-xs text-right">
{%= doc.get_formatted("qty") %}
<br><small>{%= doc.uom || doc.stock_uom %}</small>
{% if(in_list(["Sales Order Item", "Purchase Order Item"],
@ -72,7 +72,7 @@
</div>
<!-- rate -->
<div class="col-sm-2 text-right">
<div class="col-sm-2 hidden-xs text-right">
{% if (!frappe.perm.is_visible("rate", doc, frm.perm)) { %}
<span class="text-muted">{%= __("hidden") %}</span>
{% } else { %}
@ -86,7 +86,7 @@
</div>
<!-- amount -->
<div class="col-sm-2 text-right">
<div class="col-sm-2 col-xs-4 text-right">
{% if (!frappe.perm.is_visible("amount", doc, frm.perm)) { %}
<span class="text-muted">{%= __("hidden") %}</span>
{% } else { %}
@ -102,6 +102,13 @@
<br><small>&nbsp;</small>
{% include "templates/form_grid/includes/progress.html" %}
{% } %}
{% if (frappe.perm.is_visible("rate", doc, frm.perm)) { %}
<div class="visible-xs text-muted">
{%= doc.get_formatted("qty") %} <small>{%= doc.uom || doc.stock_uom %}</small>
x {%= doc.get_formatted("rate") %}
</div>
{% } %}
</div>
</div>
{% } %}

View File

@ -5,13 +5,13 @@
{% if(!doc) { %}
<div class="row">
<div class="col-sm-8">{%= __("Item") %}</div>
<div class="col-sm-2 text-right">{%= __("Qty") %}</div>
<div class="col-sm-2 text-right">{%= __("Amount") %}</div>
<div class="col-sm-8 col-xs-6">{%= __("Item") %}</div>
<div class="col-sm-2 col-xs-2 text-right">{%= __("Qty") %}</div>
<div class="col-sm-2 col-xs-4 text-right">{%= __("Amount") %}</div>
</div>
{% } else { %}
<div class="row">
<div class="col-sm-8"><strong>{%= doc.item_code %}</strong>
<div class="col-sm-8 col-xs-6"><strong>{%= doc.item_code %}</strong>
{% if(doc.item_name != doc.item_code) { %}
<br>{%= doc.item_name %}{% } %}
{% if(doc.item_name != doc.description) { %}
@ -31,13 +31,13 @@
</div>
<!-- qty -->
<div class="col-sm-2 text-right">
<div class="col-sm-2 col-xs-2 text-right">
{%= doc.get_formatted("qty") %}
<br><small>{%= doc.uom || doc.stock_uom %}</small>
</div>
<!-- amount -->
<div class="col-sm-2 text-right">
<div class="col-sm-2 col-xs-4 text-right">
{%= doc.get_formatted("amount") %}
<div class="small text-muted">
{%= doc.get_formatted("incoming_rate") %}

View File

@ -6,9 +6,7 @@
<p id="msgprint-alert" class="alert alert-danger"
style="display: none;">&nbsp;</p>
<div class="list-group transaction-list">
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" style="width: 100%;"></div>
</div>
<div class="text-muted progress">{{ _("Loading") }}...</div>
</div>
<div class="text-center">
<button class="btn btn-default btn-show-more hide">More</button>

View File

@ -9,9 +9,7 @@
<p><a class="btn btn-default" href="address"><i class="icon-plus"> New Address</i></a></p>
<hr>
<div id="address-list">
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" style="width: 100%;"></div>
</div>
<div class="text-muted progress">{{ _("Loading") }}...</div>
</div>
</div>

View File

@ -6,9 +6,7 @@
{% block content %}
<div class="cart-content">
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" style="width: 100%;"></div>
</div>
<div class="text-muted progress">{{ _("Loading") }}...</div>
<div id="cart-container" class="hide">
<p class="pull-right"><button class="btn btn-success btn-place-order" type="button">Place Order</button></p>
<div class="clearfix"></div>