Commit Graph

442 Commits

Author SHA1 Message Date
mergify[bot]
d215a85747 fix: Advance payment against payment terms (#34872)
* fix: Advance payment against payment terms (#34872)

(cherry picked from commit 5c75894065)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py

* chore: resolve conflicts

* chore: fix tests

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-04-21 13:24:07 +05:30
mergify[bot]
92a26dda3c fix: Allocate tax loss to tax account head on early payment discount (#34287)
* fix: Taxes aren't discounted on early payment discount

- Deductions in payment entry must be split into income loss and tax loss
- Compute total discount in percentage, makes discounting different amounts proportionately easier

(cherry picked from commit 768c3a4927)

* fix: Recalculate difference amount after setting deductions

(cherry picked from commit 75ec0a0a85)

* fix: Set deductions in base currency

- Use field precision to get more accurate values

(cherry picked from commit dc2998f544)

* fix: Back update discounted amount in Invoice based on discount type

- Discount value was always trated as a percentage on back updation

(cherry picked from commit 2ae5834290)

* test: PE from SI with early payment discount amount & PE assertions in discount % test

(cherry picked from commit c217bb2018)

* fix: Set deduction amount in company currency on Doctype

- Even via JS, deductions amount is always in company currency
- Since there is nothing dynamic about this field, set it in the doctype spec itself
- fixed: Inconsistency between label currency and field currency formatted value

(cherry picked from commit 7f2e7badff)

* fix: Don't add to deductions if amount is 0

- misc: better docstring

(cherry picked from commit f02fc8acf0)

* fix: Paid amount must be discounted considering accounting currency

- Accounting is in the same currency if party currency and company currency is the same
- If accounting is in the same currency, paid and recvd amount is in the base currency
- Then, discount amount must also be in the base currency as it is deducted from paid amount
- Received amount must be in base currency if not multi currency
- cleanup: Deductions setting broken into smaller functions

(cherry picked from commit 761f68d7bf)

* fix: Multi-currency SI with base currency PE

- Return total discount loss in base currency
- Allocate payment based on terms: Set allocated amount in references table in base currency if accounting is in that currency
- Allocate payment based on terms: While back updating set paid amount (payment schedule) in transaction currency always
- minor: discount msgprint in correct currency

(cherry picked from commit b09c2381ca)

* test: Multi currency SI with multi-currency accounting and single currency accounting + Early payment discount

(cherry picked from commit 9abf0ef615)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/test_payment_entry.py

* fix: Handle rounding more gracefully

- Round off pending discount loss to avoid miniscule losses rounded to 0.0 that are added in deductions
- Use base amounts to calculate base losses instead of using conversion factor which increases rounding error
- Round of total base loss instead of individual income and tax losses to reduce rounding error
- Use default round off account for pending rounding loss in deductions

(cherry picked from commit caa1a3dccf)

* fix: Provision to apply early payment discount if payment is recorded late

- Party could have paid on time but payment is recorded late
- Prompt for reference date so that discount is applied while mapping
- Prompt only if discount in payment schedule of valid doctypes
- test: Reference date and impact on PE
- `make_payment_entry` (JS) must be able to access `this`

(cherry picked from commit d6d0163514)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
#	erpnext/buying/doctype/purchase_order/purchase_order.js
#	erpnext/public/js/controllers/transaction.js

* feat: Make Tax loss booking optional

- Checkbox in Accounts Settings
- Apply checkbox in PE deductions setting logic
- Adjust tests

(cherry picked from commit 216a46bd66)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json

* fix: Merge conflicts

* fix: 'Donation' does not have `company_currency` field

- Make sure check uses this field only for eligible documents

---------

Co-authored-by: marination <maricadsouza221197@gmail.com>
2023-04-05 11:55:22 +05:30
mergify[bot]
3a1475a90b fix(minor): Dirty the form after clicking on Get advances button in Invoices (#34323)
fix(minor): Dirty the form after clicking on Get advances button in Invoices (#34323)

fix(minor): Dirty form after clicking on Get advances button

(cherry picked from commit 2feb27e399)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2023-03-07 15:47:37 +05:30
Rohit Waghchaure
bb5641535b fix: item rate not fetching
(cherry picked from commit 0d7f98b496)
2023-01-28 09:41:20 +00:00
mergify[bot]
b8d97b82b8 fix: pricing rule item code UOM apply & conversions (backport #32566) (#32636)
* fix: pricing rule for non stock UOM and conversions

* fix: pricing rule for non stock UOM and conversions

(cherry picked from commit 96b4211ea1)

# Conflicts:
#	erpnext/accounts/doctype/pricing_rule/pricing_rule.py

* chore: resolve conflicts

Co-authored-by: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2022-10-18 23:31:31 +05:30
Sagar Vora
a7d66fa352 fix: set billing_address for purchases in get_party_details
(cherry picked from commit a3625b3817)
2022-08-13 08:00:27 +00:00
Marc de Lima Lucio
1998223ee3 FIX: quality inspection quick creation from purchase receipt: pre-fill sample size if available (#31544)
FIX: quality inspection quick creation from transaction documents: pre-fill sample size if available

Co-authored-by: Marica <maricadsouza221197@gmail.com>
(cherry picked from commit 048c037842)
2022-07-21 08:17:48 +00:00
mergify[bot]
31fd263825 fix(UX): dont apply price list when changing batch on mapped docs (backport #31503) (#31504)
fix(UX): dont apply price list  when changing batch on mapped docs (#31503)

fix(UX): dont apply price list batch change on mapped docs

(cherry picked from commit 7e40c86c56)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-07-04 17:02:11 +05:30
mergify[bot]
4e2ed6f9d9 fix: transaction date gets unset in material request (#31387)
* fix: transaction date gets unset in material request (#31327)

* fix: set date correctly in material request

* fix: use only `transaction_date` in `get_item_details`

* fix: resolve merge conflict

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2022-06-17 12:04:10 +05:30
Deepesh Garg
91863c7457 fix: Exchange rate reste to 1 on making mapped doc
(cherry picked from commit 2a10f09d8d)
2022-05-27 06:47:35 +00:00
Ankush Menat
0ec5adeed8 chore:conflicts 2022-05-13 13:14:08 +05:30
Deepesh Garg
8ef649f65d fix: Item rate reset on changing posting date (#30990)
* fix: Item rate reset on changing posting date

* chore: Remove debugger

(cherry picked from commit 54d6cf18fc)

# Conflicts:
#	erpnext/public/js/controllers/transaction.js
2022-05-13 07:37:57 +00:00
marination
fe52c1f354 fix: set_missing_values in SE and re-use the same on all SE mappings
- `set_missing_values` in SE will set actual qty, transfer qty and calculate rate/amount
- Re-use `set_missing_values` wherever SE is doc is being mapped

(cherry picked from commit 90a8e924f5)
2022-05-11 14:44:42 +00:00
marination
678a01d4bd fix: Calculate totals even though pricing rule is not applied on mapped doc
- `apply_pricing_rule` is triggered due to change in some data which most likely contributes to Total.

(cherry picked from commit 494ddd1eb4)
2022-05-11 14:44:38 +00:00
Deepesh Garg
93fe840844 fix: Price changing on creating Sales retrun from Delivery Note
(cherry picked from commit 9c081947ec)
2022-04-18 09:04:50 +00:00
Deepesh Garg
a044e92687 fix: Incorrect default amount to pay for POS invoices 2022-03-27 13:02:31 +05:30
Deepesh Garg
71402b43a7 fix: Check for onload property 2022-03-25 21:49:19 +05:30
Deepesh Garg
067564bd26 fix: Add back calculation for discount 2022-03-25 12:17:51 +05:30
Deepesh Garg
13fcda5776 fix: Rate change issue on save and mapping from other doc 2022-03-25 10:46:09 +05:30
Deepesh Garg
aded1fca3e Merge pull request #30343 from deepeshgarg007/item_tax_template_bug
fix: Taxes not getting fetched from item tax template
2022-03-23 22:02:17 +05:30
Deepesh Garg
a3f4069ad5 fix: Check if onload property exists in the form object 2022-03-23 13:58:21 +05:30
Deepesh Garg
9f2868e858 fix: Changing item prices on converting orders/receipts to invoices
(cherry picked from commit 66ca085e39)
2022-03-23 04:40:22 +00:00
Deepesh Garg
7cba4975ef fix: Taxes not getting fetched from item tax template 2022-03-21 21:28:41 +05:30
Saqib Ansari
6bb1dccddd fix: merge conflicts 2022-02-25 15:45:52 +05:30
Saqib Ansari
f2264fa58d fix(pos): coupon code is applied even if ignore pricing rule is check
(cherry picked from commit 81514516f3)

# Conflicts:
#	erpnext/public/js/controllers/transaction.js
2022-02-25 10:06:21 +00:00
mergify[bot]
6539d32ca9 fix: Fetch conversion factor even if it already existed in row, on item change (#29917) (#29935)
* fix: Fetch conversion factor even if it already existed in row, on item change

* fix: Retain manually changed conversion factor

- If item code changes, reset conversion factor on client side
- Keep API behavious consistent, if conversion factor is sent, same must come back
- API should not ideally reset values in most cases

(cherry picked from commit 235fc127b3)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2022-02-22 13:01:31 +05:30
Saqib Ansari
63079f3e07 fix: coupon code is applied even if ignore_pricing_rule is enabled
(cherry picked from commit 2743999785)
2022-02-17 10:42:15 +00:00
Saqib Ansari
78c5f34286 fix: ignore pricing rule in all transactions
(cherry picked from commit f6dda738dc)
2022-02-09 08:02:53 +00:00
Subin Tom
c494ed087a fix: Coupon code item pricing dynamic updation issue
(cherry picked from commit ccf63124d6)
2022-02-08 06:20:51 +00:00
Deepesh Garg
b60fbf5ba9 fix: Add round floats for price list rate 2021-12-22 12:01:39 +05:30
Deepesh Garg
233f79bf96 fix: Recalculate taxes irrespective of price list rate changed or not 2021-12-22 11:26:19 +05:30
Deepesh Garg
0980c2f981 fix: Linting issues 2021-12-20 13:26:16 +05:30
Deepesh Garg
6087d5a603 fix(UX): Optimize rate updation of changing price list 2021-12-20 12:16:14 +05:30
Deepesh Garg
b09274bd49 Merge pull request #28641 from frappe/mergify/bp/version-13-hotfix/pr-28302
fix: Shipping Rule picking up old net_rate (backport #28302)
2021-12-03 15:20:09 +05:30
mergify[bot]
b6d752201a fix: actual tax conversion in case of multicurrency invoices (#28686) 2021-12-02 12:13:34 +05:30
Subin Tom
f591596615 fix: merge conflicts 2021-11-30 16:06:55 +05:30
Subin Tom
e65a720810 fix: Shipping Rule picking up old net_rate
(cherry picked from commit c78b8b7897)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
#	erpnext/public/js/controllers/transaction.js
2021-11-30 09:08:15 +00:00
mergify[bot]
15c9c08261 Merge pull request #27715 from frappe/mergify/bp/version-13-hotfix/pr-27668
fix: Batch scans get overwritten on the same row (backport #27668)
2021-09-30 16:34:11 +05:30
Frappe PR Bot
fbae3c7fd6 fix: apply price list after batch or serial no insertion (#27566) (#27683)
(cherry picked from commit 72c081fd8f)

Co-authored-by: Alan <2.alan.tom@gmail.com>
2021-09-28 12:59:45 +05:30
vama
666eaae6ce fix: PO/PINV - Check if doctype has company_address field before setting the value (#27441)
Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
2021-09-18 13:21:45 +05:30
Frappe PR Bot
e9da4ed34d fix: manually added weight per unit reset to zero after save (#27330) (#27338)
(cherry picked from commit 7b4a65484a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2021-09-03 22:54:49 +05:30
Frappe PR Bot
1063d85569 fix: Correct company address not getting copied from Purchase Order to Invoice (#27217) (#27235)
* fix: Correct company adderess not getting copied from Purchase Order to Invoice

* fix: Linting issues

(cherry picked from commit fd467e6d32)

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-08-31 20:11:21 +05:30
Frappe PR Bot
a7cdba24bc feat: coupon code discount in pos invoice (#27103) 2021-08-24 19:47:40 +05:30
Saqib
dbca11071e refactor: scan barcode field scanning (#26990) (#27076) 2021-08-23 11:23:46 +05:30
marination
f22b858253 fix: Clean Serial No input on Server Side 2021-08-10 14:35:41 +05:30
Deepesh Garg
8d52a22709 fix: Additional discount calculations in Invoices (#26553)
* fix: Additional discount calculations in Invoices

* revert: Client side handling for Dynamic GST Rates

* fix: Add update item tax template method back

* fix: Revert refresh field

* fix: add company change trigger
2021-07-26 19:00:57 +05:30
Deepesh Garg
03b629c851 Merge pull request #26100 from deepeshgarg007/pi_billing_address
fix: Billing address not fetched in Purchase Invoice
2021-06-24 10:29:01 +05:30
Saqib
fb89008a13 fix(pos): unsupported operand type -=: for 'float' and 'NoneType' (#26097) 2021-06-21 10:49:09 +05:30
Rohit Waghchaure
ddb0ec261a fix: code cleanup and convert public method to private for subcontracting class 2021-06-19 23:16:23 +05:30
Deepesh Garg
a58b571ccb fix: Billing address not fetched in Purchase Invoice 2021-06-18 10:45:35 +05:30