[fix] merge conflicts

This commit is contained in:
Saurabh 2017-11-30 16:45:01 +05:30
commit 34a0e90115
8 changed files with 32 additions and 30 deletions

View File

@ -4,7 +4,7 @@ import inspect
import frappe
from erpnext.hooks import regional_overrides
__version__ = '9.2.17'
__version__ = '9.2.18'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -83,7 +83,7 @@ frappe.query_reports["General Ledger"] = {
return;
}
var fieldname = party_type.toLowerCase() + "_name";
var fieldname = frappe.scrub(party_type) + "_name";
frappe.db.get_value(party_type, party, fieldname, function(value) {
frappe.query_report_filters_by_name.party_name.set_value(value[fieldname]);
});

View File

@ -18,4 +18,6 @@ def execute():
and so.order_type = 'Sales'
and (so_item.delivery_date is null or so_item.delivery_date = ''
or so_item.delivery_date = '0000-00-00')
""")
and (so.delivery_date is not null and so.delivery_date != ''
and so.delivery_date != '0000-00-00')
""")

View File

@ -34,7 +34,7 @@
margin-left: 15px;
}
.cart-wrapper {
margin-bottom: 10px;
margin-bottom: 12px;
}
.cart-wrapper .list-item__content:not(:first-child) {
justify-content: flex-end;
@ -121,7 +121,6 @@ input[type=number]::-webkit-outer-spin-button {
border-collapse: collapse;
cursor: pointer;
display: table;
margin: auto;
}
.num-row {
display: table-row;

View File

@ -561,7 +561,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}
// Make read only if Accounts Settings doesn't allow stale rates
this.frm.set_df_property("conversion_rate", "read_only", erpnext.stale_rate_allowed());
this.frm.set_df_property("conversion_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1);
},
shipping_rule: function() {

View File

@ -50,7 +50,7 @@
}
.cart-wrapper {
margin-bottom: 10px;
margin-bottom: 12px;
.list-item__content:not(:first-child) {
justify-content: flex-end;
}
@ -155,7 +155,6 @@ input[type=number]::-webkit-outer-spin-button {
border-collapse: collapse;
cursor: pointer;
display: table;
margin: auto;
}
.num-row {
display: table-row;

View File

@ -14,15 +14,15 @@ def validate_gstin_for_india(doc, method):
if not p.match(doc.gstin):
frappe.throw(_("Invalid GSTIN or Enter NA for Unregistered"))
if not doc.gst_state:
if doc.state in states:
doc.gst_state = doc.state
if not doc.gst_state:
if doc.state in states:
doc.gst_state = doc.state
if doc.gst_state:
doc.gst_state_number = state_numbers[doc.gst_state]
if doc.gstin != "NA" and doc.gst_state_number != doc.gstin[:2]:
frappe.throw(_("First 2 digits of GSTIN should match with State number {0}")
.format(doc.gst_state_number))
if doc.gst_state:
doc.gst_state_number = state_numbers[doc.gst_state]
if doc.gstin and doc.gstin != "NA" and doc.gst_state_number != doc.gstin[:2]:
frappe.throw(_("First 2 digits of GSTIN should match with State number {0}")
.format(doc.gst_state_number))
def get_itemised_tax_breakup_header(item_doctype, tax_accounts):
if frappe.get_meta(item_doctype).has_field('gst_hsn_code'):

View File

@ -210,7 +210,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
select_batch_and_serial_no(item) {
erpnext.show_serial_batch_selector(this.frm, item, () => {
this.update_item_in_frm(item)
this.update_item_in_frm(item, 'qty', item.qty)
.then(() => {
// update cart
if (item.qty === 0) {
@ -372,18 +372,17 @@ erpnext.pos.PointOfSale = class PointOfSale {
make_new_invoice() {
return frappe.run_serially([
() => this.make_sales_invoice_frm(),
() => this.set_pos_profile_data(),
() => {
this.make_sales_invoice_frm()
.then(() => this.set_pos_profile_data())
.then(() => {
if (this.cart) {
this.reset_cart();
} else {
this.make_items();
this.make_cart();
}
this.toggle_editing(true);
})
if (this.cart) {
this.cart.frm = this.frm;
this.cart.reset();
} else {
this.make_items();
this.make_cart();
}
this.toggle_editing(true);
},
]);
}
@ -433,7 +432,10 @@ erpnext.pos.PointOfSale = class PointOfSale {
this.frm.script_manager.trigger("update_stock");
frappe.model.set_default_values(this.frm.doc);
this.frm.cscript.calculate_taxes_and_totals();
this.frm.meta.default_print_format = r.message.print_format || 'POS Invoice';
if (r.message) {
this.frm.meta.default_print_format = r.message.print_format || 'POS Invoice';
}
}
resolve();
@ -981,7 +983,7 @@ class POSItems {
this.search_field = frappe.ui.form.make_control({
df: {
fieldtype: 'Data',
label: 'Search Item ( Ctrl + i )',
label: 'Search Item (Ctrl + i)',
placeholder: 'Search by item code, serial number, batch no or barcode'
},
parent: this.wrapper.find('.search-field'),