Commit Graph

209 Commits

Author SHA1 Message Date
mergify[bot]
c55f8e3388 fix: Discount and taxes in return document should follow the reference document (backport #41911) (#42573)
* fix: Discount and taxes in return document should follow the reference document (#41911)

* fix: Discount and taxes in return document should follow the reference document

* fix: Ignore Pricing rule on debit/credit note if created against PI/SI with test cases

* fix: linter issue

(cherry picked from commit 281198456d)

# Conflicts:
#	erpnext/controllers/sales_and_purchase_return.py

* fix: resolved conflict

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-09-02 11:12:22 +05:30
Dany Robert
cf34219c71 fix: specify precision for net_amount (#39481)
* fix: specify precision for net_amount

* fix: correct existing test to account for precision

* fix: rounding issue in test cases

* fix: optional grand total manipulation

* fix: use `grand_total_diff` for manipulation

* fix: patch to set default for grand total manipulation

* fix: wrong rounding assertion for USD

* fix: undefined this.frm error

* chore: linters

* fix: `net_amount` percision and method rename

* fix: missing frm reference

* chore: minor cleanups and depr message

* refactor: remove optional adjusting of grand total

(cherry picked from commit 50d56db0c2)

# Conflicts:
#	erpnext/public/js/controllers/accounts.js
#	erpnext/public/js/controllers/taxes_and_totals.js
2024-08-19 04:36:52 +00:00
Akhil Narang
4d34b1ead7 refactor(treewide): formatting and ruff fixes, + manually enabled F401
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 17:13:31 +05:30
ljain112
30315aba37 fix: default taxable value for item not found in item list
(cherry picked from commit 5885978fc2)
2024-02-27 16:39:03 +00:00
Dany Robert
296433a1dd fix: wrong round off and rounded total
(cherry picked from commit 3a487bd33a)
2023-11-19 13:49:05 +00:00
rohitwaghchaure
63f45739e0 fix: incorrect status of the returned purchase receipt (#37300) 2023-10-06 11:58:15 +05:30
DaizyModi
6f2e639182 fix: itemised tax breakup 2023-07-25 11:44:48 +05:30
Sagar Vora
73e9b38cda fix(regional): set frappe.flags.company temporarily, where required
(cherry picked from commit 4205f564a0)
2023-07-24 14:05:34 +00:00
Sagar Vora
789dfd6774 fix: set frappe.flags.company to call regional code accurately
(cherry picked from commit 17ef3c964f)
2023-04-20 12:18:20 +00:00
mergify[bot]
9f7da21c93 feat: Support for Alternative Items in Quotation (#33874)
* feat: Filter out alternative item rows in taxes and totals for Quotation

- Added a Quotation Item field `is_alternative_item`
- Use filtered rows for taxes and totals computation

(cherry picked from commit 91982d1e4f)

# Conflicts:
#	erpnext/selling/doctype/quotation_item/quotation_item.json

* feat: Consider filtered items table in JS for totals computation

- Set `_items` as filtered rows if quotation else the entire table. Set at entry point of JS API
- Use `_items` instead of `items` to compute taxes and charges. Exclude alternative item rows

(cherry picked from commit f19eadab9a)

* feat: Dialog to select alternative item before creating Sales order

- Users can leave the row blank in the dialog if original item is to be used
- Else users can select an alternative item against an original item
- In the document, users must check `Is Alternative Item` if needed and also specify which item it is an altenrative to since there are no documented mappings

(cherry picked from commit cef7dfd0b4)

# Conflicts:
#	erpnext/selling/doctype/quotation/quotation.js
#	erpnext/selling/doctype/quotation_item/quotation_item.json

* feat: Filter rows to be mapped on server side mapping function

- Pass dialog selections to `make_sales_order`
- Map either original item or its alternative depending on mapping
- Only qty check for simple rows (without alternatives and not an alternative itself)

(cherry picked from commit 94cacb60de)

* chore: Validate 'alternative_to' field values, must be a valid non-alterntaive item from table

(cherry picked from commit fa9b327501)

* fix: Iterate over list instead of map's output and formatting

(cherry picked from commit ece6358e60)

* fix: Consider only ordered alternative/original item for Quotation status

- The original and its alternatives make a set of items where one is chosen
- While setting order status of Quotation, check if the chosen item from the set is fully ordered or not
- Filter out unselected items from the set
- Create a map containing the set of items and if they were ordered or not for ease of grouping
- The simple items will work as it used to

(cherry picked from commit b3fe7c6dad)

* chore: Code simplification

- Map is not required, avoid filter multiple times, use single loop instead
- Better variable name
- Reduce LOC

(cherry picked from commit 03321f5f13)

* refactor: Order based alternative items mapping

- Alternatives must be followed by a non-alternative item row
- On submit, store non-alternative rows in hidden checkbox to avoid recomputation
- Check for valid/mappable rows by row name
- UI: Select from table rows.Add single row for original/alternative item in dialog
- UI: Indicator for alternative items in dialog grid
- UI: Indicator legend and description of table
- DB: Added check field 'Has Alternative Item' not to be confused with 'Has Alternative' in Mfg

(cherry picked from commit db2076db69)

# Conflicts:
#	erpnext/selling/doctype/quotation_item/quotation_item.json

* test: Alternative items in Quotation

- Taxes and totals, mapping, back updation

(cherry picked from commit 74fab53e28)

* fix: Use block variable

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 3c96791d52)

* fix: Handle `Get Items From` in Sales Order

- Map all non alternatives from Quotation to SO if no selected items
- Show disclaimer mentioning that Qtns with alternatives must be mapped to SO from the Qtn form

(cherry picked from commit 19456127cf)

* fix: Map only non alternative items from Quotation in Sales Invoice

- Since there's no item selection, only Quotation selection :/

(cherry picked from commit 6b789e2f04)

* fix: Merge conflicts

---------

Co-authored-by: marination <maricadsouza221197@gmail.com>
2023-03-16 11:50:19 +05:30
mergify[bot]
623c35dfe1 refactor: use DocStatus (#33594)
refactor: use DocStatus (#33594)

(cherry picked from commit 67cf7e1728)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-01-16 08:45:31 +05:30
Daizy Modi
34ca17ab11 perf: use get_cached_value instead of db.get_value in controllers (#32776)
(cherry picked from commit 4efc947f14)
2022-11-07 03:52:39 +00:00
Deepesh Garg
b9fb1045d7 feat: Item Wise TDS Calculation 2022-11-06 11:50:20 +05:30
Deepesh Garg
a260426dd4 fix: Mode of payment for returns in POS Sales Invoice
(cherry picked from commit 06e8e28531)
2022-11-01 16:00:18 +00:00
Saqib Ansari
319ee41403 fix(pos): error while consolidating pos invoices
(cherry picked from commit 33762dbbac)
2022-09-04 07:56:31 +00:00
Deepesh Garg
6c4fcd80c6 fix: Rounded total for cash and non trade discount invoices
(cherry picked from commit 318da16b99)
2022-08-29 10:06:08 +00:00
Deepesh Garg
b6d2de2cc1 fix: Cash and non trade discount calculation
(cherry picked from commit 3b15966cc9)
2022-08-23 04:49:57 +00:00
Deepesh Garg
e54ec4b9b6 chore: use get instead of . operator 2022-07-03 11:02:21 +05:30
Deepesh Garg
169ff5a0dd feat: Cash and Non trade discounts in Sales Invoice 2022-06-19 21:18:12 +05:30
Deepesh Garg
631545aa32 fix: Use get instead of dot
(cherry picked from commit 95298f0400)
2022-04-06 04:31:13 +00:00
Deepesh Garg
714fc08150 fix: Do not apply shipping rule for POS transactions
(cherry picked from commit c0ebcfb393)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
2022-04-06 04:31:13 +00:00
Ankush Menat
3821a97a75 Merge branch 'develop' into mergify/bp/develop/pr-30395 2022-03-28 20:14:19 +05:30
Ankush Menat
494bd9ef78 style: format code with black 2022-03-28 18:52:46 +05:30
Deepesh Garg
19b1b1f4ba test: test for auto write-off amount
(cherry picked from commit 6a50f36b31)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
2022-03-25 15:27:12 +00:00
Deepesh Garg
b2ac773cca fix: Ignore for Purchase Invoices
(cherry picked from commit d3fd2fd2c5)
2022-03-25 15:27:11 +00:00
Deepesh Garg
f57f4af1d9 fix: Write off amount wrongly calculated in POS Invoice
(cherry picked from commit ee4258e42c)
2022-03-25 15:27:10 +00:00
Deepesh Garg
97e102ceef fix: Condition
(cherry picked from commit 2e0e6ca6b1)
2022-03-25 07:30:41 +00:00
Deepesh Garg
a83a0a03b1 fix: Revert rate calculation
(cherry picked from commit 6937a498e7)
2022-03-25 07:30:40 +00:00
Saqib Ansari
935218598a Merge pull request #30198 from nextchamp-saqib/pos-fixes-#12
fix(pos): do not reset mode of payments in case of consolidation
2022-03-14 12:34:40 +05:30
Saqib Ansari
e8a7a54d5a fix(pos): do not reset mode of payments in case of consolidation 2022-03-12 19:20:48 +05:30
Deepesh Garg
d596e0e4df fix: Shipping rule application fixes 2022-03-10 20:56:36 +05:30
Saqib Ansari
56eb485eec Merge pull request #30097 from nextchamp-saqib/fix-pos-round-off
fix(pos): multiple pos round off cases
2022-03-08 11:24:47 +05:30
Saqib Ansari
17445c7e04 fix(pos): multiple pos round off cases 2022-03-07 18:01:07 +05:30
Deepesh Garg
d95f8934aa fix: Test cases with discount 2022-03-01 23:09:59 +05:30
Ankush Menat
bbc4710fa3 fix: apply margin on duplicated doc too 2022-03-01 11:48:28 +05:30
Deepesh Garg
3a547cb0d9 fix: Item discounts for quotation 2022-02-22 16:25:32 +05:30
Saqib Ansari
75256863c6 fix(test): do not enable negative stock 2022-02-09 16:07:33 +05:30
Saqib Ansari
c2b83a0283 fix(test): case if write off is calculated as negative amount 2022-02-08 17:36:39 +05:30
Saqib Ansari
0452d7de20 fix(pos): incorrect grand_total in case of inclusive taxes on item 2022-02-08 11:26:23 +05:30
Deepesh Garg
b83608b029 Merge pull request #28994 from nextchamp-saqib/zero-qty-debit-note
fix: cannot create debit note with zero qty
2022-01-07 18:35:24 +05:30
Deepesh Garg
9d3a5c3184 fix: Inconsistency in calculating outstanding amount 2022-01-06 18:58:49 +05:30
Saqib Ansari
04ea42ce52 fix(sales-invoice): cannot create debit note with zero qty 2021-12-22 13:23:42 +05:30
Subin Tom
a8e2c02e14 fix: fixed tests, separated a method for shipping charges 2021-11-16 19:06:49 +05:30
Deepesh Garg
74ccaeb07d Merge branch 'develop' into shipping-rule-updation-error 2021-11-15 20:34:05 +05:30
Subin Tom
af1fce0419 fix: check if shipping rule value exists 2021-11-10 16:49:12 +05:30
Subin Tom
18ae03d967 fix: calling shipping rule method during net_total calculation in taxes_adn_totals.py 2021-11-10 15:57:41 +05:30
Ankush Menat
8fe5feb6a4 chore: remove all six compat code 2021-11-05 11:16:29 +05:30
Ankush Menat
6098e92ba9 chore: remove utf-8 compat code 2021-11-05 11:16:29 +05:30
Subin Tom
75a76e634d fix: POS consolidated invoice rounded total issue (#28006) 2021-10-29 16:45:04 +05:30
Chillar Anand
915b34391c chore: Clean up imports (#27302)
* chore: Added isort to pre-commit config

* chore: Sort imports with isort

* chore: Clean up imports with pycln

* chore: Sort imports with isort

* chore: Fix import issues

* chore: Clean up sider issues

* chore: Remove import errors from flake8 ignore list

* chore: Clean up lint issues
2021-09-02 16:44:59 +05:30