Commit Graph

199 Commits

Author SHA1 Message Date
Anand Baburajan
79483cc90e fix: don't set default payment amount in case of invoice return (#35645) 2023-06-12 18:34:13 +05:30
Dany Robert
c0f9ff4995 fix: broken save on empty row existance
(cherry picked from commit d9b231aa16)
2023-05-09 13:02:54 +00:00
ruthra kumar
b835760b0b fix: enclose ternary operator in parentheses
(cherry picked from commit 986daa6578)
2023-03-31 08:02:13 +00:00
mergify[bot]
d24f4d2873 fix(client): Amount calculation for 0 qty debit notes (#34455)
fix(client): Amount calculation for 0 qty debit notes (#34455)

fix(client): Amount calculaton for 0 qty debit notes

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
(cherry picked from commit ee6c107d58)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-03-21 16:05:41 +05:30
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
ruthra kumar
9cd7b27ce0 fix: pos return throwing amount greater than grand total
(cherry picked from commit 35c70f39fa)
2023-02-28 12:53:32 +00:00
mergify[bot]
87a8c17314 fix: Amount for debit and credit notes with 0 qty line items (#33902)
fix: Amount for debit and credit notes with 0 qty line items (#33902)

(cherry picked from commit 47c91324b1)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-02-11 11:53:47 +05:30
barredterra
219aa81eb6 fix: missing constant definition
(cherry picked from commit 547d37b1db)
2023-01-21 16:59:14 +00:00
mergify[bot]
1c1c903fee fix: calculate correct amount for qty == 0 (#33739)
fix: calculate correct amount for qty == 0 (#33739)

(cherry picked from commit 327b6fdb32)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-01-20 19:43:31 +05:30
Sabu Siyad
afbd48f26e fix(pos): variable typo: s_pos -> is_pos
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 7d64bf78cf)
2022-12-13 09:52:15 +00:00
Sabu Siyad
fae941c4e3 fix(lint): trailing whitespace
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit c5edbe2e2f)
2022-12-01 06:12:26 +00:00
Sabu Siyad
91920f4d84 fix(pos): partial return amount update
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit a378619c9a)
2022-12-01 06:12:25 +00:00
Deepesh Garg
856a64b77c chore: Linting issues
(cherry picked from commit 1cb7ae16ab)
2022-08-23 04:49:57 +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
Saqib Ansari
268f413f56 fix(pos): paid amount calculation for multicurrency invoice (#31112) 2022-05-25 11:40:49 +05:30
Deepesh Garg
227a711d70 Merge pull request #30585 from frappe/mergify/bp/develop/pr-30575
fix: Do not apply shipping rule for POS transactions (backport #30575)
2022-04-10 20:12:53 +05:30
Deepesh Garg
cbd8998fc1 Merge branch 'develop' into mergify/bp/develop/pr-30438 2022-04-09 20:03:23 +05:30
Deepesh Garg
e30cc8422c fix: Resolve conflicts 2022-04-09 19:53:40 +05:30
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
Deepesh Garg
33fa14b6cf fix: Resolve conflicts 2022-03-27 19:23:53 +05:30
Deepesh Garg
18c5b24ac1 fix: Update condition 2022-03-27 19:20:37 +05:30
Deepesh Garg
fc09377de2 fix: Resolve conflicts 2022-03-27 19:18:32 +05:30
Deepesh Garg
485e6b6a09 fix: Incorrect default amount to pay for POS invoices
(cherry picked from commit a044e92687)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
2022-03-27 12:31:36 +00:00
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
8cfa3a9ece fix: Ignore for Purchase Invoices
(cherry picked from commit ed38679d22)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
2022-03-25 15:27:11 +00:00
Deepesh Garg
d04d3038f5 fix: Client side changes for POS Write off amount
(cherry picked from commit 2e33e748ea)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
2022-03-25 15:27:10 +00:00
Deepesh Garg
d596e0e4df fix: Shipping rule application fixes 2022-03-10 20:56:36 +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
e7b4204c35 fix: sider issues 2021-11-16 20:39:58 +05:30
Subin Tom
a8e2c02e14 fix: fixed tests, separated a method for shipping charges 2021-11-16 19:06:49 +05:30
Subin Tom
c78b8b7897 fix: Shipping Rule picking up old net_rate 2021-11-09 14:46:45 +05:30
Ankush Menat
393749a611 fix: dont recompute item wise taxes from front end 2021-10-19 14:13:34 +05:30
Subin Tom
7d627df4db fix: pos return payment mode issue (#26872) 2021-08-23 11:05:07 +05:30
Rohit Waghchaure
eb1e3181a4 fix: conflicts while merging brnach version-13 to develop 2021-08-17 10:53:19 +05:30
Frappe PR Bot
1167a9bf94 fix: unsetting of payment if no pos profile found (#26891)
* fix: unseting of payment if no pos profile found (#26884)

(cherry picked from commit b614834efe)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js

* fix: conflicts

* fix: conflicts

* fix: conflicts

* fix: conflicts

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
Co-authored-by: Afshan <afshan13k@gmail.com>
2021-08-10 23:18:23 +05:30
Afshan
b614834efe fix: unseting of payment if no pos profile found (#26884) 2021-08-10 21:33:58 +05:30
Subin Tom
793063bf4e fix: pos return payment mode issue (#26875) 2021-08-10 15:57:30 +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
Anurag0911
4128aa7628 fix: syntax error (#26610)
Removed "," at erpnext/public/js/controllers/taxes_and_totals.js:87
2021-07-23 16:52:42 +05:30
Nabin Hait
595c7a6e61 fix: merge conflict 2021-07-22 17:11:20 +05:30
Nabin Hait
13466bba90 Merge pull request #26588 from deepeshgarg007/tax_flow_fix_pre_release
fix: Additional discount calculations in Invoices
2021-07-22 11:30:47 +05:30
Deepesh Garg
9fa92c912b fix: Revert refresh field 2021-07-21 23:18:17 +05:30
Deepesh Garg
50b188214d revert: Client side handling for Dynamic GST Rates 2021-07-21 23:18:17 +05:30
Deepesh Garg
f9da88cb15 fix: Additional discount calculations in Invoices 2021-07-21 23:17:56 +05:30
Deepesh Garg
07d9f3f74b fix: Incorrect discount amount on amended document 2021-07-13 15:35:59 +05:30
Deepesh Garg
4ff98cc171 fix: Incorrect discount amount on amended document 2021-07-12 11:27:28 +05:30
Deepesh Garg
991d3cdd76 fix: Incorrect discount amount on amended document 2021-07-01 21:17:17 +05:30
Deepesh Garg
7b7796c1ed fix: Linting fixes 2021-06-24 21:13:18 +05:30