Merge branch 'staging-fixes' into staging
This commit is contained in:
commit
cf91f34ffa
@ -5,7 +5,7 @@ import frappe
|
||||
from erpnext.hooks import regional_overrides
|
||||
from frappe.utils import getdate
|
||||
|
||||
__version__ = '10.1.56'
|
||||
__version__ = '10.1.57'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
@ -60,7 +60,12 @@ class SupplierQuotation(BuyingController):
|
||||
for rfq in rfq_list:
|
||||
doc = frappe.get_doc('Request for Quotation', rfq)
|
||||
doc_sup = frappe.get_all('Request for Quotation Supplier', filters=
|
||||
{'parent': doc.name, 'supplier': self.supplier}, fields=['name', 'quote_status'])[0]
|
||||
{'parent': doc.name, 'supplier': self.supplier}, fields=['name', 'quote_status'])
|
||||
|
||||
doc_sup = doc_sup[0] if doc_sup else None
|
||||
if not doc_sup:
|
||||
frappe.throw(_("Supplier {0} not found in {1}").format(self.supplier,
|
||||
"<a href='desk#Form/Request for Quotation/{0}'> Request for Quotation {0} </a>".format(doc.name)))
|
||||
|
||||
quote_status = _('Received')
|
||||
for item in doc.items:
|
||||
@ -152,4 +157,4 @@ def make_quotation(source_name, target_doc=None):
|
||||
}
|
||||
}, target_doc)
|
||||
|
||||
return doclist
|
||||
return doclist
|
||||
|
@ -12,7 +12,7 @@ app_license = "GNU General Public License (v3)"
|
||||
source_link = "https://github.com/frappe/erpnext"
|
||||
|
||||
develop_version = '11.x.x-develop'
|
||||
staging_version = '11.0.3-beta.8'
|
||||
staging_version = '11.0.3-beta.9'
|
||||
|
||||
error_report_email = "support@erpnext.com"
|
||||
|
||||
|
@ -235,6 +235,69 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
this.get_terms();
|
||||
},
|
||||
|
||||
link_to_mrs: function() {
|
||||
var my_items = [];
|
||||
for (var i in cur_frm.doc.items) {
|
||||
if(!cur_frm.doc.items[i].material_request){
|
||||
my_items.push(cur_frm.doc.items[i].item_code);
|
||||
}
|
||||
}
|
||||
frappe.call({
|
||||
method: "erpnext.buying.utils.get_linked_material_requests",
|
||||
args:{
|
||||
items: my_items
|
||||
},
|
||||
callback: function(r) {
|
||||
if(!r.message) {
|
||||
frappe.throw(__("No pending Material Requests found to link for the given items."))
|
||||
}
|
||||
else {
|
||||
var i = 0;
|
||||
var item_length = cur_frm.doc.items.length;
|
||||
while (i < item_length) {
|
||||
var qty = cur_frm.doc.items[i].qty;
|
||||
(r.message[0] || []).forEach(function(d) {
|
||||
if (d.qty > 0 && qty > 0 && cur_frm.doc.items[i].item_code == d.item_code && !cur_frm.doc.items[i].material_request_item)
|
||||
{
|
||||
cur_frm.doc.items[i].material_request = d.mr_name;
|
||||
cur_frm.doc.items[i].material_request_item = d.mr_item;
|
||||
var my_qty = Math.min(qty, d.qty);
|
||||
qty = qty - my_qty;
|
||||
d.qty = d.qty - my_qty;
|
||||
cur_frm.doc.items[i].stock_qty = my_qty*cur_frm.doc.items[i].conversion_factor;
|
||||
cur_frm.doc.items[i].qty = my_qty;
|
||||
|
||||
frappe.msgprint("Assigning " + d.mr_name + " to " + d.item_code + " (row " + cur_frm.doc.items[i].idx + ")");
|
||||
if (qty > 0)
|
||||
{
|
||||
frappe.msgprint("Splitting " + qty + " units of " + d.item_code);
|
||||
var newrow = frappe.model.add_child(cur_frm.doc, cur_frm.doc.items[i].doctype, "items");
|
||||
item_length++;
|
||||
|
||||
for (var key in cur_frm.doc.items[i])
|
||||
{
|
||||
newrow[key] = cur_frm.doc.items[i][key];
|
||||
}
|
||||
|
||||
newrow.idx = item_length;
|
||||
newrow["stock_qty"] = newrow.conversion_factor*qty;
|
||||
newrow["qty"] = qty;
|
||||
|
||||
newrow["material_request"] = "";
|
||||
newrow["material_request_item"] = "";
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
i++;
|
||||
}
|
||||
refresh_field("items");
|
||||
//cur_frm.save();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
update_auto_repeat_reference: function(doc) {
|
||||
if (doc.auto_repeat) {
|
||||
frappe.call({
|
||||
|
@ -7,15 +7,15 @@ from erpnext.accounts.report.item_wise_purchase_register.item_wise_purchase_regi
|
||||
|
||||
def execute(filters=None):
|
||||
return _execute(filters, additional_table_columns=[
|
||||
dict(fieldtype='Data', label='Supplier GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Company GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', width=120),
|
||||
dict(fieldtype='Data', label='Export Type', width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', width=130),
|
||||
dict(fieldtype='Data', label='HSN Code', width=120),
|
||||
dict(fieldtype='Data', label='Supplier Invoice No', width=120),
|
||||
dict(fieldtype='Date', label='Supplier Invoice Date', width=100)
|
||||
dict(fieldtype='Data', label='Supplier GSTIN', fieldname="supplier_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Company GSTIN', fieldname="company_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', fieldname="reverse_charge", width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', fieldname="invoice_type", width=120),
|
||||
dict(fieldtype='Data', label='Export Type', fieldname="export_type", width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', fieldname="ecommerce_gstin", width=130),
|
||||
dict(fieldtype='Data', label='HSN Code', fieldname="hsn_code", width=120),
|
||||
dict(fieldtype='Data', label='Supplier Invoice No', fieldname="supplier_invoice_no", width=120),
|
||||
dict(fieldtype='Date', label='Supplier Invoice Date', fieldname="supplier_invoice_date", width=100)
|
||||
], additional_query_columns=[
|
||||
'supplier_gstin',
|
||||
'company_gstin',
|
||||
|
@ -7,15 +7,15 @@ from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register i
|
||||
|
||||
def execute(filters=None):
|
||||
return _execute(filters, additional_table_columns=[
|
||||
dict(fieldtype='Data', label='Customer GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Billing Address GSTIN', width=140),
|
||||
dict(fieldtype='Data', label='Company GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Place of Supply', width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', width=120),
|
||||
dict(fieldtype='Data', label='Export Type', width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', width=130),
|
||||
dict(fieldtype='Data', label='HSN Code', width=120)
|
||||
dict(fieldtype='Data', label='Customer GSTIN', fieldname="customer_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Billing Address GSTIN', fieldname="billing_address_gstin", width=140),
|
||||
dict(fieldtype='Data', label='Company GSTIN', fieldname="company_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Place of Supply', fieldname="place_of_supply", width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', fieldname="reverse_charge", width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', fieldname="invoice_type", width=120),
|
||||
dict(fieldtype='Data', label='Export Type', fieldname="export_type", width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', fieldname="ecommerce_gstin", width=130),
|
||||
dict(fieldtype='Data', label='HSN Code', fieldname="hsn_code", width=120)
|
||||
], additional_query_columns=[
|
||||
'customer_gstin',
|
||||
'billing_address_gstin',
|
||||
|
@ -7,12 +7,12 @@ from erpnext.accounts.report.purchase_register.purchase_register import _execute
|
||||
|
||||
def execute(filters=None):
|
||||
return _execute(filters, additional_table_columns=[
|
||||
dict(fieldtype='Data', label='Supplier GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Company GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', width=120),
|
||||
dict(fieldtype='Data', label='Export Type', width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', width=130)
|
||||
dict(fieldtype='Data', label='Supplier GSTIN', fieldname="supplier_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Company GSTIN', fieldname="company_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', fieldname="reverse_charge", width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', fieldname="invoice_type", width=120),
|
||||
dict(fieldtype='Data', label='Export Type', fieldname="export_type", width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', fieldname="ecommerce_gstin", width=130)
|
||||
], additional_query_columns=[
|
||||
'supplier_gstin',
|
||||
'company_gstin',
|
||||
|
@ -7,14 +7,14 @@ from erpnext.accounts.report.sales_register.sales_register import _execute
|
||||
|
||||
def execute(filters=None):
|
||||
return _execute(filters, additional_table_columns=[
|
||||
dict(fieldtype='Data', label='Customer GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Billing Address GSTIN', width=140),
|
||||
dict(fieldtype='Data', label='Company GSTIN', width=120),
|
||||
dict(fieldtype='Data', label='Place of Supply', width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', width=120),
|
||||
dict(fieldtype='Data', label='Export Type', width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', width=130)
|
||||
dict(fieldtype='Data', label='Customer GSTIN', fieldname="customer_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Billing Address GSTIN', fieldname="billing_address_gstin", width=140),
|
||||
dict(fieldtype='Data', label='Company GSTIN', fieldname="company_gstin", width=120),
|
||||
dict(fieldtype='Data', label='Place of Supply', fieldname="place_of_supply", width=120),
|
||||
dict(fieldtype='Data', label='Reverse Charge', fieldname="reverse_charge", width=120),
|
||||
dict(fieldtype='Data', label='Invoice Type', fieldname="invoice_type", width=120),
|
||||
dict(fieldtype='Data', label='Export Type', fieldname="export_type", width=120),
|
||||
dict(fieldtype='Data', label='E-Commerce GSTIN', fieldname="ecommerce_gstin", width=130)
|
||||
], additional_query_columns=[
|
||||
'customer_gstin',
|
||||
'billing_address_gstin',
|
||||
|
@ -98,4 +98,4 @@ def get_country_wise_tax(country):
|
||||
with open (os.path.join(os.path.dirname(__file__), "..", "data", "country_wise_tax.json")) as countrywise_tax:
|
||||
data = json.load(countrywise_tax).get(country)
|
||||
|
||||
return data
|
||||
return data
|
||||
|
Loading…
Reference in New Issue
Block a user