Compare commits

...

19 Commits

Author SHA1 Message Date
Maharshi Patel
a16347f325 fix: add Document Date in E-Invoice print format 2022-11-08 16:35:34 +05:30
Deepesh Garg
19b9875ba8 Merge pull request #32781 from frappe/mergify/bp/version-13-hotfix/pr-32777
fix: Reset advance paid amount on Order cancel and amend (backport #32777)
2022-11-08 10:53:02 +05:30
Deepesh Garg
43aa670e90 Merge branch 'version-13-hotfix' of https://github.com/frappe/erpnext into mergify/bp/version-13-hotfix/pr-32777 2022-11-08 10:40:07 +05:30
Deepesh Garg
4f76ed1c68 chore: Resolve conflicts 2022-11-08 10:39:21 +05:30
Deepesh Garg
b93d13feef Merge pull request #32865 from frappe/mergify/bp/version-13-hotfix/pr-32846
fix: add german translations (backport #32846)
2022-11-07 18:42:38 +05:30
Raffael Meyer
e1a32cc620 Merge branch 'version-13-hotfix' into mergify/bp/version-13-hotfix/pr-32846 2022-11-07 13:18:06 +01:00
barredterra
550f5f280c chore: resolve merge conflicts 2022-11-07 13:15:38 +01:00
Deepesh Garg
fbbfeb8563 Merge pull request #32873 from frappe/mergify/bp/version-13-hotfix/pr-32802
fix: `Material Consumption` option in case of `Skip Transfer to WIP` in WO (backport #32802)
2022-11-07 10:18:14 +05:30
Sagar Sharma
418c131331 fix: Material Consumption option in case of Skip Transfer to WIP in WO
(cherry picked from commit 8ea6983734)
2022-11-07 04:06:55 +00:00
Raffael Meyer
a8bf17e560 chore: add german translations (#32846)
Mostly for balance sheet

(cherry picked from commit d2b6490bca)

# Conflicts:
#	erpnext/translations/de.csv
2022-11-06 04:53:43 +00:00
Deepesh Garg
9961037f71 Merge pull request #32860 from frappe/mergify/bp/version-13-hotfix/pr-32794
fix: Disable tax included prices for internal transfers (backport #32794)
2022-11-05 21:17:09 +05:30
Deepesh Garg
84ee1b86af fix: Disable tax included prices for internal transfers (#32794)
* fix: Disable tax-included prices for internal transfers

(cherry picked from commit 8d30ebb12b)
2022-11-05 15:22:30 +00:00
Deepesh Garg
afe86d83aa Merge pull request #32857 from frappe/mergify/bp/version-13-hotfix/pr-32847
fix: Create POS Opening Entry POS Profile filter. (backport #32847)
2022-11-05 20:52:12 +05:30
Maharshi Patel
76e4bb44f1 fix: Create POS Opening Entry POS Profile filter.
pos_profile_query was variable instead of function.

(cherry picked from commit 1328a45f2a)
2022-11-05 11:15:58 +00:00
Deepesh Garg
c1bc1040b8 Merge pull request #32834 from frappe/mergify/bp/version-13-hotfix/pr-32773
fix: for asset's purchase_date, if bill_date is set, use that instead of posting_date (backport #32773)
2022-11-03 12:06:50 +05:30
anandbaburajan
1d23c9a9fd fix: for asset's purchase_date, if bill_date is set, use that instead of posting_date
(cherry picked from commit f322c608cf)
2022-11-03 06:28:37 +00:00
Sagar Sharma
5a211813d3 Merge pull request #32821 from frappe/mergify/bp/version-13-hotfix/pr-32788
fix: use `flt` instead of `cint` in `get_batch_no` (backport #32788)
2022-11-02 17:08:08 +05:30
Sagar Sharma
601b1e3821 fix: use flt instead of cint in get_batch_no
(cherry picked from commit 9fb3fb4c83)
2022-11-02 10:25:54 +00:00
Deepesh Garg
e32e0bc8fa fix: Reset advance paid amount on Oreder cancel and amend
(cherry picked from commit 92f37ca111)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/purchase_order.js
2022-10-31 16:09:48 +00:00
10 changed files with 139 additions and 55 deletions

View File

@@ -50,6 +50,10 @@
<div class="col-xs-4"><label>Document No</label></div>
<div class="col-xs-8 value">{{ einvoice.DocDtls.No }}</div>
</div>
<div class="row data-field">
<div class="col-xs-4"><label>Document Date</label></div>
<div class="col-xs-8 value">{{ einvoice.DocDtls.Dt }}</div>
</div>
</div>
<div class="col-xs-4 column-break">
<img src="{{ doc.qrcode_image }}" width="175px" style="float: right;">

View File

@@ -384,7 +384,11 @@ frappe.ui.form.on('Asset', {
set_values_from_purchase_doc: function(frm, doctype, purchase_doc) {
frm.set_value('company', purchase_doc.company);
frm.set_value('purchase_date', purchase_doc.posting_date);
if (purchase_doc.bill_date) {
frm.set_value('purchase_date', purchase_doc.bill_date);
} else {
frm.set_value('purchase_date', purchase_doc.posting_date);
}
const item = purchase_doc.items.find(item => item.item_code === frm.doc.item_code);
if (!item) {
doctype_field = frappe.scrub(doctype)

View File

@@ -43,6 +43,11 @@ frappe.ui.form.on("Purchase Order", {
erpnext.queries.setup_queries(frm, "Warehouse", function() {
return erpnext.queries.warehouse(frm.doc);
});
// On cancel and amending a purchase order with advance payment, reset advance paid amount
if (frm.is_new()) {
frm.set_value("advance_paid", 0)
}
},
apply_tds: function(frm) {

View File

@@ -152,6 +152,7 @@ class AccountsController(TransactionBase):
self.validate_inter_company_reference()
self.disable_pricing_rule_on_internal_transfer()
self.disable_tax_included_prices_for_internal_transfer()
self.set_incoming_rate()
if self.meta.get_field("currency"):
@@ -395,6 +396,20 @@ class AccountsController(TransactionBase):
alert=1,
)
def disable_tax_included_prices_for_internal_transfer(self):
if self.is_internal_transfer():
tax_updated = False
for tax in self.get("taxes"):
if tax.get("included_in_print_rate"):
tax.included_in_print_rate = 0
tax_updated = True
if tax_updated:
frappe.msgprint(
_("Disabled tax included prices since this {} is an internal transfer").format(self.doctype),
alert=1,
)
def validate_due_date(self):
if self.get("is_pos"):
return

View File

@@ -555,66 +555,69 @@ erpnext.work_order = {
}
}
if(!frm.doc.skip_transfer){
if (frm.doc.status != 'Stopped') {
// If "Material Consumption is check in Manufacturing Settings, allow Material Consumption
if (flt(doc.material_transferred_for_manufacturing) > 0 && frm.doc.status != 'Stopped') {
if ((flt(doc.produced_qty) < flt(doc.material_transferred_for_manufacturing))) {
frm.has_finish_btn = true;
if (frm.doc.__onload && frm.doc.__onload.material_consumption == 1) {
// Only show "Material Consumption" when required_qty > consumed_qty
var counter = 0;
var tbl = frm.doc.required_items || [];
var tbl_lenght = tbl.length;
for (var i = 0, len = tbl_lenght; i < len; i++) {
let wo_item_qty = frm.doc.required_items[i].transferred_qty || frm.doc.required_items[i].required_qty;
if (flt(wo_item_qty) > flt(frm.doc.required_items[i].consumed_qty)) {
counter += 1;
}
}
if (counter > 0) {
var consumption_btn = frm.add_custom_button(__('Material Consumption'), function() {
const backflush_raw_materials_based_on = frm.doc.__onload.backflush_raw_materials_based_on;
erpnext.work_order.make_consumption_se(frm, backflush_raw_materials_based_on);
});
consumption_btn.addClass('btn-primary');
if (frm.doc.__onload && frm.doc.__onload.material_consumption == 1) {
if (flt(doc.material_transferred_for_manufacturing) > 0 || frm.doc.skip_transfer) {
// Only show "Material Consumption" when required_qty > consumed_qty
var counter = 0;
var tbl = frm.doc.required_items || [];
var tbl_lenght = tbl.length;
for (var i = 0, len = tbl_lenght; i < len; i++) {
let wo_item_qty = frm.doc.required_items[i].transferred_qty || frm.doc.required_items[i].required_qty;
if (flt(wo_item_qty) > flt(frm.doc.required_items[i].consumed_qty)) {
counter += 1;
}
}
if (counter > 0) {
var consumption_btn = frm.add_custom_button(__('Material Consumption'), function() {
const backflush_raw_materials_based_on = frm.doc.__onload.backflush_raw_materials_based_on;
erpnext.work_order.make_consumption_se(frm, backflush_raw_materials_based_on);
});
consumption_btn.addClass('btn-primary');
}
}
}
if(!frm.doc.skip_transfer){
if (flt(doc.material_transferred_for_manufacturing) > 0) {
if ((flt(doc.produced_qty) < flt(doc.material_transferred_for_manufacturing))) {
frm.has_finish_btn = true;
var finish_btn = frm.add_custom_button(__('Finish'), function() {
erpnext.work_order.make_se(frm, 'Manufacture');
});
if(doc.material_transferred_for_manufacturing>=doc.qty) {
// all materials transferred for manufacturing, make this primary
finish_btn.addClass('btn-primary');
}
} else {
frappe.db.get_doc("Manufacturing Settings").then((doc) => {
let allowance_percentage = doc.overproduction_percentage_for_work_order;
if (allowance_percentage > 0) {
let allowed_qty = frm.doc.qty + ((allowance_percentage / 100) * frm.doc.qty);
if ((flt(doc.produced_qty) < allowed_qty)) {
frm.add_custom_button(__('Finish'), function() {
erpnext.work_order.make_se(frm, 'Manufacture');
});
}
}
});
}
}
} else {
if ((flt(doc.produced_qty) < flt(doc.qty))) {
var finish_btn = frm.add_custom_button(__('Finish'), function() {
erpnext.work_order.make_se(frm, 'Manufacture');
});
if(doc.material_transferred_for_manufacturing>=doc.qty) {
// all materials transferred for manufacturing, make this primary
finish_btn.addClass('btn-primary');
}
} else {
frappe.db.get_doc("Manufacturing Settings").then((doc) => {
let allowance_percentage = doc.overproduction_percentage_for_work_order;
if (allowance_percentage > 0) {
let allowed_qty = frm.doc.qty + ((allowance_percentage / 100) * frm.doc.qty);
if ((flt(doc.produced_qty) < allowed_qty)) {
frm.add_custom_button(__('Finish'), function() {
erpnext.work_order.make_se(frm, 'Manufacture');
});
}
}
});
finish_btn.addClass('btn-primary');
}
}
} else {
if ((flt(doc.produced_qty) < flt(doc.qty)) && frm.doc.status != 'Stopped') {
var finish_btn = frm.add_custom_button(__('Finish'), function() {
erpnext.work_order.make_se(frm, 'Manufacture');
});
finish_btn.addClass('btn-primary');
}
}
}
},
calculate_cost: function(doc) {
if (doc.operations){

View File

@@ -95,6 +95,11 @@ frappe.ui.form.on("Sales Order", {
return query;
});
// On cancel and amending a sales order with advance payment, reset advance paid amount
if (frm.is_new()) {
frm.set_value("advance_paid", 0)
}
frm.ignore_doctypes_on_cancel_all = ['Purchase Order'];
},

View File

@@ -67,7 +67,7 @@ erpnext.PointOfSale.Controller = class {
{
fieldtype: 'Link', label: __('POS Profile'),
options: 'POS Profile', fieldname: 'pos_profile', reqd: 1,
get_query: () => pos_profile_query,
get_query: () => pos_profile_query(),
onchange: () => fetch_pos_payment_methods()
},
{
@@ -101,9 +101,11 @@ erpnext.PointOfSale.Controller = class {
primary_action_label: __('Submit')
});
dialog.show();
const pos_profile_query = {
query: 'erpnext.accounts.doctype.pos_profile.pos_profile.pos_profile_query',
filters: { company: dialog.fields_dict.company.get_value() }
const pos_profile_query = () => {
return {
query: 'erpnext.accounts.doctype.pos_profile.pos_profile.pos_profile_query',
filters: { company: dialog.fields_dict.company.get_value() }
}
};
}

View File

@@ -285,7 +285,7 @@ def get_batch_no(item_code, warehouse, qty=1, throw=False, serial_no=None):
batches = get_batches(item_code, warehouse, qty, throw, serial_no)
for batch in batches:
if cint(qty) <= cint(batch.qty):
if flt(qty) <= flt(batch.qty):
batch_no = batch.batch_id
break

View File

@@ -1050,9 +1050,22 @@ class TestDeliveryNote(FrappeTestCase):
do_not_submit=True,
)
dn.append(
"taxes",
{
"charge_type": "On Net Total",
"account_head": "_Test Account Service Tax - _TC",
"description": "Tax 1",
"rate": 14,
"cost_center": "_Test Cost Center - _TC",
"included_in_print_rate": 1,
},
)
self.assertEqual(dn.items[0].rate, 500) # haven't saved yet
dn.save()
self.assertEqual(dn.ignore_pricing_rule, 1)
self.assertEqual(dn.taxes[0].included_in_print_rate, 0)
# rate should reset to incoming rate
self.assertEqual(dn.items[0].rate, rate)
@@ -1063,6 +1076,7 @@ class TestDeliveryNote(FrappeTestCase):
dn.save()
self.assertEqual(dn.items[0].rate, rate)
self.assertEqual(dn.items[0].net_rate, rate)
def test_internal_transfer_precision_gle(self):
from erpnext.selling.doctype.customer.test_customer import create_internal_customer

View File

@@ -9865,3 +9865,35 @@ Leave Type Allocation,Zuordnung Abwesenheitsarten,
From Lead,Aus Lead,
From Opportunity,Aus Chance,
Publish in Website,Auf Webseite veröffentlichen,
Total Allocated Leave(s),Gesamte zugewiesene Urlaubstage,
Expired Leave(s),Verfallene Urlaubstage,
Used Leave(s),Verbrauchte Urlaubstage,
Leave(s) Pending Approval,Urlaubstage zur Genehmigung ausstehend,
Available Leave(s),Verfügbare Urlaubstage,
Party Specific Item,Parteispezifischer Artikel,
Active Customers,Aktive Kunden,
Annual Sales,Jährlicher Umsatz,
Total Outgoing Bills,Ausgangsrechnungen insgesamt,
Total Incoming Bills,Eingangsrechnungen insgesamt,
Total Incoming Payment,Zahlungseingang insgesamt,
Total Outgoing Payment,Zahlungsausgang insgesamt,
Incoming Bills (Purchase Invoice),Eingehende Rechnungen (Eingangsrechnung),
Outgoing Bills (Sales Invoice),Ausgehende Rechnungen (Ausgangsrechnung),
Accounts Receivable Ageing,Fälligkeit Forderungen,
Accounts Payable Ageing,Fälligkeit Verbindlichkeiten,
Budget Variance,Budgetabweichung,
Based On Value,Basierend auf Wert,
Restrict Items Based On,Artikel einschränken auf Basis von,
Earnings & Deductions,Erträge & Abzüge,
Is Process Loss,Ist Prozessverlust,
Is Finished Item,Ist fertiger Artikel,
Is Scrap Item,Ist Schrott,
Issue a debit note with 0 qty against an existing Sales Invoice,Lastschrift mit Menge 0 gegen eine bestehende Ausgangsrechnung ausstellen,
Show Remarks,Bemerkungen anzeigen,
Website Item,Webseiten-Artikel,
Update Property,Eigenschaft aktualisieren,
Recurring Sales Invoice,Wiederkehrende Ausgangsrechnung,
Total Asset,Aktiva,
Total Liability,Verbindlichkeiten,
Total Equity,Eigenkapital,
Warehouse wise Stock Value,Warenwert nach Lager,
Can't render this file because it is too large.