mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -291,7 +291,12 @@ class AccountsController(TransactionBase):
|
|||||||
current_tax_amount = flt(current_tax_amount, self.precision("tax_amount", tax))
|
current_tax_amount = flt(current_tax_amount, self.precision("tax_amount", tax))
|
||||||
|
|
||||||
# store tax breakup for each item
|
# store tax breakup for each item
|
||||||
tax.item_wise_tax_detail[item.item_code or item.item_name] = [tax_rate, current_tax_amount]
|
key = item.item_code or item.item_name
|
||||||
|
if tax.item_wise_tax_detail.get(key):
|
||||||
|
item_wise_tax_amount = tax.item_wise_tax_detail[key][1] + current_tax_amount
|
||||||
|
tax.item_wise_tax_detail[key] = [tax_rate, item_wise_tax_amount]
|
||||||
|
else:
|
||||||
|
tax.item_wise_tax_detail[key] = [tax_rate, current_tax_amount]
|
||||||
|
|
||||||
return current_tax_amount
|
return current_tax_amount
|
||||||
|
|
||||||
|
|||||||
@@ -261,6 +261,6 @@ patch_list = [
|
|||||||
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-09-02",
|
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-09-02",
|
||||||
"patches.september_2013.p01_fix_buying_amount_gl_entries",
|
"patches.september_2013.p01_fix_buying_amount_gl_entries",
|
||||||
"patches.september_2013.p01_update_communication",
|
"patches.september_2013.p01_update_communication",
|
||||||
"patches.september_2013.p02_make_pos_view_checked_in_features_setup",
|
"execute:webnotes.reload_doc('setup', 'doctype', 'features_setup') # 2013-09-05",
|
||||||
"patches.september_2013.p02_fix_serial_no_status",
|
"patches.september_2013.p02_fix_serial_no_status",
|
||||||
]
|
]
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
||||||
# License: GNU General Public License v3. See license.txt
|
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import webnotes
|
|
||||||
|
|
||||||
def execute():
|
|
||||||
webnotes.reload_doc("setup", "doctype", "features_setup")
|
|
||||||
fs = webnotes.bean("Features Setup")
|
|
||||||
fs.doc.fs_pos_view = 1
|
|
||||||
fs.save()
|
|
||||||
@@ -339,7 +339,18 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
var headings = $.map([wn._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
|
var headings = $.map([wn._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
|
||||||
function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
|
function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
|
||||||
|
|
||||||
var rows = $.map(this.get_item_doclist(), function(item) {
|
var distinct_item_names = [];
|
||||||
|
var distinct_items = [];
|
||||||
|
$.each(this.get_item_doclist(), 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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(distinct_items);
|
||||||
|
|
||||||
|
var rows = $.map(distinct_items, function(item) {
|
||||||
var item_tax_record = item_tax[item.item_code || item.item_name];
|
var item_tax_record = item_tax[item.item_code || item.item_name];
|
||||||
if(!item_tax_record) { return null; }
|
if(!item_tax_record) { return null; }
|
||||||
return repl("<tr><td>%(item_name)s</td>%(taxes)s</tr>", {
|
return repl("<tr><td>%(item_name)s</td>%(taxes)s</tr>", {
|
||||||
|
|||||||
@@ -160,6 +160,11 @@ class DocType(TransactionBase):
|
|||||||
def make_quotation(source_name, target_doclist=None):
|
def make_quotation(source_name, target_doclist=None):
|
||||||
from webnotes.model.mapper import get_mapped_doclist
|
from webnotes.model.mapper import get_mapped_doclist
|
||||||
|
|
||||||
|
def set_missing_values(source, target):
|
||||||
|
quotation = webnotes.bean(target)
|
||||||
|
quotation.run_method("onload_post_render")
|
||||||
|
quotation.run_method("calculate_taxes_and_totals")
|
||||||
|
|
||||||
doclist = get_mapped_doclist("Opportunity", source_name, {
|
doclist = get_mapped_doclist("Opportunity", source_name, {
|
||||||
"Opportunity": {
|
"Opportunity": {
|
||||||
"doctype": "Quotation",
|
"doctype": "Quotation",
|
||||||
@@ -181,6 +186,6 @@ def make_quotation(source_name, target_doclist=None):
|
|||||||
},
|
},
|
||||||
"add_if_empty": True
|
"add_if_empty": True
|
||||||
}
|
}
|
||||||
}, target_doclist)
|
}, target_doclist, set_missing_values)
|
||||||
|
|
||||||
return [d.fields for d in doclist]
|
return [d.fields for d in doclist]
|
||||||
@@ -96,9 +96,6 @@ class TestPurchaseReceipt(unittest.TestCase):
|
|||||||
self.assertFalse(webnotes.conn.get_value("Serial No", pr.doclist[1].serial_no,
|
self.assertFalse(webnotes.conn.get_value("Serial No", pr.doclist[1].serial_no,
|
||||||
"warehouse"))
|
"warehouse"))
|
||||||
|
|
||||||
self.assertEqual(webnotes.conn.get_value("Serial No", pr.doclist[1].serial_no,
|
|
||||||
"status"), "Not Available")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test_dependencies = ["BOM"]
|
test_dependencies = ["BOM"]
|
||||||
|
|||||||
Reference in New Issue
Block a user