Compare commits

...

1005 Commits

Author SHA1 Message Date
mergify[bot]
6ad2684121 fix: dont fetch entire barcode table in get_item_details (#30131) (#30667)
(cherry picked from commit 64905188c4)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-04-10 11:53:28 +05:30
Rohit Waghchaure
1413af8f3a Merge branch 'v12-pre-release' into version-12 2022-02-15 22:29:43 +05:30
Rohit Waghchaure
9a1afeb13b bumped to version 12.29.0 2022-02-15 22:49:43 +05:50
rohitwaghchaure
13a9b304b7 Merge pull request #29817 from rohitwaghchaure/change-log-for-v12-29
chore: change log for v12.29.0
2022-02-15 22:27:38 +05:30
Rohit Waghchaure
ee7ac93ff3 chore: change log for v12.29.0 2022-02-15 19:49:04 +05:30
rohitwaghchaure
3aa4411a0d Merge pull request #29602 from rohitwaghchaure/merge-branch-hotfix-to-pre-release-for-12-29
chore: merge branch 'version-12-hotfix' into 'v12-pre-release'
2022-02-03 13:06:56 +05:30
Rohit Waghchaure
7db947550b chore: merge branch 'version-12-hotfix' into 'v12-pre-release' 2022-02-02 23:20:27 +05:30
Saqib Ansari
c74a6f1827 Merge pull request #29291 from GangaManoj/prevent-depr-of-sold-assets
fix: Display 'Make Depreciation Entry' only for submitted or partially depreciated Assets
2022-01-14 18:49:13 +05:30
GangaManoj
73243c8ac3 fix: Hide Make Depreciation Entry if the Asset is not in the Submitted or Partially Depreciated state 2022-01-14 17:40:59 +05:30
GangaManoj
1800ce2780 fix: Only allow posting of Depreciation Entries if the Asset is in the Submitted or Partially Depreciated state 2022-01-14 15:33:16 +05:30
Ankush Menat
e5ea16a6dd fix: loosen dependencies for pandas 2022-01-10 18:12:50 +05:30
Rohit Waghchaure
54cb62c7bf Merge branch 'v12-pre-release' into version-12 2022-01-02 23:41:11 +05:30
Rohit Waghchaure
11ad77f491 bumped to version 12.28.0 2022-01-03 00:01:11 +05:50
rohitwaghchaure
95b0c743d4 Merge pull request #29097 from rohitwaghchaure/change-log-for-v12-28
chore: change log for v12.28.0
2022-01-02 23:38:20 +05:30
Rohit Waghchaure
fee83e8ba4 chore: change log for v12.28.0 2022-01-02 23:28:09 +05:30
rohitwaghchaure
4c5b5607ba Merge pull request #29074 from rohitwaghchaure/merge-hotfix-to-pre-release-for-12-28
chore: Merge branch 'version-12-hotfix' into 'v12-pre-release'
2021-12-30 11:27:41 +05:30
Rohit Waghchaure
00b40c0f3c fix: failing test case 2021-12-30 10:14:14 +05:30
Rohit Waghchaure
ac08379f2b chore: Merge branch 'version-12-hotfix' into 'v12-pre-release' 2021-12-29 23:40:23 +05:30
rohitwaghchaure
753adf3ce4 Merge pull request #29063 from rohitwaghchaure/fixed-backport-issue
fix: travis failing
2021-12-29 23:27:46 +05:30
Rohit Waghchaure
fbbf29e829 fix: travis failing 2021-12-29 15:46:14 +05:30
Ganga Manoj
ce2aa767b2 fix: Use depreciation cost center for creating credit entries in JEs (#28908) 2021-12-23 12:04:15 +05:30
Ankush Menat
c9927efcae test: dynamic fiscal year creation in tests (#28667)
(cherry picked from commit fdffa037b5)

fix: resolve conflict

fix
2021-12-14 22:50:26 +05:30
Rucha Mahabal
e9dbb46a06 fix: incorrect amount based on payment days in timesheet salary slip (#28884) 2021-12-14 20:04:37 +05:30
mergify[bot]
39125a78e0 fix!: dont allow renaming warehouse primary key (backport #28712)
* fix!: dont allow renaming warehouse primary key

(cherry picked from commit 72dbc3d6b8)

* fix: remove autocommit from item rename

(cherry picked from commit 5caf411be3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2021-12-14 17:45:08 +05:30
Saqib
2a00164059 Merge pull request #28848 from frappe/mergify/bp/version-12-hotfix/pr-28797
fix: validate if asset account is set against company (backport #28797)
2021-12-13 22:41:15 +05:30
Saqib
7d1953bb3b fix: validate if asset account is set against company
(cherry picked from commit c3e0de28b1)
2021-12-13 14:44:48 +00:00
Deepesh Garg
33eeb64fec Merge pull request #28463 from frappe/mergify/bp/version-12-hotfix/pr-28459
fix(India): GST category not getting auto updated (backport #28459)
2021-12-03 09:39:09 +05:30
Rohit Waghchaure
bbffb5d91e Merge branch 'v12-pre-release' into version-12 2021-12-02 20:30:31 +05:30
Rohit Waghchaure
260b9c1885 bumped to version 12.27.0 2021-12-02 20:50:31 +05:50
rohitwaghchaure
034e8bd028 Merge pull request #28695 from rohitwaghchaure/change-log-for-v12-27
chore: change log for v12.27
2021-12-02 20:28:59 +05:30
Rohit Waghchaure
eb8b03f590 chore: change log for v12.27 2021-12-02 20:26:13 +05:30
mergify[bot]
abb4d99ca8 fix: actual tax conversion in case of multicurrency invoices (#28687) 2021-12-02 15:01:06 +05:30
rohitwaghchaure
a6fd5a69e8 Merge pull request #28674 from rohitwaghchaure/merge-hotfix-to-pre-release-for-12-27
chore: Merge branch 'version-12-hotfix' into 'v12-pre-release'
2021-12-02 11:03:53 +05:30
Rohit Waghchaure
849c795113 fix: test case for fiscal year 2021-12-02 00:03:25 +05:30
Rohit Waghchaure
3647a24f60 chore: Merge branch 'version-12-hotfix' into 'v12-pre-release' 2021-12-01 23:03:34 +05:30
Deepesh Garg
67f17c7a0c fix: Remove tests 2021-11-29 18:05:36 +05:30
Ankush Menat
24c004b537 fix: use get_all instead of get_list for child tables
(cherry picked from commit f862339024)
2021-11-29 16:28:04 +05:30
Ankush Menat
1fce25180c chore: correct docstrings
(cherry picked from commit c7701ace80)
2021-11-29 16:28:04 +05:30
Saqib
23946cea2e fix: debit & credit currency in bank transaction (#28574) 2021-11-29 15:13:22 +05:30
mergify[bot]
1b78c501a1 fix: incorrect balance for warehouses (#28583) (#28585)
(cherry picked from commit 7ff30a4b2b)

Co-authored-by: Noah Jacob <noahjacobkurian@gmail.com>
2021-11-26 17:36:16 +05:30
Deepesh Garg
d09ed0a578 fix: Conflicts 2021-11-19 13:11:07 +05:30
Deepesh Garg
9b83e3856a fix: Add test for gst category check
(cherry picked from commit cdbc991e3f)

# Conflicts:
#	erpnext/regional/doctype/gstr_3b_report/test_gstr_3b_report.py
2021-11-19 06:52:43 +00:00
Deepesh Garg
656686f2b1 fix(India): GST category not getting auto updated
(cherry picked from commit f8a26a9fac)
2021-11-19 06:52:42 +00:00
mergify[bot]
8e7ee953c1 chore: remove woocommerce package (#25736) (#28424)
This is not used anywhere. It was added in this commit
df83148d7c
even there it isn't being used.

(cherry picked from commit e1ab290911)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-11-17 09:50:18 +05:30
mergify[bot]
d2af2b31e5 fix: validate hmac unconditionally (#28375)
(cherry picked from commit c0f06bc8e3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2021-11-12 14:53:51 +05:30
mergify[bot]
f79651c54d fix(WooCommerce): always expect signature in webhook requests (#28371)
(cherry picked from commit 24b048925b)

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-11-12 14:10:49 +05:30
mergify[bot]
80ba0cf978 fix: specify fields to be set in Lead (backport #28288)
* fix: specify fields to be set in Lead (#28288)

(cherry picked from commit da22744e0f)

# Conflicts:
#	erpnext/shopping_cart/cart.py

* fix: merge conflict

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-11-09 16:05:37 +05:30
Deepesh Garg
30c1a7bb20 Merge pull request #28279 from frappe/mergify/bp/version-12-hotfix/pr-28065
fix(minor): check if gst_category exists while validating GSTIN (backport #28065)
2021-11-09 13:48:29 +05:30
Anuja Pawar
d119b4321d fix: sider
(cherry picked from commit f2fbcc8124)
2021-11-08 18:37:03 +00:00
Anuja Pawar
4b1befb691 fix: update set_value query
(cherry picked from commit dd3cadd46b)
2021-11-08 18:37:01 +00:00
Anuja Pawar
fa5e018330 fix: re-writing sql query with ORM methods
(cherry picked from commit bc1e7bc15f)
2021-11-08 18:36:58 +00:00
Anuja Pawar
8c84d6a1d9 fix: sider
(cherry picked from commit 6a3bd882b4)
2021-11-08 18:36:56 +00:00
Anuja Pawar
f76139dceb fix: sider
(cherry picked from commit 4f53837624)
2021-11-08 18:36:54 +00:00
Anuja Pawar
97544e2bbc fix: check if gst_category exist
(cherry picked from commit 59c31bb124)
2021-11-08 18:36:53 +00:00
mergify[bot]
117718d410 fix: ignore unsupported methods while resyncing (#28210) (#28211)
(cherry picked from commit 72a050fb0b)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2021-11-02 23:09:44 +05:30
Marica
bcb0683be1 Merge pull request #28198 from frappe/mergify/bp/version-12-hotfix/pr-28195
fix: (ux) Remove warehouse filter on Batch field for Material Receipt (backport #28195)
2021-11-02 17:04:23 +05:30
marination
bf5f0a226e chore: Add comment above fix for future reference
(cherry picked from commit 48886ee705)
2021-11-02 10:41:16 +00:00
marination
55aaefb53c fix: Remove warehouse filter on Batch field for Material Receipt
(cherry picked from commit 048210a8f6)
2021-11-02 10:41:15 +00:00
Rohit Waghchaure
52ed3c219b Merge branch 'v12-pre-release' into version-12 2021-10-30 15:04:29 +05:30
Rohit Waghchaure
1e378cfde0 bumped to version 12.26.0 2021-10-30 15:24:29 +05:50
rohitwaghchaure
29f5d434d8 Merge pull request #28158 from rohitwaghchaure/v12-change-log-fix
fix: change log
2021-10-30 15:01:51 +05:30
Rohit Waghchaure
aa0e21e84b fix: change log 2021-10-30 15:00:32 +05:30
rohitwaghchaure
34bf2004bb Merge pull request #28157 from rohitwaghchaure/v12-pre-release
chore: change log for v12.26.0
2021-10-30 14:58:19 +05:30
Rohit Waghchaure
7ac656d737 chore: change log for v12.26.0 2021-10-30 14:44:31 +05:30
Ankush Menat
ba537b0b93 fix: py2 string formatting 2021-10-29 15:41:55 +05:30
mergify[bot]
89b0e5023a fix: Skip empty rows while updating unsaved BOM cost (#28136) (#28141)
- Dont try to get valuation rate if row has no item code
- Dont try to add exploded items if row has no item code

(cherry picked from commit 292419bc9e)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-10-29 15:40:14 +05:30
rohitwaghchaure
a0e4708470 Merge pull request #28130 from rohitwaghchaure/merge-v12-hotfix-into-pre-release-for-v12-26
chore: Merge branch 'version-12-hotfix' into 'v12-pre-release'
2021-10-29 00:48:30 +05:30
Rohit Waghchaure
e60d7ac09e fix: python2 string formatting 2021-10-28 23:11:53 +05:30
Rohit Waghchaure
d6555e8632 Merge branch 'version-12-hotfix' into 'v12-pre-release' 2021-10-28 22:19:15 +05:30
Saqib
14602178e7 Merge pull request #28076 from GangaManoj/gross-profit-backport
feat: Make Gross Profit Report more readable
2021-10-27 15:07:23 +05:30
GangaManoj
5f2819c9b1 fix: Add column names 2021-10-25 02:24:19 +05:30
GangaManoj
5bc7d63646 fix: Get Bundle Items 2021-10-25 02:22:27 +05:30
GangaManoj
94162e0139 fix: Get Bundle Items 2021-10-25 02:15:56 +05:30
GangaManoj
e2e751e26f fix: Remove comments 2021-10-25 02:15:31 +05:30
GangaManoj
70244cee89 fix: Get data when grouped by invoice and otherwise 2021-10-25 02:15:03 +05:30
GangaManoj
ae6e69ebd4 fix: Display only the Invoice rows in bold 2021-10-25 02:14:32 +05:30
GangaManoj
6fdf4dd03e fix: Remove base_rate and buying_rate for Invoice rows 2021-10-25 02:12:21 +05:30
GangaManoj
4aede0ea3f fix: Calculate total buying_amount for each invoice 2021-10-25 02:11:14 +05:30
GangaManoj
de660bf9c4 fix: Fetch bundle item details 2021-10-25 02:11:10 +05:30
GangaManoj
391bf86e0a fix: Fetch base_net_total for each Invoice 2021-10-25 02:10:43 +05:30
GangaManoj
452c613974 fix: Calculate total buying_amount and gross profit for each invoice 2021-10-25 02:08:40 +05:30
GangaManoj
dd7b02ad7d fix: Remove Item Code and Item Name columns 2021-10-25 02:08:39 +05:30
GangaManoj
7cc02bf861 fix: Display Items in the format Item Code: Item Name 2021-10-25 02:08:36 +05:30
GangaManoj
678960209c fix: Add items belonging to Product Bundles as children 2021-10-25 02:08:12 +05:30
GangaManoj
e4995dc9ed fix: Set initial_depth to 3 2021-10-25 02:08:12 +05:30
GangaManoj
7cf5dc7dab fix: Assign indent and parent_invoice 2021-10-25 02:08:08 +05:30
GangaManoj
e676a09c18 fix: Make Invoice row bold 2021-10-25 02:04:03 +05:30
GangaManoj
6431243ce3 fix: Display items as descendants of invoices 2021-10-25 02:04:00 +05:30
GangaManoj
49f93b347c fix: Display data in tree form 2021-10-25 02:02:02 +05:30
mergify[bot]
27e9e47ba8 chore: warning for shopify integration deprecation (backport #26701) (#28062)
* chore: warning for shopify integration deprecation (#26701)

* chore: warning for shopify integration deprecation

* fix: warn deprecation during patch for sysadmins

(cherry picked from commit e43bdf76a5)

# Conflicts:
#	erpnext/patches.txt

* fix: resolve conflicts

Co-authored-by: Ankush <ankush@iwebnotes.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2021-10-22 12:16:55 +05:30
Jannat Patel
c9f51d3cec Merge pull request #28017 from frappe/mergify/bp/version-12-hotfix/pr-27728
fix: Employee Leave Balance report should only consider ledgers of transaction type Leave Allocation (backport #27728)
2021-10-20 14:57:52 +05:30
Jannat Patel
9ae3f26dbf fix: conflicts 2021-10-20 12:34:04 +05:30
Goh Yan Chang
ad736f1789 Update employee_leave_balance.py
fix: Employee Leave Balance report showing wrong figures
(cherry picked from commit 632f7848a3)

# Conflicts:
#	erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
2021-10-20 06:58:37 +00:00
Ankush Menat
16ece12516 fix: py2 compatible string formatting 2021-10-09 18:12:07 +05:30
Gavin D'souza
c9e75d2ab5 fix(patch): Handle NULL values from fieldtype change 2021-10-09 18:08:46 +05:30
mergify[bot]
985fdade7e fix(asset): expected value after useful life validation (#27791) 2021-10-05 14:14:52 +05:30
Saqib
10c34da174 fix: unexpected keyword argument 'as_dict' (#27799) 2021-10-05 13:13:20 +05:30
mergify[bot]
d1480be596 fix: set item uom as stock_uom if it isn't set (backport #27623) (#27781)
* fix: set item uom as stock_uom if it isn't set (#27623)

* fix: set item uom as stock_uom if it isn't set

(cherry picked from commit 5c372202d5)

# Conflicts:
#	erpnext/stock/doctype/stock_entry/stock_entry.js

* fix: resolve conflicts

[skip ci]

Co-authored-by: Alan <2.alan.tom@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-04 22:50:11 +05:30
Noah Jacob
93a744dc12 fix: empty row on new maintenance visit. (#27626)
* fix: empty row on new maintenance visit.

* fix: check if rows exist
2021-09-30 15:40:37 +05:30
Saqib
a2b98bb80c fix: cannot delete a project if linked with sales order (#27690) 2021-09-28 19:47:08 +05:30
Frappe PR Bot
4fdff12242 fix: set item.qty as mandatory (#27681)
* fix: set item.qty as mandatory in picklist (#27680)

(cherry picked from commit b91333afdd)

# Conflicts:
#	erpnext/stock/doctype/pick_list_item/pick_list_item.json

* fix: resolve conflicts

Co-authored-by: Alan <2.alan.tom@gmail.com>
2021-09-28 07:48:37 +00:00
Jannat Patel
9c9cde48ad Merge pull request #27679 from pateljannat/revert-27037-salary-component-account-filter
Revert "fix: salary component account filter"
2021-09-28 11:44:34 +05:30
pateljannat
999a3f1305 Revert 'fix: salary component account filter' 2021-09-28 10:32:33 +05:30
mergify[bot]
8139672c7a fix: Validate if item exists on uploading items in stock reco (#27538) (#27593)
* fix: Validate if item exists on uploading items in stock reco

- Uploading non existent item in stock reco and then changing warehouse or batch gave an error
- Check for non existent item

* chore: translation

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-09-20 18:19:14 +05:30
Frappe PR Bot
7169a4c113 fix(plaid): query to check if bank account exists (#27594) 2021-09-20 16:41:26 +05:30
Rohit Waghchaure
bc960ab35f Merge branch 'v12-pre-release' into version-12 2021-09-20 16:33:16 +05:30
Rohit Waghchaure
f9e9c5f637 bumped to version 12.25.0 2021-09-20 16:53:16 +05:50
rohitwaghchaure
fbc8fb36dd Merge pull request #27599 from rohitwaghchaure/added-change-log-v12-25-0
chore: change log for v12.25.0
2021-09-20 16:31:22 +05:30
Rohit Waghchaure
6359e69503 chore: change log for v12.25.0 2021-09-20 16:28:15 +05:30
rohitwaghchaure
1d68d12b7a Merge pull request #27590 from rohitwaghchaure/merge-v12-hotfix-pre-release-for-v12-24-0
chore: merge version-12-hotfix into version-12-pre-release
2021-09-20 13:26:44 +05:30
Rohit Waghchaure
b7a74aa578 Merge branch 'version-12-hotfix' into merge-v12-hotfix-pre-release-for-v12-24-0 2021-09-20 12:23:03 +05:30
Frappe PR Bot
efddcbe42e fix: no validation on item defaults (#27548)
* fix: no validation on item defaults (#27393)

* fix: no validation on item defaults

* fix: cache value while validating

* test: item default company relation

* fix: reorder validations

* refactor: add guard conditions on update_defaults

* test: add default warehouse for item group

* fix: validate item defaults for item groups

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
(cherry picked from commit 5eba1ccd51)

# Conflicts:
#	erpnext/stock/doctype/item/item.py

* fix: resolve conflict and remove typehints for py2

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-09-16 19:55:43 +05:30
Rucha Mahabal
6f6e390863 fix: link to navigate to item template from variant (#27440) 2021-09-11 22:01:22 +05:30
Frappe PR Bot
7843c3d51a fix: set production plan to completed even on over production (#27027) (#27434)
(cherry picked from commit 09f34e558e)

Co-authored-by: Alan <2.alan.tom@gmail.com>
2021-09-11 13:21:46 +05:30
Frappe PR Bot
8871bd4bfb fix: document naming rule not working for subscription invoices (#27394) 2021-09-08 19:11:29 +05:30
Marica
d0a7141e35 Merge pull request #27333 from marination/subcontr-serial-no
fix: Prematurely referenced variable in buying controller for subcontracting
2021-09-03 20:56:02 +05:30
marination
6fe28e83e2 fix: Prematurely referenced variable in buying controller for subcontracting 2021-09-03 20:11:40 +05:30
Frappe PR Bot
abf353a286 Revert "fix: add child item groups into the filters (#26997)" (#27266) (#27267)
This reverts commit c60d5523bc.

(cherry picked from commit 763450dcf8)

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-08-31 19:13:25 +05:30
Dany Robert
cef6a8434a fix: remove unwanted serial numbers from fifo_queue (bp #27228)
fifo_queue.remove(serial_no) causes shift in index of the list and thereby not looping through every object in the list.
2021-08-31 10:51:43 +05:30
Frappe PR Bot
dc76094a9f fix: fetch from more than one sales order in Maintenance Visit (#27186)
* fix: fetch from more than one sales order in Maintenance Visit (#26924)

* [fix] #26336

* fix(ux): make customer field reqd for fetching SO

# Conflicts:
#	erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js

* fix: resolve conflicts

Co-authored-by: Pawan Mehta <mehtapawan007@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

(cherry picked from commit db69d1dc00)
2021-08-26 23:05:45 +05:30
Frappe PR Bot
1e428f9531 fix: don't allow BOM's item code at any level of child items (#27175)
* fix: don't allow BOM's item code at any level of child items (#27157)

* refactor: bom recursion checking

* fix: dont allow bom recursion

if same item_code is added in child items at any level, it shouldn't be allowed.

* test: add test for bom recursion

* test: fix broken prodplan test using recursive bom

* test: fix recursive bom in tests

(cherry picked from commit c07dce940e)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/test_bom.py
#	erpnext/manufacturing/doctype/production_plan/test_production_plan.py
#	erpnext/manufacturing/doctype/work_order/test_work_order.py

* fix: resolve conflicts

[skip ci]

* fix: conflicts

[skip ci]

* fix: resolve conflicts

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-08-26 19:28:12 +05:30
Raffael Meyer
710c1c1786 feat: add total_billing_hours to Sales Invoice (#26652)
* feat: add `total_billing_hours` to Sales Invoice

* refactor: sider fixes

* style: use double quotes
2021-08-26 12:34:09 +05:30
Nabin Hait
aa358b021e Merge pull request #24844 from dj12djdjs/fix-margin-calculation
fix: multiple price rules margin.
2021-08-24 21:15:28 +05:30
Frappe PR Bot
8bc37da20d fix: calculation of gross profit percentage in Gross Profit Report (#27045) (#27107)
(cherry picked from commit ad06fb2179)

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-08-24 20:07:06 +05:30
Frappe PR Bot
914709099f fix: discard empty rows from update items (#27021) (#27094)
(cherry picked from commit 6de7b8ea93)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-08-24 12:21:18 +05:30
rohitwaghchaure
87dddbe868 Merge branch 'version-12-hotfix' into fix-margin-calculation 2021-08-24 11:08:04 +05:30
Srikant Kedia
ca42b16d3a fix: Price list rate not fetched for return sales invoice fixed (#26593) 2021-08-23 15:38:08 +05:30
Rohit Waghchaure
73666982c7 Merge branch 'v12-pre-release' into version-12 2021-08-19 20:20:08 +05:30
Rohit Waghchaure
48bd1965e4 bumped to version 12.24.0 2021-08-19 20:40:07 +05:50
rohitwaghchaure
ab84579b0e Merge pull request #27041 from rohitwaghchaure/change-log-v12-24
chore: change log for v12.24.0
2021-08-19 20:18:05 +05:30
Rohit Waghchaure
8064792b8c chore: change log for v12.24.0 2021-08-19 18:46:16 +05:30
rohitwaghchaure
fe6c96cab9 Merge pull request #27037 from rohitwaghchaure/merge-v12-hotfix-to-pre-release
chore: merge v12 hotfix to v12 pre-release
2021-08-19 17:44:46 +05:30
Frappe PR Bot
d5e89d98c2 fix: add child item groups into the filters (#26997) (#27034)
* fix: add child item groups into the filters

* fix: appending values to proper variable

* fix: refactor the loop

(cherry picked from commit c60d5523bc)

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-08-19 17:09:21 +05:30
Frappe PR Bot
f8fa3860d9 fix: equality check instead of assignment (#27029)
* Merge pull request #27026 from ankush/eq_assign

fix: equality check instead of assignment

[skip ci]

(cherry picked from commit 993b0532f8)

* fix: equality check instead of assignment in cart

port of https://github.com/frappe/erpnext/pull/25372

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-08-19 15:48:51 +05:30
Türker Tunalı
d8a7abcd02 fix: date_unchanged calculation in "Update Items" (#26992)
Branch corrected https://github.com/frappe/erpnext/pull/26058

  ERPNext generates "Cannot set quantity less than delivered quantity" error even the delivered qty is zero when user clicks "Update Items".
  "date_unchanged" variable gets false value because of new_date is string. 
  
  "getdate(new_date)" corrects the date comparison.
  
  ![ERPNext_PR](https://user-images.githubusercontent.com/710051/121928377-c0263180-cd48-11eb-8cd9-eda7dace09d6.gif)
2021-08-18 17:43:58 +05:30
Ankush Menat
5bb9de8614 ci: backport action on v12 (#27009)
[skip ci]
2021-08-18 17:00:07 +05:30
Ankush Menat
0fd50e0426 fix(deps): pin plaid-python to 7.2.x (#26996)
* fix(deps): pin plaid-python to 7.2.x

Old requirement.txt was allowing next major version which has breaking
changes and causes failure in installation.

* fix(deps): remove frappe from requirements.txt
2021-08-18 08:02:22 +00:00
HENRY Florian
bdfc300896 fix: item name is missing into job card (#26956) 2021-08-17 15:33:26 +05:30
Sagar Vora
14292456cf Merge pull request #26978 from frappe-pr-bot/backport/version-12-hotfix/26976
fix: Incorrect `modified` time in documents that inherit from `StatusUpdater`
2021-08-17 13:21:16 +05:30
Sagar Vora
24d67c35b7 Merge pull request #26976 from resilient-tech/fix-incorrect-modified
fix: Incorrect `modified` time in documents that inherit from `StatusUpdater`
(cherry picked from commit d932cba38a)
2021-08-17 07:48:25 +00:00
Frappe PR Bot
8d71fcb948 fix: fix Payment references from disappearing on adding Cost Center in Payment Entry (#26939)
* fix: payment references from disappearing on selecting cost center (#24831)

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
(cherry picked from commit 9bf1083d9e)

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

* fix: conflicts

* fix: conflicts

Co-authored-by: Anuja Pawar <60467153+Anuja-pawar@users.noreply.github.com>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-08-13 17:45:16 +05:30
Frappe PR Bot
2945e604aa fix: remove limit from stock balance report (bp #26773)
(cherry picked from commit b3740e9afc)

Co-authored-by: Ankush <ankush@iwebnotes.com>
2021-08-13 15:44:13 +05:30
Deepesh Garg
ea085b3a76 Merge pull request #26674 from deepeshgarg007/gl_entry_deadlock
fix: Deadlock while doing payment reconciliation
2021-08-12 11:29:34 +05:30
Saqib
611966c139 fix(e-invoicing): cannot cancel invoice if IRN cancelled on portal (#26880) 2021-08-10 17:19:24 +05:30
Raffael Meyer
d650b55f52 Merge branch 'version-12-hotfix' into fix-margin-calculation 2021-08-09 13:21:40 +02:00
Ahmad
8eca908365 perf: speed up validate_account_for_perpetual_inventory (#26730) 2021-08-09 12:17:11 +05:30
Anupam Kumar
09d5ddc42b fix: bank remittance report issue (#26398) (#26767) 2021-08-04 14:03:01 +05:30
Nabin Hait
abd53b114c Merge pull request #25722 from rtdany10/patch-3
feat: Increase number of supported currency exchanges
2021-07-31 11:33:49 +05:30
Ankush
b1e932a6f8 fix: remove incorrect condition in GLE comparison (#26713) 2021-07-29 19:56:36 +05:30
Dany Robert
e6a3e6beb7 Merge branch 'version-12-hotfix' into patch-3 2021-07-29 16:48:12 +05:30
Dany Robert
239974c73e fix issue with cache.setex 2021-07-29 16:00:35 +05:30
Deepesh Garg
27ecb54b8c fix: Deadlock while doing payment reconciliation 2021-07-27 17:49:48 +05:30
Deepesh Garg
6b4b80a4a4 Merge pull request #26629 from deepeshgarg007/exchange_rate_reval_fixes_v12
fix: Exchange rate revaluation posting date and precision fixes
2021-07-27 16:40:11 +05:30
Jannat Patel
68225bbcad Merge pull request #25995 from hasnain2808/fix-issue-priorirty
fix: do not translate issue priority
2021-07-26 10:56:22 +05:30
Deepesh Garg
b549287b94 fix: Convert null values to empty string on grouping 2021-07-25 21:28:40 +05:30
Deepesh Garg
12c3e5dfd6 fix: Remove unintended changes 2021-07-25 21:27:56 +05:30
Deepesh Garg
c908add82e fix: Exchange rate revaluation posting date and precision fixes 2021-07-25 20:03:12 +05:30
Jannat Patel
c74f0f3530 Merge branch 'version-12-hotfix' into fix-issue-priorirty 2021-07-24 18:28:02 +05:30
pateljannat
2e5a358e96 fix: salary component account filter 2021-07-23 13:06:57 +05:30
Subin Tom
01f8833bd1 fix: Fixed clearing issue of payment references on setting cost center (#26548)
Co-authored-by: Subin Tom <subin-home@Subins-MacBook-Air.local>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-07-20 21:04:10 +05:30
Nabin Hait
5e37949411 Merge branch 'v12-pre-release' into version-12 2021-07-16 16:10:30 +05:30
Nabin Hait
c5a0c22352 Merge branch 'version-12' into version-12-hotfix 2021-07-16 16:10:30 +05:30
Nabin Hait
fc0459fba9 bumped to version 12.23.0 2021-07-16 16:30:30 +05:50
Nabin Hait
9a1caddacc chore: added change log for v12.23.0 2021-07-16 16:08:40 +05:30
Noah Jacob
b22cbb3122 fix: validation check when no conversion_factor (#26528) 2021-07-16 15:01:14 +05:30
rohitwaghchaure
f4a9e52cbe Merge pull request #26501 from rohitwaghchaure/fixed-taxes-not-working
fix: taxes not set correctly when items pulled from PO to PI
2021-07-16 11:40:56 +05:30
Rohit Waghchaure
24e1786e49 fix: taxes not set correctly when items pulled from PO to PI 2021-07-14 22:52:40 +05:30
Jannat Patel
5399891b25 fix: task status loop (#26007) 2021-07-14 14:43:59 +05:30
Jannat Patel
1b8670b263 fix: Removed company filter for Loan Type (#26463) 2021-07-13 15:29:58 +05:30
Jannat Patel
23db6a8e3a fix: added company filter while fetching loans (#26296)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-07-12 13:17:27 +05:30
Saqib
4c58fb40a8 fix: omit item discount amount for e-invoicing (#26408) 2021-07-12 11:05:37 +05:30
rohitwaghchaure
df045a61ed Merge pull request #26423 from rohitwaghchaure/fixed-serial-no-in-purchase-receipt
fix: serial no issue in subcontract purchase receipt
2021-07-11 10:25:51 +05:30
Rohit Waghchaure
6f7410073f fix: serial no issue in purchase receipt 2021-07-10 22:54:15 +05:30
Saqib
0ecf8f5d66 fix(e-invoicing): allow export invoice even if no taxes applied (#26406) 2021-07-09 15:33:40 +05:30
Jannat Patel
dfc68950c1 fix: lms progress issue (#26254)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-07-02 13:08:38 +05:30
Mohammed Yusuf Shaikh
ee7de6b107 fix: half day to be accounted in its leave type (#26267) 2021-07-02 12:31:59 +05:30
Mohammed Yusuf Shaikh
b2a090f073 fix: Added Permissions for employee to book an appointment (#26246)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-07-02 12:28:43 +05:30
Saqib
704f7b57b8 fix(plaid): cannot reset plaid link for a bank account (#26282) 2021-07-02 11:18:55 +05:30
meike289
8070d76450 feat: add check field for subscription invoice (#25560)
Co-authored-by: Meike Nedwidek <nedwidek@kk-software.de>
2021-06-28 18:35:03 +05:30
Noah Jacob
266563a99a fix: fixed rounding off ordered percent to 100 in condition (#26153) 2021-06-24 21:21:22 +05:30
Saqib
7270b89133 fix: invoices can alter profit and loss of a closed year (#26161) 2021-06-23 19:00:10 +05:30
Jannat Patel
57a68c317e fix: Staffing plan vacancies data type issue (#25940)
* fix: staffing plan vacancies data type issue

* fix: translation issue

* fix: removed greater than 0 condition

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-06-23 14:38:18 +05:30
Jannat Patel
fc44712976 fix: job applicant link issue (#25935)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-06-23 12:30:30 +05:30
Saqib
a80d9d81c8 fix(e-invoicing): service item check (#26141) 2021-06-22 14:25:53 +05:30
rohitwaghchaure
6a30025209 Merge pull request #26117 from rohitwaghchaure/fixed-linking-between-mr-and-sq-v12
fix: material request and supplier quotation not linked if supplier quotation created from supplier portal
2021-06-20 19:43:13 +05:30
Rohit Waghchaure
b9fb2349d6 fix: material request and supplier quotation not linked if sq created from supplier portal against rfq 2021-06-20 15:18:35 +05:30
Nabin Hait
2c30ad9465 Merge pull request #26089 from pateljannat/material-request-status-issue-backport
fix: material request status issue
2021-06-18 17:19:41 +05:30
Nabin Hait
67f80216fa Merge branch 'v12-pre-release' into version-12 2021-06-17 19:00:32 +05:30
Nabin Hait
2a8b3841bf Merge branch 'version-12' into version-12-hotfix 2021-06-17 19:00:32 +05:30
Nabin Hait
83b6746cd1 bumped to version 12.22.0 2021-06-17 19:20:32 +05:50
Nabin Hait
94f0aae625 chore: Added change log for v12.22.0 2021-06-17 18:56:13 +05:30
Deepesh Garg
0c4f67b884 Merge pull request #26091 from deepeshgarg007/cash_flow_position
fix: Update positions in default cashflow mappers
2021-06-17 17:17:22 +05:30
Deepesh Garg
fe1d985432 fix: Update positions in default cashflow mappers 2021-06-17 17:15:05 +05:30
pateljannat
57832fc9f8 fix: material request status issue 2021-06-17 10:53:45 +05:30
gavin
56a21343f4 Merge pull request #26001 from frappe/gavindsouza-patch-1
ci: Use only compatible version of bench CLI
2021-06-10 13:33:29 +05:30
gavin
bda432303c ci: Use only compatible version of bench CLI
bench CLI has dropped support for < PY3.6
2021-06-10 13:25:44 +05:30
hasnain2808
371d124a0e fix: do not translate issue priority 2021-06-09 18:40:15 +05:30
Anuja Pawar
3c5b33c241 fix: update cost center in SI (#25972) 2021-06-07 21:15:27 +05:30
Rucha Mahabal
85dca013ee fix: update employee field on renaming employee (#25958) 2021-06-07 15:02:49 +05:30
Saqib
d789dd3897 fix: wrong round off gl entry posted in case of purchase invoice (#25952) 2021-06-06 10:56:01 +05:30
Rucha Mahabal
a1a3f674a2 fix: invalid 'depends_on' expression in opportunity (#25954) 2021-06-04 11:15:55 +05:30
Saqib
7bb95f0a80 feat: cost-center wise period closing entry (#25930) 2021-06-03 17:33:00 +05:30
Ankush Menat
5c450cd13f fix: sync shopify customer addresses (#25937) 2021-06-03 16:48:08 +05:30
Ankush Menat
1c3c2b3006 fix: update shopify api version (#25939) 2021-06-03 16:46:30 +05:30
Deepesh Garg
688a5ac048 Merge pull request #25913 from deepeshgarg007/gst_freight_taxable_value
fix: Backward compatibility for GSTR-1 report
2021-06-02 11:30:57 +05:30
Deepesh Garg
21c15b89ab fix: Add taxable value in Purchase Invoice Item 2021-06-01 21:03:33 +05:30
Deepesh Garg
6a1ccf94a2 fix: Taxable value in GSTR-1 report 2021-06-01 21:02:50 +05:30
Dany Robert
3302ed4658 Merge branch 'version-12-hotfix' into patch-3 2021-05-26 15:51:43 +05:30
Anupam Kumar
fa3ca02557 fix: student invalid password reset link (#25827) 2021-05-26 12:16:25 +05:30
Deepesh Garg
1853f5da80 Merge pull request #25739 from deepeshgarg007/cash_flow_mapper_fix
fix: Cashlfow mapper not showing data
2021-05-24 20:39:59 +05:30
Deepesh Garg
dd82bbf78d Merge branch 'version-12-hotfix' into cash_flow_mapper_fix 2021-05-24 19:56:08 +05:30
Dany Robert
5271ce36de fix: Update test values 2021-05-22 11:22:02 +05:30
Dany Robert
88bab1e3ad fix: update test suite 2021-05-21 23:02:55 +05:30
Dany Robert
6ec804d77f fix: Update hard coded exchange rate values for testing 2021-05-21 18:16:21 +05:30
Nabin Hait
7fa3132a66 Merge branch 'v12-pre-release' into version-12 2021-05-20 18:51:42 +05:30
Nabin Hait
3d3ee778ed Merge branch 'version-12' into version-12-hotfix 2021-05-20 18:51:42 +05:30
Nabin Hait
65b7b57c70 bumped to version 12.21.0 2021-05-20 19:11:42 +05:50
Nabin Hait
4d9c9db295 chore: Added change log for v12.21.0 2021-05-20 18:49:42 +05:30
Deepesh Garg
13927e35cf Merge pull request #25662 from CaseSolvedUK/plaid-24675-v12
fix: plaid NoneType error
2021-05-20 17:03:02 +05:30
Deepesh Garg
18913756eb Merge pull request #25715 from deepeshgarg007/ignore_rouding_diff
fix: Ignore rounding diff while importing JV using data import
2021-05-19 18:26:11 +05:30
Nabin Hait
ccbdf25d44 Merge branch 'version-12-hotfix' into v12-pre-release 2021-05-18 20:30:46 +05:30
Deepesh Garg
ad1f1e000b fix: Cashlfow mapper not showing data 2021-05-18 08:38:49 +05:30
Dany Robert
5cced71ce4 fix: Get the exchange rate based on date. 2021-05-16 12:43:57 +05:30
Dany Robert
aea8773503 feat: Increase number of supported currency exchanges
Switch from frankfurter.app to exchangerate.host to accomodate more currency usage.
Closes #25603
2021-05-15 12:23:05 +05:30
Deepesh Garg
df51aa3087 fix: Ignore rounding diff while importig JV using data import 2021-05-14 21:31:22 +05:30
rohitwaghchaure
2ded94c338 Merge pull request #25693 from rohitwaghchaure/fixed-warehouse-tree-time-out-error
fix: timeout error while loading warehouse tree
2021-05-13 17:21:41 +05:30
Rohit Waghchaure
0b45d5e1ec fix: timeout error while loading warehouse tree 2021-05-13 15:51:39 +05:30
casesolved-co-uk
5946c2f28e fix: plaid NoneType error #24675 2021-05-11 12:36:07 +00:00
rohitwaghchaure
cb2f2d9e73 Merge pull request #25589 from 18alantom/backport-fix-check-schedule-date
fix: check for None in item.schedule_date before setting
2021-05-09 16:57:39 +05:30
Anuja Pawar
39bbc7a245 fix: update item level cost center from POS profile (#25612) 2021-05-08 14:11:06 +05:30
18alantom
062520f1b9 fix: check for None in item.schedule_date before setting 2021-05-05 12:07:18 +05:30
Rucha Mahabal
f644f6feba fix: Employee Separation (#25504)
* fix: Employee Separation

- add ignore_mandatory flag for project creation

- form clean-up

* fix: Employee Separation test
2021-05-03 18:37:13 +05:30
rohitwaghchaure
9de5fe2105 Merge pull request #25552 from rohitwaghchaure/fixed-total-stock-summary-report-12-hotfix
fix: total stock summary report not working
2021-05-03 10:24:34 +05:30
Rohit Waghchaure
e163cb89bf fix: total stock summary report not working 2021-05-02 18:03:29 +05:30
Deepesh Garg
9d38a0eede Merge pull request #25422 from finbyz/patch-2
fix: state code for Other Territory
2021-04-30 11:11:50 +05:30
rohitwaghchaure
c0b66b8203 Merge pull request #25443 from rohitwaghchaure/fixed-incorrect-qty-calculated-for-sub-contracted-raw-materials
fix: incorrect qty calculated for sub-contracted raw materials in purchase receipt
2021-04-27 15:14:03 +05:30
Saqib
96c099c609 fix: remove invalid changes added due to merge conflicts (#25404)
* fix: merge conflicts

* fix: merge conflict

* fix: recover lost method
2021-04-26 15:40:29 +05:30
Jannat Patel
b5be828f3a fix: issue in project custom status (#25453) 2021-04-26 15:36:01 +05:30
Saqib
059b8b567e feat(italy): add document type field for e-invoicing (#25420) 2021-04-26 13:09:04 +05:30
Deepesh Garg
cfdaf7c4aa Merge pull request #25419 from deepeshgarg007/composition_v12_hotfix
fix: Purchase from registered composition dealer
2021-04-24 17:24:18 +05:30
Rohit Waghchaure
5b80679ede fix: incorrect qty calculated for sub-contracted raw materials in purchase receipt 2021-04-22 17:03:02 +05:30
Saqib
a0783de232 fix: remove invalid changes added due to merge conflict (#25405)
* fix: merge conflict

* fix: recover lost method
2021-04-22 14:31:46 +05:30
Saqib
98d90f4e36 fix: remove invalid changes added due to merge conflict (#25437)
* fix: merge conflicts

* fix: recover lost method
2021-04-22 14:14:48 +05:30
Alan
c843da04a4 fix: filter using purpose, make requested changes (#25388)
backported from https://github.com/frappe/erpnext/pull/25352
2021-04-21 21:40:39 +05:30
Alan
34f1d3a88e fix: change subcontracted item display (#25426) 2021-04-21 21:04:28 +05:30
FinByz Tech Pvt. Ltd
bd4461b8cb Update __init__.py
Other Territory state code should be 97.

It's already corrected in version-13 but missed in version-12
2021-04-21 15:46:58 +05:30
Deepesh Garg
06063f7aa6 fix: Test case for GSTR 3b report 2021-04-21 14:14:55 +05:30
Deepesh Garg
472c9e534a fix: Purchase from registered composition dealer 2021-04-21 14:14:45 +05:30
Deepesh Garg
54c9704fe2 Merge pull request #25410 from deepeshgarg007/rcm_rounding_precision
fix: RCM rounding precision
2021-04-20 18:51:24 +05:30
Deepesh Garg
673dcb855d fix: RCM rounding precision 2021-04-20 18:48:50 +05:30
Alan
e3ebe4b33b fix: can't multiply sequence by non-int of type 'float' (#25385)
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2021-04-19 15:30:34 +05:30
Saqib
baefc6fd26 fix(e-invoicing): variable scoping (#25368) 2021-04-16 16:22:40 +05:30
Nabin Hait
b95b4e8064 fix: merge conflict 2021-04-16 12:55:46 +05:30
Nabin Hait
08399f9015 bumped to version 12.20.0 2021-04-16 13:11:07 +05:50
Nabin Hait
4481d4e965 chore: added change log 2021-04-16 12:48:27 +05:30
Nabin Hait
3f459c500f Merge branch 'version-12-hotfix' into v12-pre-release 2021-04-16 12:42:36 +05:30
Saqib
e787d05f66 fix(e-invoicing): validations & tax calculation fixes (#25315)
* fix: GST on freight charge in e-invoicing

* fix: cannot fetch e invoice settings

* fix: address validations & cancel eway bill dialog

* fix: except einvoice loading error seperately

* fix: sider

* fix: import format_date

* fix: imports

* fix: test

* fix: test

* fix: test

* fix: validate total condition

* feat: add company link to e-invoice settings

* fix: remove extra condition

* fix: test

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2021-04-15 18:57:08 +05:30
Deepesh Garg
4eab67347f Merge pull request #25318 from deepeshgarg007/zero_ref_doc_billing_v12
fix: Zero amount completed delivery notes being shown in Sales Invoice get items
2021-04-14 15:28:49 +05:30
Deepesh Garg
cfe20cf610 Merge pull request #25226 from deepeshgarg007/rcm_total_calculation_fix_v12
fix: RCM tax calculation
2021-04-13 20:07:35 +05:30
Ankush Menat
73a7bb88fb fix: remove gst name validation for purch Invoice (#25236)
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2021-04-13 19:00:38 +05:30
Ankush Menat
d2d025b586 fix: round total quantity in job card (#25246)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-04-13 18:58:42 +05:30
Ankush Menat
061c82a5cf fix: patch fixes for property setter (#25313)
partial backport of #25220
2021-04-13 18:58:19 +05:30
Ankush Menat
e6eab3b5f8 fix: incorrect status creating PR from PO after creating PI (#25203)
* test: add tests for PO->PI, PO->PR workflow

Add failing test cases for PR status and PR percent billed.

* fix: update PR status in database

* fix: do not copy percent billed from PO to PR

* fix: patch for purchase receipt status

* fix: remove logging in patch for v12 compatibility
2021-04-13 18:57:03 +05:30
Deepesh Garg
16c3a76c49 fix: Applly single transaction threshold on net_total instead of supplier credit amount (#25208) 2021-04-13 18:54:42 +05:30
Shariq Ansari
dd78ffb176 fix: Assignment Rule Unassign Condition doesn't work (#24890) 2021-04-13 18:52:37 +05:30
Shariq Ansari
583a8bf580 fix: Added parent task expected end date validation (#24889) 2021-04-13 18:51:46 +05:30
Jannat Patel
2c63f833b6 fix: serial no refresh issue (#25130)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-13 18:51:05 +05:30
Deepesh Garg
d5d7ef7349 fix: Zero amount completed delivery notes being shown in Sales Invocie get items 2021-04-13 18:45:40 +05:30
Deepesh Garg
ad2d74576b Merge pull request #25165 from KaviyaPeriyasamy/version-12-hotfix-error-log-issue
fix: object referencing same memory address issue
2021-04-13 15:41:15 +05:30
Deepesh Garg
4ced989169 Merge pull request #25204 from ankush/invoice-name-12
fix(India): create property setters for shorter naming series (#25134)
2021-04-13 15:40:14 +05:30
Mohammad Hasnain Mohsin Rajan
a59523970b chore: add sider config (#24892)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-04-13 11:06:01 +05:30
Deepesh Garg
9f2b5ba565 Merge branch 'version-12-hotfix' into rcm_total_calculation_fix_v12 2021-04-12 18:59:30 +05:30
Anupam Kumar
878b10eff5 fix: don't delete mode of payment account details while deleting company transactions (#25218) 2021-04-12 10:37:12 +05:30
Deepesh Garg
83df26197b fix: Rounding adjustment for RCM 2021-04-11 18:45:22 +05:30
Rucha Mahabal
fb87ed3f62 Merge pull request #25216 from anupamvs/hr-compensatory-leave-request-err-msg-v12
fix: error message compensatory leave request
2021-04-08 09:52:24 +05:30
Deepesh Garg
2541ab178a fix: RCM tax calculation 2021-04-06 23:40:46 +05:30
Anupam
ac58e05bbb fix: error message compensatory leave request 2021-04-06 11:40:21 +05:30
Abdullah Abouzekry
34b6f9389c fix: sales order not saving due type mismatch in promo scheme (#24748) (#25056)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-04-06 10:14:51 +05:30
Sagar Vora
6678450ba0 fix(India): create property setters for shorter naming series (#25134) 2021-04-05 16:09:41 +05:30
Saqib
fa98c4b8d7 fix(e-invoice): mandatory pincode field not set in e-invoice (#25201) 2021-04-05 14:45:21 +05:30
Saqib
79c7be770c fix(india): critical e-invoicing fixes (#25166)
Co-authored-by: bhavesh95863 <34086262+bhavesh95863@users.noreply.github.com>
2021-04-05 11:01:46 +05:30
rohitwaghchaure
8acc3fbbf4 Merge pull request #25169 from rohitwaghchaure/fixed-incorrect-batch-selected-in-purchase-rceipt
fix: incorrect batch picked in subcontracted purchase receipt
2021-04-03 14:25:10 +05:30
Rohit Waghchaure
2e04026fd6 fix: incorrect batch picked in subcontracted purchase receipt 2021-04-03 14:20:30 +05:30
Kaviya Periyasamy
3707b004c4 fix: object referencing same memory address issue 2021-04-03 12:18:19 +05:30
Saqib
f8dcd06dad fix: santize_for_json is not defined (#25157) 2021-04-02 16:47:50 +05:30
bhavesh95863
15af590482 fix(regional): remove shipping address GSTIN validation for e-invoice (#25133)
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-04-02 15:05:07 +05:30
Marica
9cc129c400 Merge pull request #25110 from ankush/mr_stopped_validation_v12
fix: do not fetch stopped MR in production plan
2021-04-02 13:16:13 +05:30
Marica
35c4a7a05d Merge branch 'version-12-hotfix' into mr_stopped_validation_v12 2021-04-02 13:15:11 +05:30
Saqib
883598890d fix: place of supply of e-invoicing (#25149) 2021-04-02 12:16:09 +05:30
Afshan
2479e070c4 fix: validation msg for TransDocNo e-invoicing (#25120) 2021-04-01 19:27:41 +05:30
Ankush Menat
8d31d21b88 fix: do not fetch stopped MR in production plan
- Ignore stopped MR while using fetch button
- Add filter on field inside child table.

Related issue: ISS-20-21-10757
2021-03-31 21:21:13 +05:30
Rohan
53a32fecdb fix: commit individual SLE rename for large datasets (#25085) 2021-03-31 15:23:04 +05:30
Sagar Vora
b904304268 fix: revert removed field; not standard in v12 2021-03-29 21:26:53 +05:30
Sagar Vora
bd742d7ad9 fix(Italy): setup, validations, optimisations 2021-03-29 21:21:19 +05:30
Marica
2a1365a278 Merge pull request #24986 from ankush/allow_zero_valuation_SR_v12
fix: Allow zero valuation in stock reconciliation
2021-03-26 12:52:52 +05:30
Deepesh Garg
56531908aa Merge pull request #24974 from deepeshgarg007/tds_check_fix_v12
fix: TDS check getting checked after reload
2021-03-26 12:37:06 +05:30
Marica
f2bede6275 Merge branch 'version-12-hotfix' into allow_zero_valuation_SR_v12 2021-03-25 20:06:51 +05:30
Jannat Patel
a52ea48a21 fix: serial no trim issue (#24950)
* fix: serial no trim issue

* fix: valid serial nos
2021-03-25 15:23:19 +05:30
Anupam Kumar
5bd58ef85c fix: opportunity-quotation mapping order status (#25002) 2021-03-25 11:46:20 +05:30
Devin Slauenwhite
a0cfe449df fix sider errors. 2021-03-23 16:28:54 -04:00
Ankush Menat
19193e8f1c fix: set valuation rate for customer items to zero
- In stock reconciliation always set valuation rate of customer provided
items to zero during validation.
- Let user know the valuation has been changed.
2021-03-23 14:29:12 +05:30
Ankush Menat
ebd230e748 test: customer item in stock reconciliation 2021-03-23 14:26:41 +05:30
Ankush Menat
bf91ee9b99 fix: Allow zero valuation in stock reconciliation
Stock reconciliation can not be done for customer provided item as they
have zero valuation. This change adds a checkbox in item table to allow
such items.

Related issue: ISS-20-21-10248
2021-03-23 14:24:54 +05:30
Deepesh Garg
bb3c44dbb3 fix: TDS check getting checked after reload 2021-03-22 19:42:02 +05:30
Marica
7a61696a25 Merge pull request #24935 from ankush/alt_tags_item_image_v12
feat: allow Item image alt
2021-03-22 11:43:46 +05:30
Marica
28432128be Merge branch 'version-12-hotfix' into alt_tags_item_image_v12 2021-03-22 11:28:50 +05:30
Raffael Meyer
b135569ca6 Merge branch 'version-12-hotfix' into fix-margin-calculation 2021-03-19 16:31:29 +01:00
Saurabh
ce3a680324 Merge branch 'v12-pre-release' into version-12 2021-03-19 19:24:51 +05:30
Saurabh
786d78bce2 bumped to version 12.19.0 2021-03-19 19:44:51 +05:50
rohitwaghchaure
9e3e09f701 Merge pull request #24955 from rohitwaghchaure/revert-stock-balance-value-calculation-pre
fix: revert stock balance value calculation
2021-03-19 16:22:35 +05:30
Rohit Waghchaure
c2e2cf4933 fix: revert stock balance value calculation 2021-03-19 16:07:48 +05:30
rohitwaghchaure
ea50ab8696 Merge pull request #24868 from rohitwaghchaure/revert-stock-balance-value-calculation
fix: revert stock balance value calculation
2021-03-19 16:06:48 +05:30
Deepesh Garg
c22785877d Merge pull request #24952 from nextchamp-saqib/e-invoice-valdiation-fix
fix: NoneType object has no attribute len()
2021-03-19 12:55:30 +05:30
Saqib Ansari
14eeee5592 fix: NoneType object has no attribute len() 2021-03-19 12:51:15 +05:30
Deepesh Garg
4f4f60942c Merge pull request #24919 from deepeshgarg007/nil_exempt_gstr_3b_v12
fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report
2021-03-18 21:02:12 +05:30
Shivam Mishra
437c771701 refactor: update confusing label 2021-03-18 12:39:42 +05:30
Shivam Mishra
f29cdb39a1 feat: add alt value in product page 2021-03-18 12:39:00 +05:30
Shivam Mishra
063ab520d3 feat: add image alt argument for product_image macros 2021-03-18 12:38:38 +05:30
Shivam Mishra
b2ae422ed7 feat: add image alt field in items 2021-03-18 12:37:59 +05:30
Deepesh Garg
6da7f65848 fix: Remove print statement 2021-03-17 18:15:24 +05:30
Deepesh Garg
4c6d068a73 fix: Group nil exempted and non gst items separately 2021-03-17 18:15:15 +05:30
Deepesh Garg
ef09599a9f fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report 2021-03-17 16:16:33 +05:30
Marica
a1104f040d Merge pull request #24887 from shariquerik/item-attribute-fix-backport
fix: item attributes not editable until refresh
2021-03-16 15:39:36 +05:30
Anurag Mishra
c6a1e3b450 Merge pull request #24228 from YogendrasinhChavda/erpnext_fix_v12
[IMP][version-12] Improved code by adding operator to check condition.
2021-03-16 13:28:31 +05:30
Nabin Hait
238df8b3ec Merge branch 'version-12-hotfix' into v12-pre-release 2021-03-16 11:03:25 +05:30
shariquerik
4db8d13900 fix: item attributes not editable until refresh 2021-03-15 19:10:43 +05:30
Deepesh Garg
6cf37d58f1 fix: Unequal debit and credit issue on RCM Invoice (#24839)
* fix: Unequal debit and credit issue on RCM Invoice

* fix: Travis
2021-03-15 18:04:22 +05:30
Prssanna Desai
386b7fd2c3 fix: use method name as title in error log (#24880) 2021-03-15 18:03:03 +05:30
Ankush
f9f10ed743 fix: Add warning for invalid GST invoice numbers (#24837)
* fix: Add warning for invalid GST invoice numbers

GST Invoice numbers should be 16 characters alphanumeric with dash(/) or
slash(-) only. Add check for doc.name before saving and warn about
naming series.

* refactor: move regex patterns to global variables

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2021-03-15 17:58:17 +05:30
Devin Slauenwhite
2e2f3f9578 fix: stock move dialog duplicate submit actions (#24859)
* fix: duplicate submit actions

* fix sider errors.
2021-03-15 17:57:37 +05:30
HENRY Florian
55d45532b4 fix: UOM length unit in global setup list is empty (#24853)
* When ERPNext is installed in localized language the category of UOM Conversion Factor is tranlasted into installed languaes. Filter must be locallized

* fix

* fix
2021-03-15 17:54:50 +05:30
Deepesh Garg
07e7f73488 Merge pull request #24874 from GangaManoj/filter-bank-reconciliation-v12
fix(Bank Reconciliation): Filter Bank Account drop-down list
2021-03-15 10:20:05 +05:30
Ganga Manoj
017d168b03 fix(Bank Reconciliation): Filter Bank Account drop-down list 2021-03-13 23:38:30 +05:30
Rohit Waghchaure
a9d48e5fbf fix: revert stock balance value calculation 2021-03-13 12:48:14 +05:30
Ankush Menat
5ae40871d8 fix: do not update PE title during data import (#24835)
* fix: do not update PE title during data import

Related issue: ISS-20-21-10132

* fix: make title field read only
2021-03-11 16:08:40 +05:30
Ankush Menat
86a163fce5 fix: use account_name only in consolidated report (#24834)
Don't use account_number and only rely on account_name for preparing
consolidated financial statement.

Related issue: ISS-20-21-10217
2021-03-11 16:07:35 +05:30
Devin Slauenwhite
266f24bb74 fix: multiple price rules margin. 2021-03-10 18:46:18 -05:00
Rohan
aa90dc6aa3 fix: do not send emails to disabled users from Employee Onboarding (#24796) 2021-03-09 21:02:57 +05:30
HENRY Florian
5eb8eb8aa7 fix: Add french chart accounts with account number (#24763)
* add new franch account chart with numbers

* add new franch account chart with numbers

* add chart of account with code

* change name chart of accounte

* fix json unicode

* account format

* feat: add french accounting chart with account number

* remove debug
2021-03-09 20:32:30 +05:30
Marica
a69b8aa18d Merge pull request #24790 from ankush/track_settings_v12
fix: track setting changes
2021-03-09 13:30:28 +05:30
Marica
4450a075bd Merge branch 'version-12-hotfix' into track_settings_v12 2021-03-09 11:56:06 +05:30
rohitwaghchaure
3aede7da61 Merge pull request #24709 from rohitwaghchaure/fixed-stock-reco-incorrect-serial-no-issue
fix: incorrect serial no issue in the stock reco
2021-03-07 14:29:02 +05:30
Ankush Menat
2e8b06cf9f fix: track setting changes 2021-03-02 18:20:47 +05:30
Saqib
27f120bc7c fix(india): inflated item tax rate for e-invoicing (#24766)
* fix(india): inflated item tax rate for e-invoicing

* fix: credit note discount on net total
2021-03-01 10:46:17 +05:30
Ankush Menat
5feb20d94b feat: track changes to HR settings (#24740)
related issue: FR-ISS-259927
2021-02-25 19:05:25 +05:30
Afshan
27fbfbf34e fix: reference variable in pricing rule (#24714) 2021-02-25 19:01:58 +05:30
Ankush Menat
d389261230 fix(india): escape for special characters in JSON (bp #24695) (#24705) 2021-02-25 18:04:58 +05:30
Deepesh Garg
e9f8e5814a Merge pull request #24736 from ankush/opening_round_gl12
fix: make round off GLE always non-opening (bp #24723)
2021-02-25 15:17:55 +05:30
Ankush Menat
16193a614e fix: make round off GLE always non-opening
Opening GL entries can not be for profit and loss accounts. Round off
accounts are by default P&L account. Hence when making opening entry,
make round off entries as non-opening.

Related issue: ISS-20-21-09677
2021-02-25 10:22:49 +05:30
Afshan
2b2e205b74 fix: check if customer provided item while setting opening stock (#24633) 2021-02-24 19:05:29 +05:30
Afshan
9272ea838f fix: show custom button for saved projects (#24732)
* fix: show custom button for saved projects

* fix: slider
2021-02-24 18:13:29 +05:30
Afshan
80d9576bb9 fix: currency symbol in update items (#24727) 2021-02-24 16:51:35 +05:30
Afshan
c18a8c58dd fix: column names (#24713) 2021-02-24 14:39:00 +05:30
Rucha Mahabal
473fb55724 Merge pull request #24717 from pateljannat/issue-custom-button-v12
fix: custom buttons in issue
2021-02-24 11:48:06 +05:30
pateljannat
05a3c5a6bc fix: custom buttons in issue 2021-02-23 18:15:50 +05:30
Rohit Waghchaure
c39e206fc7 fix: incorrect serial no issue in the stock reco 2021-02-23 14:26:55 +05:30
Afshan
33539d49f1 fix: error message when making reverse journal entry (#24666) 2021-02-22 19:26:02 +05:30
Deepesh Garg
91a929df84 Merge pull request #24668 from pateljannat/gstr-1-unidentified-accounts-issue-v12
fix: excluding unidentified accounts from gstr-1
2021-02-20 17:28:13 +05:30
Saurabh
19a27d3f46 Merge branch 'v12-pre-release' into version-12 2021-02-19 12:44:24 +05:30
Saurabh
d5fa3a2b8f bumped to version 12.18.0 2021-02-19 13:04:23 +05:50
Deepesh Garg
e34f73c60b Merge pull request #24670 from deepeshgarg007/transaction_delete_fix_v12
fix: Do not delete GST Accounts from GST Settings on clearing transactions from Company Master
2021-02-19 10:58:13 +05:30
Deepesh Garg
a49ea67f16 fix: Do not delete GST Accounts from GST Settings on clearing transactions from Company Master 2021-02-19 10:56:54 +05:30
Nabin Hait
d7bf38842b core: Added change log 2021-02-18 20:14:31 +05:30
pateljannat
4f0c5e2cc7 fix: excluding unidentified accounts from gstr-1 2021-02-18 19:31:11 +05:30
Deepesh Garg
be65ae7c86 fix: Prorata factor fixes in subscription (#24638)
* fix: Prorata factor fixes in subscription

* fix: Test Case
2021-02-16 07:50:05 +05:30
Deepesh Garg
b0e53230bd fix: Prorata factor fixes in subscription (#24637)
* fix: Prorata factor fixes in subscription

* fix: Test Case
2021-02-16 07:49:59 +05:30
Deepesh Garg
f452ab56c6 Merge pull request #24635 from ankush/ladakh_gst_addition-v12pr
fix(India): Add GST state code for Ladakh
2021-02-15 21:12:39 +05:30
Deepesh Garg
1eb3d16667 Merge pull request #24634 from ankush/ladakh_gst_addition-v12hf
fix(India): Add GST state code for Ladakh
2021-02-15 21:12:14 +05:30
Ankush Menat
c1c8bb6d98 fix(India): Add GST state code for Ladakh 2021-02-15 15:35:32 +05:30
Ankush Menat
211a4cb833 fix(India): Add GST state code for Ladakh 2021-02-15 15:30:20 +05:30
rohitwaghchaure
472bad352d Merge pull request #24620 from rohitwaghchaure/fixed-incorrect-incoming-rate-for-sales-return-pre
fix: incorrect incoming rate for the sales return
2021-02-12 14:22:37 +05:30
Rohit Waghchaure
eea1ec42f4 fix: incorrect incoming rate for the sales return 2021-02-12 14:21:51 +05:30
rohitwaghchaure
b96c7e0a0f Merge pull request #24618 from rohitwaghchaure/fixed-incorrect-incoming-rate-for-sales-return
fix: incorrect incoming rate for the sales return
2021-02-12 14:20:02 +05:30
Rohit Waghchaure
37604c8d99 fix: incorrect incoming rate for the sales return 2021-02-12 13:17:10 +05:30
Afshan
edfbb5d3be fix: NoneType object has no attribute len() (#24617) 2021-02-12 12:40:52 +05:30
Nabin Hait
ddd85334a3 Removed debug flag 2021-02-12 09:54:04 +05:30
Nabin Hait
81ae1f363c Removed debug flag 2021-02-12 09:53:30 +05:30
Nabin Hait
2f20ef0f4c Merge branch 'version-12-hotfix' into v12-pre-release 2021-02-11 21:59:04 +05:30
Jannat Patel
e8935457a0 Item group on update items v12 (#24535)
* fix: item_group on update items

* fix: code cleanup

* Update accounts_controller.py

* Update accounts_controller.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 21:56:48 +05:30
Nabin Hait
64ec1728ab fix: merge conflict 2021-02-11 21:48:49 +05:30
Tropicalrambler (Alain Berger)
dbb6721412 fix: remove max 5 file attachment limit in task (#24056)
Co-authored-by: alain <fogliasana@gmail.com>
2021-02-11 20:14:14 +05:30
Afshan
afbbdcb802 fix: calculate discount amount (#24511) 2021-02-11 20:11:30 +05:30
Jannat Patel
37adbe5a85 fix: Dynamic Links for reports (#24461)
* fix: dynamic links in reports

* fix: reverting changes for payment period report

* fix: link fields
2021-02-11 20:09:49 +05:30
Rucha Mahabal
d7a5853587 fix: Issues with packing items (#24606) 2021-02-11 20:08:22 +05:30
Saqib
6b799dbef0 fix: validate cancellation only if irn generated (#24609) 2021-02-11 17:51:41 +05:30
Marica
be8ecdf3d6 Merge pull request #24486 from frappe/rfq-contact-email-set-v12
fix: Rfq contact email set v12
2021-02-11 13:50:06 +05:30
Wolfram Schmidt
85f1561e5e Update question.json (#24487)
according to: https://github.com/frappe/erpnext/pull/23402
2021-02-11 13:39:23 +05:30
Richard Case
2bf8610698 fix: plaid client version to support latest API (#24532) 2021-02-11 13:29:59 +05:30
Marica
23364b374e Merge pull request #24546 from pateljannat/validation-for-disabled-warehouse-v12
Validation for disabled warehouse v12
2021-02-11 13:09:29 +05:30
Marica
82c162dfe7 Merge branch 'version-12-hotfix' into validation-for-disabled-warehouse-v12 2021-02-11 13:04:49 +05:30
Saqib
7fea8a95e6 fix: NoneType has no len() (#24604) 2021-02-11 11:57:05 +05:30
rohitwaghchaure
85a2d27736 fix: Consolidated Financial Statement report not works if child company account not present in parent company (#24580) 2021-02-11 11:07:59 +05:30
Ankush Menat
106e0f885a fix: Update total in words after updating items (#24592)
* fix: Update total in words after Updating items

Update total in words after Updating items in sales/purchase orders.

Closes ISS-20-21-09425

* test: Add test for total & words after update item

Add test for total & words after updating items in sales order.
2021-02-11 11:05:08 +05:30
Anuja Pawar
c37ce8b8d3 fix: fix filters for IRS 1099 report (#24597) 2021-02-11 11:02:13 +05:30
pateljannat
5ac5d86d84 fix: vadd validation in stock ledger entry 2021-02-10 18:44:38 +05:30
Marica
a180d2baa8 Merge pull request #24400 from pateljannat/item-wise-purchase-register-item-name-error-v-12
fix: Item wise purchase register item name error v12
2021-02-10 12:04:40 +05:30
pateljannat
14717eeac6 fix: better function name 2021-02-09 14:12:20 +05:30
Deepesh Garg
179d82615f Merge pull request #24579 from marination/acc-dimension-update-hotfix
fix: Avoid changing Ref. Doctype in Accounting Dimension after creation
2021-02-09 06:52:45 +05:30
Saqib
1618c92142 fix: fetching of standalone cr/dr notes for reconciliation (#24576) 2021-02-08 20:19:18 +05:30
marination
1118949867 fix: frm.doc instead of doc 2021-02-08 17:55:26 +05:30
marination
31cd9dcee1 fix: Avoid changing Ref. Doctype in Accounting Dimension after creation 2021-02-08 17:37:14 +05:30
Saqib
e42e75178a fix(e-invoice): skip e-invoice generation for non-taxable invoices (#24568) (#24569) 2021-02-08 11:43:29 +05:30
Saqib
078e154966 fix(e-invoice): do not validate gstin for exports (#24564) 2021-02-07 18:58:25 +05:30
Anuja Pawar
3365f01963 fix: fixing item_code not found error (#24484) 2021-02-05 23:35:42 +05:30
pateljannat
469827da85 fix: validation for disabled warehouse 2021-02-03 15:34:57 +05:30
pateljannat
d3240f9510 Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into version-12-hotfix 2021-02-03 12:05:12 +05:30
Rohan
2341f47631 fix: use supplied year for IRS 1099 forms (#24425)
* fix: use supplied year for IRS 1099 forms

* fix: don't use f-strings

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-02-01 11:55:40 +05:30
Saqib
b57a523dfe fix: discount amount calculation on net total (#24498) 2021-01-29 14:24:18 +05:30
pateljannat
8d101d362d fix: rfq contact email set 2021-01-28 15:01:25 +05:30
pateljannat
a9cfe1cfa4 Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into version-12-hotfix 2021-01-28 14:49:19 +05:30
Afshan
dccd2ca69f fix: validate tax template for tax category (#24403)
* fix: validate tax template for tax category

* Update erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py

Co-authored-by: Marica <maricadsouza221197@gmail.com>

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-01-28 12:23:08 +05:30
Anuja Pawar
314e151f1d fix: adding UOM in update items (#24479)
* fix: adding UOM in update items

* fix: sider fixes
2021-01-28 12:19:03 +05:30
Kaviya Periyasamy
c002465903 fix(einvoice): QRCode generation and eway bill live url (#24459) 2021-01-27 19:43:41 +05:30
Saqib
859a5f4dbe fix: e_invoice print format not showing other charges (#24473) 2021-01-27 12:33:59 +05:30
Saurabh
58d7fb5c94 Merge branch 'v12-pre-release' into version-12 2021-01-27 09:42:08 +05:30
Saurabh
744a7b1bad bumped to version 12.17.0 2021-01-27 10:02:08 +05:50
Saqib
d9719fe41d fix: einvoice test (#24463) 2021-01-26 19:19:51 +05:30
Saqib
50c1d24ee9 fix: einvoice test (#24435) 2021-01-25 17:59:52 +05:30
Suraj Shetty
ea221f7e63 chore: Add release notes for v12.17.0 (#24450)
* chore: Add release notes for v12.17.0

* Chore: Fix formatting

* chore: Fix links
2021-01-25 15:36:43 +05:30
David Angulo
3799c1a662 feat: Make patient age translateable (#24416)
* feat: Make patient age translateable

* Make patient age translatable in patient encounter

* Translate all occurrences of age calculation

* Comply to uniform translation syntax
2021-01-22 08:29:16 +05:30
rohitwaghchaure
56a8b90598 Merge pull request #24438 from AfshanKhan/fix-stock-ageing-v12
fix: stock ageing should not take cancelled stock entries.
2021-01-21 23:10:50 +05:30
Afshan
044ad91481 fix: stock ageing should not take cancelled stock entries. 2021-01-21 18:29:43 +05:30
Anuja Pawar
39a5e5abd1 fix: missing asset id in the Fixed Asset Register (#24429) 2021-01-21 15:14:24 +05:30
Saqib
407b351d55 fix: (e-invoicing) qrcode image generation (#24422) 2021-01-20 13:24:49 +05:30
Saqib
6f64ec3574 fix: (e-invoicing) qrcode image generation (#24421) 2021-01-20 13:22:58 +05:30
Prssanna Desai
e17ad9e620 Merge pull request #24419 from prssanna/chart-imports-v12
fix: function imports in accounts dashboard
2021-01-20 11:21:38 +05:30
Prssanna Desai
505b69f6b2 Merge pull request #24380 from prssanna/chart-imports
fix: function imports in accounts dashboard
2021-01-20 11:18:31 +05:30
prssanna
485ef74c58 fix: function imports in accounts dashboard 2021-01-20 11:18:10 +05:30
Anuja Pawar
5cf9fbc27b fix: missing asset id in the report (#24391) 2021-01-18 17:05:01 +05:30
Saqib
4ef49eab66 fix: add check for allowing access to european region (#24393) 2021-01-18 16:40:28 +05:30
Saqib
f6d61f2dec fix: add check for allowing access to european region (#24394) 2021-01-18 16:40:10 +05:30
pateljannat
7aaf3a71e8 fix: item wise purchase register item_name error 2021-01-18 16:15:01 +05:30
Jannat Patel
c51ac1c68b Merge pull request #5 from frappe/version-12-hotfix
Version 12 hotfix
2021-01-18 15:58:26 +05:30
rohitwaghchaure
04b106a515 Merge pull request #24384 from rohitwaghchaure/donot-check-previous-qty-for-batch-pre-release
fix: stock ledger entry was not created against stock reco
2021-01-16 15:03:08 +05:30
Rohit Waghchaure
e79f3e67ed fix: stock ledger entry was not created against stock reco 2021-01-16 15:01:14 +05:30
rohitwaghchaure
f8d24b803c Merge pull request #24382 from rohitwaghchaure/donot-check-previous-qty-for-batch
fix: stock ledger entry was not created against stock reco
2021-01-15 21:25:00 +05:30
Rohit Waghchaure
c516fc7ca4 fix: stock ledger entry was not created against stock reco 2021-01-15 18:18:17 +05:30
prssanna
c9b8423007 fix: function imports in accounts dashboard 2021-01-15 18:05:19 +05:30
Nabin Hait
42675929fa fix:merge conflict 2021-01-15 17:09:43 +05:30
Anuja Pawar
a8de2321a5 fix: Payment Period based on invoice date report fix/refactor (#24377)
* fix: Payment Period based on invoice date report fix/refactor

* fix: minor
2021-01-14 21:21:12 +05:30
Saqib
748f8145b6 feat: show transporter address in sales invoice (#23731)
* feat: show transporter address in sales invoice

* feat: multiple transporter address

* fix: update all eway-bill fields

* fix: travis

* fix: travis

* fix: travis

* fix: travis

* fix: travis

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-14 19:53:51 +05:30
Jannat Patel
7a40a2b2e2 fix: subscription prepaid date validation (#24373) 2021-01-14 19:46:19 +05:30
Deepesh Garg
35c2d2324d fix: Ignore group cost center validation for period closing voucher (#24374) 2021-01-14 19:45:13 +05:30
Anuja Pawar
f2b5f3a842 fix: for not having fiscal year while creating new company (#24161)
* fix: Fiscal year fix while creating new company

* minor fix

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-14 19:25:40 +05:30
Mohammad Hasnain Mohsin Rajan
d2442da6f2 fix: last purchase rate not updating when voucher cancelled if only one voucher is present - v12 (#24323)
* fix: update last purchase rate

* chore: use orm for update

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-14 19:22:47 +05:30
Anuja Pawar
32bdb691df fix: bom stock report UoM correction (#24363) 2021-01-14 19:21:27 +05:30
rohitwaghchaure
5050541401 Merge pull request #24188 from iRaySpace/loyalty-program-fix
fix: loyalty program
2021-01-14 17:11:20 +05:30
rohitwaghchaure
87f0ed6477 Merge pull request #24364 from rohitwaghchaure/fixed-extra-trasnferred_qty_issue
fix: extra transferred qty has not consumed against work order
2021-01-14 16:36:24 +05:30
Marica
6df18856db Merge pull request #24295 from marination/mr-se-warehouse-validation-hotfix
fix: Dont validate warehouse values between MR to Stock Entry
2021-01-14 16:34:26 +05:30
Marica
288b384ab5 Merge pull request #24368 from marination/qc-back-update-se-hotfix
fix: Back Update from QC based on Batch No
2021-01-14 15:14:06 +05:30
Marica
cffcbf7c47 Merge pull request #24367 from marination/bom-rm-rate-company-based-hotfix
fix: Company Wise Valuation Rate for RM in BOM
2021-01-14 15:13:35 +05:30
Marica
c69fda4440 Merge branch 'version-12-hotfix' into mr-se-warehouse-validation-hotfix 2021-01-14 15:10:01 +05:30
Anurag Mishra
507ec2184c fix: calculation of remaining_sub_periods if relieving date before month start date
fix: calculation of remaining_sub_periods if relieving date before the month start date
2021-01-14 14:51:13 +05:30
Afshan
75cfbe132b fix: calculation of remaining_sub_periods if relieving date before month start date 2021-01-14 13:51:01 +05:30
marination
f88e908598 fix: Remove QI link on cancel wherever same QI name exists 2021-01-14 13:05:40 +05:30
marination
8791d11359 fix: Back Update from QC based on Batch No 2021-01-14 13:03:32 +05:30
marination
bbec5ccc83 fix: Company Wise Valuation Rate for RM in BOM 2021-01-14 12:53:57 +05:30
Saqib
8862166223 fix(e-invoicing): minor ux fixes (#24366) 2021-01-14 12:22:23 +05:30
marination
2eea0f003f fix: test for raising MR-SE mismatch error
- Make test add mismatched item code instead of warehouse, since warehouse can be different.
2021-01-14 12:20:39 +05:30
Rohit Waghchaure
a250d415aa fix: extra transferred qty has not consumed against work order 2021-01-14 11:47:57 +05:30
Jannat Patel
4d83564188 fix: check for tax_rate (#24348) 2021-01-13 20:57:15 +05:30
rohitwaghchaure
7e01cacf8c Merge pull request #24353 from rohitwaghchaure/fixed-incorrect-key-in-subcontract
fix: incorrect serial no in the subcontracted purchase receipt
2021-01-13 09:21:57 +05:30
Rohit Waghchaure
830626d86a fix: incorrect key 2021-01-13 00:05:29 +05:30
Marica
78e413aaaa Merge branch 'version-12-hotfix' into mr-se-warehouse-validation-hotfix 2021-01-12 20:17:41 +05:30
rohitwaghchaure
f9da40e9af Merge pull request #24331 from rohitwaghchaure/fixed-payment-entry-multi-currency-issue
fix: payment entry multi-currency issue
2021-01-11 12:32:30 +05:30
Rucha Mahabal
e6a8e1a23b Merge pull request #24333 from ruchamahabal/fix-item-details-in-reports-v12
feat(reports): get item details from Item document instead of the Transactions
2021-01-08 15:25:02 +05:30
Rucha Mahabal
e0e5783b3e fix: import statement 2021-01-08 14:37:23 +05:30
Rucha Mahabal
0abed806a3 feat(reports): get item details from Item doctype instead of the Transaction 2021-01-08 14:37:07 +05:30
Rohit Waghchaure
79e3700499 fix: payment entry multi-currency issue 2021-01-08 12:36:51 +05:30
Saqib
e898ce1f20 refactor: fetch & validate address from erpnext rather than gst portal (#24305) 2021-01-06 10:49:50 +05:30
Saqib
3ddebae3fb refactor: fetch & validate address from erpnext rather than gst portal (#24299) 2021-01-06 10:49:27 +05:30
Nabin Hait
d5abab4208 fix: tax calculation on salary slip for the first month (#24272) (#24309)
* fix: tax calculation on salary slip for the first month

* fix: net pay precision issue

* fix: net pay precision issue

Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>

Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
2021-01-06 09:34:44 +05:30
Nabin Hait
00a40c95ea Merge branch 'version-12-hotfix' into mr-se-warehouse-validation-hotfix 2021-01-06 09:33:56 +05:30
rohitwaghchaure
750da2f946 Merge pull request #24302 from rohitwaghchaure/allow-to-set-basic-rate-manually-for-manufacture-entry
fix: 'Set Basic Rate Manually' field is now available for Manufacture type stock entry
2021-01-05 17:01:27 +05:30
Rohit Waghchaure
ff524e676f fix: 'Set Basic Rate Manually' field is now available for Manufacure type stock entry 2021-01-05 15:09:54 +05:30
rohitwaghchaure
d8fc6ec471 Merge pull request #24301 from rohitwaghchaure/fixed-allow-to-override-basic-rate-for-fg
fix: allow to override the basic rate for the finished good
2021-01-05 14:55:42 +05:30
Rohit Waghchaure
4e12c70897 fix: allow to override the basic rate for the finished good 2021-01-05 14:54:52 +05:30
Saqib
7e97138beb fix(e-invoicing): minor calculation fixes (#24284) 2021-01-05 13:32:56 +05:30
Saqib
00865b9af3 fix(e-invoicing): minor calculation fixes (#24283) 2021-01-05 13:32:46 +05:30
Deepesh Garg
7d1a431d9c Merge pull request #23963 from vorasmit/remarks-fix-v12
fix: add remarks to sales invoice
2021-01-05 09:57:58 +05:30
Deepesh Garg
fe9e2ec008 Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into remarks-fix-v12 2021-01-05 09:56:58 +05:30
Nabin Hait
ca4c12b44e Merge branch 'version-12-hotfix' into mr-se-warehouse-validation-hotfix 2021-01-05 09:30:09 +05:30
Nabin Hait
cdd950dee5 fix: Ignore customer and supplier while deleting company transactions (#24280) 2021-01-05 09:25:50 +05:30
rohitwaghchaure
21b17cf407 Merge pull request #24289 from rohitwaghchaure/fixed-source-warehouse-if-material-transfer-is-skip
fix: incorrect source warehouse in stock entry
2021-01-05 09:01:39 +05:30
rohitwaghchaure
6324cc238e Merge pull request #24288 from rohitwaghchaure/fixed-pricing-rule-not-working-in-offline-pos
fix: pricing rule not working for offline POS
2021-01-05 09:01:05 +05:30
marination
cdc0b8e435 fix: Dont validate warehouse values between MR to Stock Entry
- Remove validation that checks if warehouse in Stock Entry is the same as MR that it was pulled from
2021-01-04 18:59:48 +05:30
Prssanna Desai
7049cca855 Merge pull request #24290 from frappe/revert-24097-chart-imports
Revert "fix: function imports in account_balance_timeline.py"
2021-01-04 17:16:48 +05:30
Prssanna Desai
ba95d32876 Revert "fix: function imports in account_balance_timeline.py" 2021-01-04 17:14:50 +05:30
Rohit Waghchaure
bf1e0139e2 fix: incorrect source warehouse in stock entry 2021-01-04 16:23:14 +05:30
Rohit Waghchaure
bf490c3a27 fix: pricing rule not working for offline POS 2021-01-04 15:32:13 +05:30
Saqib
40b37f09fd fix: cannot save asset category withouut depr posting date 2021-01-04 11:48:45 +05:30
vorasmit
04e0b35154 Update patches.txt 2021-01-01 17:14:14 +05:30
vorasmit
82b4749166 Update patches.txt 2021-01-01 10:49:48 +05:30
vorasmit
ef06f3288f Delete update_sales_invoice_remarks.py 2021-01-01 10:48:44 +05:30
Saqib
945c0e86de fix: cannot submit e-invoice if legal name not found 2020-12-31 13:17:59 +05:30
Saqib
2cae3d7b38 fix: cannot submit e-invoice if legal name not found 2020-12-31 13:16:59 +05:30
Saurabh
03933f8461 Merge branch 'v12-pre-release' into version-12 2020-12-31 11:20:28 +05:30
Saurabh
ba398bc779 bumped to version 12.16.2 2020-12-31 11:40:28 +05:50
Saqib
022a46fdcd fix: item value & invoice value calculations (#24241) 2020-12-31 11:17:27 +05:30
Deepesh Garg
d092b6c25a Merge pull request #24244 from deepeshgarg007/template_company_filter
fix: Add company filter in tax template query
2020-12-31 11:06:25 +05:30
Karthikeyan S
5add3ea210 fix(GST E Invoice): update live URLs for adaequare GSP (#24249) 2020-12-30 19:21:40 +05:30
Deepesh Garg
909346f222 fix: Add company filter in tax template query 2020-12-30 18:05:52 +05:30
Saurabh
d9a0e0c708 Merge branch 'v12-pre-release' into version-12 2020-12-30 17:45:38 +05:30
Saurabh
839edaf613 bumped to version 12.16.1 2020-12-30 18:05:38 +05:50
Deepesh Garg
11f2da72b1 fix: Error on submitting sales invoice (#24243)
* fix: Error on submitting sales invoice

* fix: remove return_taxes
2020-12-30 17:44:23 +05:30
Saurabh
61298c3489 Merge branch 'v12-pre-release' into version-12 2020-12-30 13:12:30 +05:30
Saurabh
2cf2697e74 bumped to version 12.16.0 2020-12-30 13:32:29 +05:50
rohitwaghchaure
1b0870a440 Merge pull request #24240 from saurabh6790/v12_16_change_log
feat: change log for version 12.16.0
2020-12-30 13:09:39 +05:30
Saurabh
5c107b99bd feat: change log for version 12.16.0 2020-12-30 13:07:05 +05:30
Saqib Ansari
edec82bb9e fix: unit rate & gross amount calculation 2020-12-30 11:57:16 +05:30
Saqib Ansari
45dbfaa7f9 fix: invoice value set to zero if rounded total disabled 2020-12-30 11:57:16 +05:30
Rohit Waghchaure
7d666ccfb4 fix: do not override the manually added valuation rate in stock entry 2020-12-30 11:57:16 +05:30
Saqib Ansari
246ef881a0 fix: e invoice request log permissions 2020-12-30 11:57:16 +05:30
Saqib Ansari
5f3635fbaf fix: travis 2020-12-30 11:57:16 +05:30
Rohit Waghchaure
ec59c6cebc fix: do not manufacture same serial no multiple times 2020-12-30 11:57:16 +05:30
Saqib Ansari
be58194678 fix: sider issues 2020-12-30 11:57:16 +05:30
Saqib Ansari
00306d8fd0 chore: code cleanup 2020-12-30 11:57:16 +05:30
Saqib Ansari
da83ec0f0d fix: cannot cancel irn without submitting sales invoice 2020-12-30 11:57:16 +05:30
Saqib Ansari
709d50ad21 fix: remove test pincode 2020-12-30 11:57:16 +05:30
Saqib Ansari
7f69820f04 fix: uncomment test condition 2020-12-30 11:57:16 +05:30
Saqib Ansari
a0c8106342 feat: multiple gstins for e invoicing 2020-12-30 11:57:16 +05:30
Saqib Ansari
8c8ab4140e fix: remove test supplier pincode 2020-12-30 11:57:16 +05:30
pateljannat
2274162107 fix: modified 2020-12-30 11:57:16 +05:30
Shivam Mishra
6f2a34f6d4 fix: replace pin code with postal code 2020-12-30 11:57:16 +05:30
pateljannat
e512118320 fix: indentation 2020-12-30 11:57:16 +05:30
pateljannat
aa2a7abe4e fix: linter issue for translation syntax 2020-12-30 11:57:16 +05:30
pateljannat
79ff4d0e8f fix: reversing previous commits and adding condition in regional controller 2020-12-30 11:56:50 +05:30
pateljannat
37a64b6485 fix: place of supply change on address change 2020-12-30 11:56:50 +05:30
Deepesh Garg
9f848fe65c fix: Tax template update on supplier 2020-12-30 11:56:50 +05:30
Marica
65680ada87 Revert "fix: po_not retaining on save" 2020-12-30 11:56:09 +05:30
Mohammad Hasnain
a8cda3f013 fix: po_no not cleaned up on save 2020-12-30 11:56:09 +05:30
Mohammad Hasnain
c51b4d0416 fix: po_no getting removed on save 2020-12-30 11:56:09 +05:30
Rucha Mahabal
67cfb6c370 fix(Asset): set current asset value before calculating difference amount (#24119) 2020-12-30 11:56:09 +05:30
Saqib Ansari
54e9063215 feat: add docs link to e invoice settings 2020-12-30 11:56:09 +05:30
Saqib Ansari
554ce04e0d fix: error handling 2020-12-30 11:56:09 +05:30
Saqib Ansari
08f082089e fix: dialog is undefined 2020-12-30 11:56:09 +05:30
Saqib Ansari
d22279ba38 fix: minor ux issues 2020-12-30 11:56:09 +05:30
Saqib Ansari
d01cae95d9 feat: show e-invoice preview before IRN generation 2020-12-30 11:56:09 +05:30
Saqib Ansari
b510d20805 fix: adjust qr code image size 2020-12-30 11:56:09 +05:30
Saqib Ansari
b1054a3ddc fix: sider issues 2020-12-30 11:56:09 +05:30
Saqib Ansari
f454ab4ce2 chore: add ack date and ack no field for print formats 2020-12-30 11:56:09 +05:30
Saqib Ansari
5c68fe4d86 feat: log e-invocing requests 2020-12-30 11:56:09 +05:30
Saqib Ansari
68e476c7fe fix: returning condition 2020-12-30 11:56:08 +05:30
Saqib Ansari
8f5425d99b chore: add tests 2020-12-30 11:56:08 +05:30
Saqib Ansari
6af53a645a fix: ewaybill mandatory conditions 2020-12-30 11:56:08 +05:30
Saqib Ansari
b9cbdeaa95 fix: eway bill test 2020-12-30 11:56:08 +05:30
Saqib Ansari
0ce03cc36d fix: exclude intra company transactions 2020-12-30 11:56:08 +05:30
pateljannat
4ee433a51c fix: indentation 2020-12-30 11:56:08 +05:30
Anuja P
e33179d130 fix: Added TDS account number and an error message 2020-12-30 11:56:08 +05:30
barredterra
53bcf704b3 feat: separate equity tree in CoA SKR04 2020-12-30 11:56:08 +05:30
pateljannat
f4f05dd5ad fix: enabling track changes for stock settings 2020-12-30 11:56:08 +05:30
pateljannat
5b554a5e20 fix: enabling track changes for stock settings 2020-12-30 11:56:08 +05:30
pateljannat
79ac9dc486 fix: enabling track changes for stock settings 2020-12-30 11:56:08 +05:30
pateljannat
f0d591351b fix: enabling track changes for stock settings 2020-12-30 11:56:08 +05:30
Saqib Ansari
c6143c4542 fix: qrcode image size 2020-12-30 11:56:08 +05:30
Saqib Ansari
5a56b63eed feat: update timeline on einvoice actions 2020-12-30 11:56:08 +05:30
Saqib Ansari
5d92e2481d fix: ewaybill could be modified after ewaybill generation 2020-12-30 11:56:08 +05:30
Saqib Ansari
ac603a895d fix: error handling 2020-12-30 11:56:08 +05:30
Saqib Ansari
9f0d567ea5 fix: imports 2020-12-30 11:56:08 +05:30
Saqib Ansari
4ea03c23a4 fix: import format_date 2020-12-30 11:56:08 +05:30
Saqib Ansari
209aa447f7 chore: remove fetch token from e invocie settings 2020-12-30 11:56:08 +05:30
Saqib Ansari
eabaa16f13 feat: cess non advolem on einvoice item 2020-12-30 11:56:08 +05:30
Saqib Ansari
27b68be854 fix: patch 2020-12-30 11:56:08 +05:30
Saqib Ansari
85cc1d68f0 fix: invalid syntax 2020-12-30 11:56:08 +05:30
Saqib Ansari
61e6760a6b fix: invalid syntax 2020-12-30 11:56:08 +05:30
Saqib Ansari
16e879bc1a chore: remove test pincode 2020-12-30 11:56:08 +05:30
Saqib Ansari
8866801932 feat: header & footer in GST E Invoice 2020-12-30 11:56:08 +05:30
Saqib Ansari
4965af2321 chore: error logging 2020-12-30 11:56:08 +05:30
Saqib Ansari
fb65644026 chore: remove unwanted imports 2020-12-30 11:56:08 +05:30
Saqib Ansari
2e1f56e117 feat: generate eway bill from IRN 2020-12-30 11:56:08 +05:30
Saqib Ansari
3b62e05a5c fix: valiations 2020-12-30 11:56:08 +05:30
Saqib Ansari
988fd97625 fix: show/hide eway bill fields 2020-12-30 11:56:08 +05:30
Saqib Ansari
628dcb1ff9 fix: generate & cancel IRN 2020-12-30 11:56:08 +05:30
Saqib Ansari
e6cd9ccea0 fix: attach qrcode on irn generation 2020-12-30 11:56:08 +05:30
Saqib Ansari
ac2fc8470b chore: clean up einvoice actions 2020-12-30 11:56:08 +05:30
Saqib Ansari
6dcf334199 chore: remove unwanted fuctions 2020-12-30 11:56:08 +05:30
Saqib Ansari
5822cfb454 feat: cancel eway bill 2020-12-30 11:56:08 +05:30
Saqib Ansari
a15c02ec71 feat: generate & cancel IRN 2020-12-30 11:56:08 +05:30
Saqib Ansari
0938db8730 feat: fetch and cache GSTIN details 2020-12-30 11:56:08 +05:30
Saqib Ansari
537a236dc9 fix: qr code generation 2020-12-30 11:56:08 +05:30
Saqib Ansari
68d2a1f02b chore: remove unwanted fields 2020-12-30 11:56:08 +05:30
Saqib Ansari
4dad6742e1 feat: initialize GSP connector 2020-12-30 11:56:08 +05:30
Saqib Ansari
44877d5a60 fix: qr code image string 2020-12-30 11:56:08 +05:30
Saqib Ansari
05589e9651 chore: improve document name validation message 2020-12-30 11:56:08 +05:30
Saqib Ansari
9958639a9a fix: other charges calculation 2020-12-30 11:56:08 +05:30
Saqib Ansari
df1686611b fix: invoice totals calculation 2020-12-30 11:56:07 +05:30
Saqib Ansari
1041aef097 fix: patch 2020-12-30 11:56:07 +05:30
Saqib Ansari
0e00bff182 fix: einvoice field validation 2020-12-30 11:56:07 +05:30
Saqib Ansari
160585321d fix: rename e_invoice_utils.py 2020-12-30 11:56:07 +05:30
Saqib Ansari
965bc9bb80 fix: add missing package 2020-12-30 11:56:07 +05:30
Saqib Ansari
bfb68e4e80 fix: e_invoice module not found 2020-12-30 11:56:07 +05:30
Saqib Ansari
3d7f833899 fix: error logging 2020-12-30 11:56:07 +05:30
Saqib Ansari
1866965508 fix: validations 2020-12-30 11:56:07 +05:30
Saqib Ansari
a874587156 fix: credit note einvoice 2020-12-30 11:56:07 +05:30
Saqib Ansari
e7ea94ae6f fix: return date 2020-12-30 11:56:07 +05:30
Saqib Ansari
7015609f7f fix: validate document name 2020-12-30 11:56:07 +05:30
Saqib Ansari
53b05c2850 feat: add patch 2020-12-30 11:56:07 +05:30
Saqib Ansari
e14bb5e978 fix: add permissions on regional setup 2020-12-30 11:56:07 +05:30
Saqib Ansari
4db3ff1673 fix: validations 2020-12-30 11:56:07 +05:30
Saqib Ansari
03cd4135d2 fix: print format 2020-12-30 11:56:07 +05:30
Saqib Ansari
e984632221 fix: download & upload e-invoice 2020-12-30 11:56:07 +05:30
Saqib Ansari
65289334e3 chore: clean up e invoice actions 2020-12-30 11:56:07 +05:30
Saqib Ansari
2e38f73732 chore: code cleanup 2020-12-30 11:56:07 +05:30
Saqib Ansari
52b983eb8f fix: invalid syntax 2020-12-30 11:56:07 +05:30
Saqib Ansari
2e16dcc8fa fix: bug 2020-12-30 11:56:07 +05:30
Saqib Ansari
4e12466bef feat: QRCode Image and E-Invoice Print Format 2020-12-30 11:56:07 +05:30
Saqib Ansari
e0ea4265a8 chore: move einvoicing stuff to seperate folder 2020-12-30 11:56:07 +05:30
Saqib Ansari
233cad9e02 fix: fetch token if not valid 2020-12-30 11:56:07 +05:30
Saqib Ansari
718e517144 chore: save signed invoice and qrcode after uplaoding irn 2020-12-30 11:56:07 +05:30
Saqib Ansari
4f3f935a7a fix: fn name 2020-12-30 11:56:07 +05:30
Saqib Ansari
94db0bba44 chore: group e-invoicing actions 2020-12-30 11:56:07 +05:30
Saqib Ansari
acc79f739b feat: manual download / upload json 2020-12-30 11:56:07 +05:30
Saqib Ansari
bdf4bfe98f feat: cancel e-way bill before cancelling IRN 2020-12-30 11:56:07 +05:30
Saqib Ansari
9e5388ac53 chore: no copy on e invoice custom fields 2020-12-30 11:56:07 +05:30
Saqib Ansari
a6666dbf97 fix: save e-way bill no on irn generation 2020-12-30 11:56:07 +05:30
Saqib Ansari
4b969a5b9b feat: e-way bill details in e-invoice 2020-12-30 11:56:07 +05:30
Saqib Ansari
b6faadab8d chore: show irn field for proper gst_category 2020-12-30 11:56:07 +05:30
Saqib Ansari
38f06a1a26 fix: update irn_cancelled after cancelling irn 2020-12-30 11:56:07 +05:30
Saqib Ansari
b54df979c4 fix: do not show generate irn for invalid supply type 2020-12-30 11:56:07 +05:30
Saqib Ansari
1b969ff140 fix: validation if e invoicing is disabled 2020-12-30 11:56:07 +05:30
Saqib Ansari
bf2b4bc6f7 fix: cannot find attached key file 2020-12-30 11:56:07 +05:30
Saqib Ansari
9d805272be fix: public key is required on validate 2020-12-30 11:56:07 +05:30
Saqib Ansari
d4255d77f4 fix: hide cancel irn dialog on error 2020-12-30 11:56:07 +05:30
Saqib Ansari
13467e42f3 chore: show irn cancelled check after cancellation 2020-12-30 11:56:07 +05:30
Saqib Ansari
1679b0adbb fix: item discount 2020-12-30 11:56:07 +05:30
Saqib Ansari
e7a129dde8 chore: minor fixes 2020-12-30 11:56:07 +05:30
Saqib Ansari
b12d08a85b feat: Generate & Cancel IRN from Sales Invoice 2020-12-30 11:56:07 +05:30
Saqib Ansari
fe054511c8 feat: make IRN field on regional setup 2020-12-30 11:56:07 +05:30
Saqib Ansari
c3e0ff93d7 chore: rename schema to template & js cleanup 2020-12-30 11:56:07 +05:30
Saqib Ansari
4d15506791 chore: split einvoice settings and operations 2020-12-30 11:56:07 +05:30
Saqib Ansari
a367cc5c99 chore: move e-invoice settings to regional 2020-12-30 11:56:07 +05:30
Saqib Ansari
9599420878 feat: complete e-invoice schema 2020-12-30 11:56:07 +05:30
Saqib Ansari
c9b6db27cf feat: cancel IRN 2020-12-30 11:56:06 +05:30
Saqib Ansari
d72d2367ab chore: validations 2020-12-30 11:56:06 +05:30
Saqib Ansari
d9e4ebc00c feat: decode signed json and QR code 2020-12-30 11:56:06 +05:30
Saqib Ansari
a4bd8ba6f9 feat: generate IRN 2020-12-30 11:56:06 +05:30
Saqib Ansari
6f5a9c8049 feat: make e invoice from erpnext sales invoice 2020-12-30 11:56:06 +05:30
Saqib Ansari
48449e6d0a feat: decrypt json data with SEK 2020-12-30 11:56:06 +05:30
Saqib Ansari
31596228ff feat: AES decryption of SEK with appkey 2020-12-30 11:56:06 +05:30
Saqib Ansari
017543d59d chore: handle error response 2020-12-30 11:56:06 +05:30
Saqib Ansari
cca0eaaa29 feat: save token and sek from auth request 2020-12-30 11:56:06 +05:30
Saqib Ansari
b52a9283bb feat: rsa encryption with public key 2020-12-30 11:56:06 +05:30
Saqib Ansari
39dabe7381 feat: read public key file 2020-12-30 11:56:06 +05:30
Saqib Ansari
1c213a3dbb feat: init e-invoice settings 2020-12-30 11:56:06 +05:30
rohitwaghchaure
e7eb9d4e20 Merge pull request #24184 from nextchamp-saqib/e-invoicing-version-12
feat: GST E-Invoicing
2020-12-30 11:15:37 +05:30
Saqib Ansari
d94a97b6ad fix: unit rate & gross amount calculation 2020-12-29 17:56:14 +05:30
Saqib Ansari
d819330443 fix: invoice value set to zero if rounded total disabled 2020-12-29 17:56:08 +05:30
Yogendrasinh Chavda
eb88b63ddd [IMP][version-12] Improved code by adding operator to check condition. 2020-12-28 17:40:52 +05:30
rohitwaghchaure
86bbb3e9a0 Merge pull request #24221 from rohitwaghchaure/donot-override-valuation-rate
fix: do not override the manually added valuation rate in stock entry
2020-12-28 16:43:49 +05:30
Rohit Waghchaure
b9d62d7f8e fix: do not override the manually added valuation rate in stock entry 2020-12-28 15:20:23 +05:30
rohitwaghchaure
44dd9f6fe5 Merge pull request #24163 from rohitwaghchaure/do-not-manufacture-same-serial-no-two
fix: do not manufacture same serial no multiple times
2020-12-24 22:54:30 +05:30
Saqib Ansari
a683b14c64 fix: e invoice request log permissions 2020-12-24 21:12:13 +05:30
Saqib Ansari
becae59af0 fix: travis 2020-12-24 21:12:06 +05:30
Rohit Waghchaure
e6d300e35c fix: do not manufacture same serial no multiple times 2020-12-24 17:47:48 +05:30
Saqib Ansari
c2a41371d2 fix: sider issues 2020-12-24 10:39:41 +05:30
Saqib Ansari
6d3fc0d020 chore: code cleanup 2020-12-23 15:43:51 +05:30
Saqib Ansari
81cbd0dc50 fix: cannot cancel irn without submitting sales invoice 2020-12-23 15:43:31 +05:30
Saqib Ansari
1bbda81c9f fix: remove test pincode 2020-12-23 15:19:51 +05:30
Saqib Ansari
21461823f1 fix: uncomment test condition 2020-12-23 14:36:40 +05:30
Rohit Waghchaure
e9b580aba6 fix: pos not working 2020-12-22 19:03:39 +08:00
Sun Howwrongbum
7f794e5bb6 fix(pos): loyalty details not rendering in cart area 2020-12-22 19:02:08 +08:00
Saqib Ansari
6db07c0278 feat: multiple gstins for e invoicing 2020-12-22 15:56:18 +05:30
Saqib Ansari
c28379075a fix: remove test supplier pincode 2020-12-21 18:41:40 +05:30
Saurabh
95c3258ee4 Merge branch 'v12-pre-release' into version-12 2020-12-21 16:14:01 +05:30
Saurabh
00e095278d bumped to version 12.15.0 2020-12-21 16:25:38 +05:50
Nabin Hait
53d98ff635 chore: Added change log 2020-12-21 14:31:56 +05:30
Marica
64f4f86948 Merge pull request #23983 from pateljannat/track-changes-for-stock-settings-v12
fix: enabling track changes for stock settings
2020-12-19 16:25:54 +05:30
pateljannat
983df4463a fix: modified 2020-12-18 20:18:17 +05:30
Shivam Mishra
b9c71e59e0 Merge pull request #24180 from scmmishra/chore-rename-pin-code 2020-12-18 13:32:34 +05:30
Shivam Mishra
8427dd2ca8 fix: replace pin code with postal code 2020-12-18 13:30:25 +05:30
Deepesh Garg
8b43faa203 Merge pull request #24175 from deepeshgarg007/tax_category_typo_v12_pre
fix: Validation for duplicate Tax Category
2020-12-17 19:09:13 +05:30
Nabin Hait
5ee6417228 fix: Translation issue 2020-12-17 19:07:37 +05:30
Deepesh Garg
71349d5a49 fix: Validation for duplicate Tax Category 2020-12-17 19:06:31 +05:30
Deepesh Garg
105a9fdff1 Merge pull request #24174 from deepeshgarg007/tax_category_typo_v12
fix: Typo in tax category doctype query
2020-12-17 19:01:01 +05:30
Deepesh Garg
bd0cb9d2ed Typo in tax category doctype query 2020-12-17 18:59:42 +05:30
pateljannat
ffbb767072 Merge branch 'track-changes-for-stock-settings-v12' of https://github.com/pateljannat/erpnext into track-changes-for-stock-settings-v12 2020-12-17 13:26:21 +05:30
pateljannat
723e4f2a22 fix: indentation 2020-12-17 13:26:11 +05:30
Deepesh Garg
a738e8ca87 Merge pull request #24128 from ruchamahabal/fix-asset-value-adjustment-v12
fix(Asset): set current asset value before calculating difference amount
2020-12-17 12:36:35 +05:30
Deepesh Garg
b0b36d2caa Merge pull request #24094 from frappe/skr04_equity
feat: separate equity tree in CoA SKR04
2020-12-17 09:15:11 +05:30
Deepesh Garg
98d8718979 Merge pull request #24162 from deepeshgarg007/template_update_v12_pre
fix(India): Taxation fixes
2020-12-17 09:11:38 +05:30
Deepesh Garg
0de091a749 Merge pull request #24159 from deepeshgarg007/template_update_v12
fix(India): Taxation fixes
2020-12-17 09:11:20 +05:30
Deepesh Garg
2a92d1b94a fix: Tax template update on customer address change 2020-12-16 22:03:41 +05:30
pateljannat
af60e85400 fix: removing return_taxes condition 2020-12-16 22:03:31 +05:30
pateljannat
45d8204e1e fix: company filter added again 2020-12-16 22:03:15 +05:30
pateljannat
56d5b68046 fix: linter issue for translation syntax 2020-12-16 22:02:52 +05:30
pateljannat
dafbb80ec5 fix: reversing previous commits and adding condition in regional controller 2020-12-16 22:02:00 +05:30
pateljannat
f226927b6a fix: place of supply change on address change 2020-12-16 22:01:35 +05:30
pateljannat
8cfde675ac fix: place of supply change when address changes 2020-12-16 22:01:27 +05:30
Deepesh Garg
599d7a686e fix: Tax template update on supplier 2020-12-16 22:01:15 +05:30
Deepesh Garg
2d073016ee Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into template_update_v12 2020-12-16 20:43:11 +05:30
Deepesh Garg
12f95c41b9 fix: Tax template update on customer address change 2020-12-16 20:38:54 +05:30
pateljannat
7fb22fd652 fix: removing return_taxes condition 2020-12-16 20:13:22 +05:30
pateljannat
284a19c99d fix: company filter added again 2020-12-16 20:12:38 +05:30
pateljannat
1a401b1427 fix: linter issue for translation syntax 2020-12-16 20:12:24 +05:30
pateljannat
b2db8031d5 fix: reversing previous commits and adding condition in regional controller 2020-12-16 20:12:04 +05:30
pateljannat
58fae20ff9 fix: place of supply change on address change 2020-12-16 20:10:16 +05:30
pateljannat
2cf9cc02e1 fix: place of supply change when address changes 2020-12-16 20:10:06 +05:30
Deepesh Garg
9b893643c0 fix: Tax template update on supplier 2020-12-16 20:09:39 +05:30
Marica
126de4d0e5 Merge pull request #24156 from frappe/revert-24131-version-12-hotfix
fix: Revert "fix: po_not retaining on save"
2020-12-16 18:13:16 +05:30
Marica
18635e4dd1 Revert "fix: po_not retaining on save" 2020-12-16 17:02:41 +05:30
Marica
4b75d528c9 Merge pull request #24131 from hasnain2808/version-12-hotfix
fix: po_not retaining on save
2020-12-16 16:42:57 +05:30
Mohammad Hasnain Mohsin Rajan
5220e9201b Merge branch 'version-12-hotfix' into version-12-hotfix 2020-12-16 15:29:53 +05:30
Anurag Mishra
ee7bcc0350 fix: Added TDS Payable account number and an error message
fix: Added TDS Payable account number and an error message
2020-12-16 13:49:41 +05:30
Mohammad Hasnain
1f2ec25493 fix: po_no not cleaned up on save 2020-12-15 14:48:44 +05:30
Mohammad Hasnain
e46a72b101 fix: po_no getting removed on save 2020-12-15 14:41:35 +05:30
Rucha Mahabal
b4dfba54b6 fix(Asset): set current asset value before calculating difference amount (#24119) 2020-12-15 12:50:15 +05:30
Saqib Ansari
9daf4418ea feat: add docs link to e invoice settings 2020-12-14 19:14:43 +05:30
Saqib Ansari
695e551972 fix: error handling 2020-12-14 18:59:01 +05:30
Saqib Ansari
e6a07d5508 fix: dialog is undefined 2020-12-14 17:31:31 +05:30
Saqib Ansari
d67affdfae fix: minor ux issues 2020-12-14 17:15:36 +05:30
Saqib Ansari
cde452add7 feat: show e-invoice preview before IRN generation 2020-12-14 16:51:25 +05:30
Saqib Ansari
5c74cdd0d2 fix: adjust qr code image size 2020-12-14 16:40:23 +05:30
Marica
58b1e3b866 Merge branch 'version-12-hotfix' into track-changes-for-stock-settings-v12 2020-12-14 13:14:05 +05:30
Anurag Mishra
b16d625b4f Merge pull request #24118 from deepeshgarg007/unique_tax_category_v12
fix: Validation for duplicate Tax Category
2020-12-14 12:39:08 +05:30
Saqib Ansari
96f0b0e30a Merge branch 'version-12-hotfix' into e-invoicing-version-12 2020-12-14 12:25:00 +05:30
Saqib Ansari
390cac2160 fix: sider issues 2020-12-14 12:19:30 +05:30
Saqib Ansari
64e9275c4a chore: add ack date and ack no field for print formats 2020-12-14 12:19:24 +05:30
Saqib Ansari
42b028a3ba feat: log e-invocing requests 2020-12-14 12:19:19 +05:30
Saqib Ansari
5327637b37 fix: returning condition 2020-12-14 12:19:12 +05:30
Saqib Ansari
5d6849ac7f chore: add tests 2020-12-14 12:19:06 +05:30
Saqib Ansari
57e6759088 fix: ewaybill mandatory conditions 2020-12-14 12:18:54 +05:30
Saqib Ansari
9760eb9d57 fix: eway bill test 2020-12-14 12:15:04 +05:30
Saqib Ansari
ee0b08ae9c fix: exclude intra company transactions 2020-12-14 12:14:55 +05:30
Nabin Hait
22e770353f fix: Translation issue 2020-12-14 11:00:59 +05:30
Deepesh Garg
bbce16e00c fix: Validation for duplicate Tax Category 2020-12-14 10:57:29 +05:30
Nabin Hait
2bd620fac8 fix: Fixed merge conflict 2020-12-11 22:34:34 +05:30
pateljannat
3dbf88ba6f fix: indentation 2020-12-11 10:25:08 +05:30
Anuja P
1cd57a324c fix: Added TDS account number and an error message 2020-12-10 22:05:09 +05:30
Marica
fe56b800a6 Merge pull request #24081 from pateljannat/sales-invoice-from-sales-order-v12
fix: sales invoice add button on sales order dashboard
2020-12-10 20:09:20 +05:30
Marica
ccdfbd4f40 Merge pull request #24103 from marination/hotfix-debit-credit-opening-invoice-tool
fix: Handle Account and Item None not found in Opening Invoice Creation Tool
2020-12-10 20:06:13 +05:30
Marica
f7f809aae8 Merge branch 'version-12-hotfix' into hotfix-debit-credit-opening-invoice-tool 2020-12-10 20:04:54 +05:30
Mohammad Hasnain Mohsin Rajan
3f399ee806 fix(acc recv report): columns mismatch (#24085) 2020-12-10 19:15:53 +05:30
Marica
7bbe383232 Merge branch 'version-12-hotfix' into hotfix-debit-credit-opening-invoice-tool 2020-12-10 18:58:31 +05:30
marination
1fcd1e4dc0 fix: add assertRaises for error 2020-12-10 17:34:30 +05:30
Anurag Mishra
800a9ae7c3 Merge pull request #24097 from prssanna/chart-imports
fix: function imports in account_balance_timeline.py
2020-12-10 16:32:59 +05:30
marination
a63b5c1a9e fix: Make new Customers for account missing test and set company 2020-12-10 16:31:23 +05:30
marination
74bcb2977f chore: Add Test for missing debit account 2020-12-10 16:30:39 +05:30
marination
96946fa4a0 fix: Handle missing Account and Item in Opening Invoice Creation Tool 2020-12-10 16:30:13 +05:30
Deepesh Garg
e2fb0c567d Merge pull request #24036 from nextchamp-saqib/abs-value-in-pf-v12
fix: get formatted value in 'taxes' print template
2020-12-10 15:35:15 +05:30
Raffael Meyer
e8f4eb02be Merge branch 'version-12-hotfix' into skr04_equity 2020-12-10 10:52:26 +01:00
Mohammad Hasnain Mohsin Rajan
5a1d912e6d Merge branch 'version-12-hotfix' into sales-invoice-from-sales-order-v12 2020-12-10 14:07:07 +05:30
Prssanna Desai
e152f9a89a Merge pull request #24099 from prssanna/shopping-cart-fix
fix: get value of allow_items_in_stock even if not an exact match
2020-12-10 12:44:48 +05:30
prssanna
6a718a3fc6 fix: get value of allow_items_in_stock even if not an exact match 2020-12-10 12:39:53 +05:30
Saqib
5062b78718 fix: asset with value zero doesn't show up in fixed asset register (#24098) 2020-12-10 12:33:43 +05:30
prssanna
eed12444e1 fix: function imports in account_balance_timeline.py 2020-12-10 12:20:18 +05:30
rohitwaghchaure
326fccfa00 Merge pull request #24001 from rohitwaghchaure/fixed-stock-entry-multi-consumption
fix: incorrect stock quantity if 'Allow Multiple Material Consumption…
2020-12-10 02:11:20 +05:30
Rohit Waghchaure
e7476914cd fix: incorrect stock quantity if 'Allow Multiple Material Consumption' has enabled 2020-12-10 01:27:54 +05:30
rohitwaghchaure
b1507fdaae Merge pull request #24009 from rohitwaghchaure/shipping-charges-not-added-in-invoice
fix: shipping charges not sync from shopify
2020-12-10 01:06:18 +05:30
barredterra
f76b0dea44 feat: separate equity tree in CoA SKR04 2020-12-09 17:45:00 +01:00
Prssanna Desai
ede082657f Merge pull request #24093 from prssanna/item-configurator-fix-version-12
fix: allow add to cart for any item if allow_items_not_in_stock is enabled
2020-12-09 17:54:46 +05:30
prssanna
d0303b3fb1 fix: allow add to cart for any item if allow_items_not_in_stock is enabled 2020-12-09 17:32:16 +05:30
Shivam Mishra
91a3ab8e32 Merge pull request #24084 from prssanna/item-configurator-fix
fix(Shopping Cart): allow add to cart for any item if allow_items_not_in_stock is enabled
2020-12-09 16:45:22 +05:30
prssanna
cfb6e3aa30 fix: allow add to cart for any item if allow_items_not_in_stock is enabled 2020-12-08 16:44:38 +05:30
pateljannat
4fe48a30c4 fix: sales invoice add button on sales order dashboard 2020-12-08 12:04:56 +05:30
Jannat Patel
af29bde0e8 Merge pull request #2 from frappe/version-12-hotfix
Version 12 hotfix
2020-12-08 11:39:32 +05:30
Afshan
b83e131b1f fix: throw an error when no pos profile exist (#24026)
* fix: throw an error when no pos profile exist

* fix: tests

* fix: tests

* fix:test
2020-12-08 09:45:14 +05:30
Rucha Mahabal
51015178da fix(POS): do not fetch items until POS Profile is set (#24076) 2020-12-08 09:34:22 +05:30
Afshan
e39dd079c4 fix: double exception in payroll (#24080) 2020-12-08 09:32:08 +05:30
Afshan
7459dc4105 fix: po orverride (#24023)
* fix: po orverride

* fix: po

* fix: spelling error

* fix: refactor condition

* fix: condition
2020-12-08 09:28:01 +05:30
Deepesh Garg
0796d6b5d0 Merge pull request #24071 from deepeshgarg007/gstr_3b_report_ims_v12
fix: Show tax amount in base currencies
2020-12-07 09:14:29 +05:30
Deepesh Garg
5b08241dc6 fix: Show tax amount in base currencies 2020-12-07 09:12:58 +05:30
rohitwaghchaure
5318a159a9 Merge pull request #24068 from rohitwaghchaure/delete-receive-at-warehouse-entry
fix: delete Receive at Warehouse entry on cancellation of Send to War…
2020-12-06 20:57:31 +05:30
Rohit Waghchaure
26723d10af fix: delete Receive at Warehouse entry on cancellation of Send to Warehouse entry 2020-12-06 17:21:30 +05:30
rohitwaghchaure
3ec6bc1838 Merge pull request #24064 from rohitwaghchaure/additional-product-incorrect-rate-v12
fix: pricing rule with transaction not working for additional product
2020-12-06 13:20:39 +05:30
Rohit Waghchaure
29f92e0405 fix: pricing rule with transaction not working for additional product 2020-12-05 19:30:17 +05:30
rohitwaghchaure
2c9f33a916 Merge pull request #24034 from rohitwaghchaure/fixed-job-card-cacncel-flow
fix: don't cancel job card if manufacturing entry has made
2020-12-04 14:15:19 +05:30
Rohit Waghchaure
b09da9bcfc fix: don't cancel job card if manufacturing entry has made 2020-12-04 11:37:50 +05:30
rohitwaghchaure
771a7276c9 Merge pull request #24037 from rohitwaghchaure/fixed-calculate-depreciation-table-issue
fix: Depreciation Posting Date is mandatory even if Calculate Depreci…
2020-12-03 18:24:51 +05:30
Anurag Mishra
2c6c1aa97a fix: payroll attendance error
fix: payroll attendance error
2020-12-03 16:13:07 +05:30
Afshan
482996f8d1 fix: using ORM 2020-12-03 15:14:30 +05:30
Afshan
785579e67b fix: payroll attendance error 2020-12-03 15:11:34 +05:30
Deepesh Garg
74224d90bf Merge pull request #23966 from deepeshgarg007/unpaid_subscription_fix
fix: Invoice generation for Unpaid subscriptions
2020-12-02 20:03:42 +05:30
Rohit Waghchaure
e5d4b4c1ed fix: Depreciation Posting Date is mandatory even if Calculate Depreciation has disabled 2020-11-30 17:20:51 +05:30
Saqib Ansari
39fa5e3266 fix: get formatted value in 'taxes' print template 2020-11-30 15:56:44 +05:30
Deepesh Garg
f940a3494f Merge pull request #24020 from deepeshgarg007/gstr-1-b2c_large
fix: Opening invoices in GSTR-1 report
2020-11-30 10:57:49 +05:30
Deepesh Garg
f08c2a5cef Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into unpaid_subscription_fix 2020-11-29 22:48:46 +05:30
Deepesh Garg
d8b4044ee1 fix: Add check to generate new invoices 2020-11-29 22:48:05 +05:30
rohitwaghchaure
78e737de5a Merge pull request #24013 from rohitwaghchaure/fixed-incoming-rate-for-finished-good
fix: incoming rate for finished good
2020-11-28 19:37:21 +05:30
Deepesh Garg
02feab9f3c fix: Opening invoices in GSTR-1 report 2020-11-27 21:55:02 +05:30
Rohit Waghchaure
3ef60dbfdb fix: incoming rate for finished good 2020-11-27 17:21:05 +05:30
Rohit Waghchaure
75a54361d7 fix: shipping chanrges not sync in erpnext from shopify 2020-11-26 12:55:27 +05:30
Jannat Patel
42b24cc9eb fix: job card error handling for operations field (#23996)
Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
2020-11-25 09:07:57 +05:30
rohitwaghchaure
ca05945e92 fix: incorrect balance value in stock balance report (#23997) 2020-11-25 08:58:58 +05:30
rohitwaghchaure
a69b9f95cc Merge pull request #23993 from rohitwaghchaure/bom-stock-project-item-color
fix: bom stock report color showing always red
2020-11-24 17:00:49 +05:30
Rohit Waghchaure
f9e62b74d0 fix: bom stock report color showing always red 2020-11-24 16:56:20 +05:30
Afshan
2b3a20ed5b fix: clear error message when approval not availab (#23972)
le
2020-11-24 08:01:43 +05:30
pateljannat
3252d9d943 fix: enabling track changes for stock settings 2020-11-23 16:41:51 +05:30
pateljannat
9655edabd9 fix: enabling track changes for stock settings 2020-11-23 16:37:00 +05:30
pateljannat
2704327029 fix: enabling track changes for stock settings 2020-11-23 16:34:40 +05:30
Jannat Patel
3d84d324d7 fix: purchase receipt to purchase invoice bill date mapping (#23968)
Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2020-11-23 16:29:42 +05:30
pateljannat
3e526b8ca8 fix: enabling track changes for stock settings 2020-11-23 16:19:50 +05:30
Anurag Mishra
47bdbf1e78 Merge pull request #23979 from rohitwaghchaure/color-not-showing-in-bom-stock-report
fix: bom stock report color issue
2020-11-23 16:14:01 +05:30
Rohit Waghchaure
0cb6ce3a89 fix: bom stock report color issue 2020-11-23 14:11:24 +05:30
rohitwaghchaure
5597737dca Merge pull request #23958 from rohitwaghchaure/incorrect-delink-serial-no-and-batch-v12-hotfix
fix: incorrect delink serial no and batch
2020-11-20 13:45:32 +05:30
Rohit Waghchaure
77b9fa0d06 fix: incorrect delink serial no and batch 2020-11-20 00:26:36 +05:30
Deepesh Garg
224006aebd fix: Invoice generation for Unpaid subscriptions 2020-11-19 19:39:08 +05:30
Smit Vora
c630be6781 fix: remove unused imports 2020-11-19 19:13:06 +05:30
Smit Vora
51a153d8c2 fix: removed unused code 2020-11-19 19:03:22 +05:30
Smit Vora
707b630851 fix: add remarks to sales invoice 2020-11-19 18:42:39 +05:30
Saurabh
fdacb5643b Merge branch 'v12-pre-release' into version-12 2020-11-19 15:39:04 +05:30
Saurabh
ec89a65859 bumped to version 12.14.0 2020-11-19 15:59:04 +05:50
rohitwaghchaure
1e4a6e845b Merge pull request #23956 from rohitwaghchaure/split-mysql-query-to_update-quantity-hotfix
fix: Table 'tabStock Entry Detail' is specified twice
2020-11-19 14:06:09 +05:30
Rohit Waghchaure
0433fa58f3 fix: Table 'tabStock Entry Detail' is specified twice 2020-11-19 12:52:17 +05:30
rohitwaghchaure
5c72ad2498 fix: Table 'tabStock Entry Detail' is specified twice (#23952) 2020-11-19 12:45:40 +05:30
rohitwaghchaure
c976d080ea fix: stock ledger entries for stock reco (#23955) 2020-11-19 08:15:41 +05:30
Deepesh Garg
fac940042b Merge pull request #23954 from vorasmit/fix-sez-v12
fix(regional): set proper state code in ewaybill JSON when GST category is SEZ
2020-11-18 21:51:12 +05:30
Smit Vora
3e36d774d2 fix(regional): set proper state code in ewaybill JSON when GST category is SEZ 2020-11-18 21:03:45 +05:30
Marica
507c46d9a4 chore: Revert "fix: Received/Delivered Items to Billed Logic" (#23950)
This reverts commit 4f008f59fc.
2020-11-18 20:54:43 +05:30
Marica
36706b7cb0 chore: Revert "fix: Received/Delivered Items to Billed Logic" (#23948)
This reverts commit 4f008f59fc.
2020-11-18 20:54:33 +05:30
Nabin Hait
18471131cc chore: added change log for v12.14.0 (#23951) 2020-11-18 19:27:00 +05:30
rohitwaghchaure
d920f9da59 Merge pull request #23938 from rohitwaghchaure/duplicate-stock-transactions-created
fix: incorrect stock ledger entries for stock reco
2020-11-18 18:16:58 +05:30
Rohit Waghchaure
f041af53db fix: stock ledger entries for stock reco 2020-11-18 17:15:57 +05:30
Marica
5111882162 Merge pull request #23927 from marination/employee-relieving-fix
fix: Hide Ex-Employees from Employee Tree and minor message UX
2020-11-17 15:15:45 +05:30
Marica
e37604baeb Merge branch 'version-12-hotfix' into employee-relieving-fix 2020-11-17 15:15:08 +05:30
Marica
0e91805719 Merge pull request #23931 from marination/item-link-formatter-hotfix
fix: Item Link Formatter Behaviour
2020-11-17 13:28:52 +05:30
Marica
3377e74fd0 Merge branch 'version-12-hotfix' into item-link-formatter-hotfix 2020-11-17 13:27:58 +05:30
Marica
d87094ebb2 Merge pull request #23928 from marination/bank-reconciliation-hotfix
fix: Sequence Matcher shouldn't get None input
2020-11-17 13:26:58 +05:30
Marica
c7d68a7f41 Merge pull request #23930 from marination/payment-reco-mandatory-check-hotfix
fix: Payment Reconciliation client side validations
2020-11-17 13:24:11 +05:30
marination
3bbed22f04 fix: Item Link Formatter Behaviour 2020-11-17 13:19:53 +05:30
Marica
aab91990e5 Merge pull request #23929 from marination/payment-entry-list-view-hotfix
fix: Check if list view standard filter exists in Payment Entry
2020-11-17 13:14:06 +05:30
marination
2e23050338 fix: Missing semicolon 2020-11-17 13:11:18 +05:30
marination
5ea276d29d fix: Payment Reconciliation client side validations 2020-11-17 13:11:09 +05:30
marination
7e18df31bf fix: Check if list view standard filter exists in Payment Entry 2020-11-17 13:08:33 +05:30
Marica
2c29933118 fix: Sequence Matcher shouldn't get None input (#23539)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-11-17 13:05:31 +05:30
Marica
9525bffcd9 fix: Hide Ex-Employees from Employee Tree and minor message UX
* fix: Hide Ex-Employees from Employee Tree and minor message UX

* fix: translation syntax
2020-11-17 12:58:31 +05:30
Nabin Hait
6ba0b69469 Merge branch 'version-12-hotfix' into v12-pre-release 2020-11-17 12:18:55 +05:30
rohitwaghchaure
9f93a4069a Merge pull request #23926 from rohitwaghchaure/fixed-stock-ageing-report-not-working-pre-release
fix: stock ageing report not working
2020-11-17 12:18:14 +05:30
Rohit Waghchaure
a73c662a38 fix: stock ageing report not working 2020-11-17 12:16:17 +05:30
rohitwaghchaure
d3074c32fd fix: stock ageing report not working (#23924) 2020-11-17 12:10:05 +05:30
Suraj Shetty
fe56015cbf fix: Handle the "no leave_allocation found" case (#23920) 2020-11-17 12:07:53 +05:30
Saqib
789f1007b9 fix: asset finance book posting date fix (#23780)
* fix: asset finance book posting date fix

* fix: cannot save asset

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-11-17 11:53:37 +05:30
Suraj Shetty
f202a49d80 Revert "feat: e invoicing with JSON files" (#23925) 2020-11-17 11:44:55 +05:30
Saqib
8b7d4a3f2e feat: re-linking bank accounts with plaid (#23913) 2020-11-17 11:27:11 +05:30
Marica
b9efb4577a fix: Don't overrule Item Price via Pricing Rule Rate if 0 (#23915)
* fix: Dont overrule Item Price via Pricing Rule Rate if 0

* chore: Pricing Rule with Item Price Test
2020-11-17 11:17:05 +05:30
Marica
b5217ee9d7 fix: Don't copy terms, discount and required by from SO to PO (#23904)
* fix: Dont copy terms, discount and required by from SO to PO

* fix: Let delivery date and required by date get mapped
2020-11-17 11:14:33 +05:30
rohitwaghchaure
e8610014de fix: donot add same packing item multiple time in product bundle (#23898) 2020-11-17 11:11:23 +05:30
Suraj Shetty
780982dcc7 fix: Handle the "no leave_allocation found" case (#23921) 2020-11-17 11:02:15 +05:30
Suraj Shetty
26b802d44a fix: Typo (Enchashment > Encashment) (#23918) 2020-11-17 10:43:55 +05:30
Suraj Shetty
519f5b5411 fix: Typo (Enchashment > Encashment) (#23917) 2020-11-17 10:42:23 +05:30
Suraj Shetty
aebeb573e4 Merge branch 'version-12-hotfix' of github.com:frappe/erpnext into v12-pre-release 2020-11-17 10:15:52 +05:30
Shivam Mishra
e1b96d70db refactor: show form buttons only if permissions exist (#23889)
* refactor: show form buttons only if permissions exist

* fix: missing semicolon

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-11-15 16:42:55 +05:30
Marica
31e2c80e33 Merge pull request #23895 from marination/po-to-so-hotfix
fix:  SO to PO flow improvement
2020-11-13 11:26:14 +05:30
marination
09e1b5314b fix: Make sure row object has doctype so that read only property is applied to rows 2020-11-12 12:27:26 +05:30
marination
40ba013636 fix: SO to PO Mapping Issue
- removed type: GET , which made the URL longer
- Added only relevant fields from Items table to Dialog table to reduce args load
- Made separate method to set table data in dialog
- Added freeze message
2020-11-12 12:27:06 +05:30
Marica
16427c5cc8 fix: SO to PO flow improvement (#23357)
* fix: SO to PO flow improvement

* fix: Dont map shipping_address

- shipping_address is a text field in SO and link field in PO
- Drop shipping case handles its mapping
- normal case doesnt need to map

* fix: Hide/Add rows depending on Against Default Supplier

* fix: Removed Default Supplier Select field from popup

- removed Default Supplier Select field from popup
- only loop through suppliers of selected items if via default supplier
- only check for items in selected items

* fix: Sales Order Drop Shipping Test

* fix: (translation)Multi line to single line strings

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-11-12 12:23:27 +05:30
Deepesh Garg
7365566894 Merge pull request #23863 from rohitwaghchaure/incorrect-outstanding-amount-in-reverse-charge
fix: incorrect outstanding amount for multicurrency with Reverse Charge
2020-11-11 18:32:50 +05:30
Rohit Waghchaure
6b86586eb1 fix: incorrect outstanding amount for multicurrency with Reverse Charge 2020-11-11 17:32:42 +05:30
Marica
1ff8ae494d Merge pull request #23730 from AfshanKhan/fix-po-no-fetching-v12
fix: copying po no when mapping doc
2020-11-11 17:17:58 +05:30
Marica
02f856e968 Merge branch 'version-12-hotfix' into fix-po-no-fetching-v12 2020-11-11 12:20:05 +05:30
Afshan
38e681e8b2 fix: refactor 2020-11-11 11:47:23 +05:30
rohitwaghchaure
ecffa80216 Merge pull request #23878 from rohitwaghchaure/fix-stock-entry-consumption-issue-v12-hotfix
fix: incorrect backflush qty in manufacture entry
2020-11-10 23:23:33 +05:30
Rohit Waghchaure
cee0706a1f fix: incorrect backflush qty in manufacture entry 2020-11-10 15:55:01 +05:30
Anurag Mishra
bd49da45e3 feat: added column cost_center to receivable reports (#23837)
* feat: added column cost_center to receivable reports

* Update accounts_receivable.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-11-09 20:21:25 +05:30
Marica
04458e7413 Merge pull request #23866 from marination/purchase-invoice-payment-terms-fix
fix: Payment Terms not fetched in Purchase Invoice from Purchase Receipt
2020-11-09 18:44:40 +05:30
marination
f5e4f75fd0 chore: Test case for Payment Terms in PI from PR 2020-11-09 16:15:56 +05:30
marination
80f5734305 fix: Payment Terms not fetched in Purchase Invoice from Purchase Receipt 2020-11-09 16:15:46 +05:30
Marica
c5096e0441 Merge pull request #23804 from marination/delievered-received-items-to-bill-report-fix
fix: Received/Delivered Items to Be Billed Logic
2020-11-09 14:50:50 +05:30
Marica
20b5b30e34 Merge branch 'version-12-hotfix' into delievered-received-items-to-bill-report-fix 2020-11-09 10:34:05 +05:30
Deepesh Garg
d196f14e85 Merge pull request #23859 from deepeshgarg007/india_tax_template_fetch_v12
fix: Auto State-wise gst tax template
2020-11-08 17:49:08 +05:30
Deepesh Garg
6beee63d06 fix: Auto State-wise gst tax template 2020-11-08 17:47:32 +05:30
Saqib Ansari
c82c955bc2 fix: qrcode image size 2020-11-08 13:03:00 +05:30
Saqib Ansari
dc4b0921f6 feat: update timeline on einvoice actions 2020-11-07 21:15:19 +05:30
Saqib Ansari
72ed0fbbb4 fix: ewaybill could be modified after ewaybill generation 2020-11-07 21:00:38 +05:30
Saqib Ansari
020e6e980a fix: error handling 2020-11-07 19:44:37 +05:30
Saqib Ansari
70e0711893 fix: imports 2020-11-07 19:43:47 +05:30
Saqib Ansari
8693ac81a2 fix: import format_date 2020-11-07 17:53:22 +05:30
Saqib Ansari
56116f28af Merge branch 'version-12-hotfix' into e-invoicing-version-12 2020-11-07 17:49:44 +05:30
Saqib Ansari
eeb99d1b98 chore: remove fetch token from e invocie settings 2020-11-07 17:47:34 +05:30
Saqib Ansari
5d23c0ce8e feat: cess non advolem on einvoice item 2020-11-07 17:47:28 +05:30
rohitwaghchaure
fb6534cb65 Merge pull request #23816 from rohitwaghchaure/default-cost-center-set-in-item-not-showing
fix: default cost center in item master not set in stock entry
2020-11-06 17:46:11 +05:30
Marica
9876fa8360 Merge branch 'version-12-hotfix' into delievered-received-items-to-bill-report-fix 2020-11-06 12:23:18 +05:30
rohitwaghchaure
20bd91f0d9 Merge pull request #23830 from rohitwaghchaure/incorrect-assign-to-in-asset-maintenance
fix: incorrect assign to in Maintenance Schedule
2020-11-05 18:43:39 +05:30
Rohit Waghchaure
06b6027674 fix: not able to select assign to 2020-11-05 15:35:48 +05:30
Saqib Ansari
91580258d7 fix: patch 2020-11-05 13:56:04 +05:30
Saqib Ansari
51ddf376da fix: invalid syntax 2020-11-05 13:51:11 +05:30
Saqib Ansari
db4fec0314 fix: invalid syntax 2020-11-05 13:48:12 +05:30
Saqib Ansari
6d63a1e90a chore: remove test pincode 2020-11-05 13:18:26 +05:30
Saqib Ansari
589a49a38a feat: header & footer in GST E Invoice 2020-11-05 13:18:25 +05:30
Saqib Ansari
464fc1f087 chore: error logging 2020-11-05 13:18:25 +05:30
Saqib Ansari
e3c2f0a221 chore: remove unwanted imports 2020-11-05 13:18:25 +05:30
Saqib Ansari
77b8ced4a4 feat: generate eway bill from IRN 2020-11-05 13:18:24 +05:30
Saqib Ansari
fb9dde38f6 fix: valiations 2020-11-05 13:18:24 +05:30
Saqib Ansari
ca944316b4 fix: show/hide eway bill fields 2020-11-05 13:18:20 +05:30
Saqib Ansari
6d5a8aea9a fix: generate & cancel IRN 2020-11-05 13:17:59 +05:30
Saqib Ansari
eb9f216b40 fix: attach qrcode on irn generation 2020-11-05 13:17:59 +05:30
Saqib Ansari
63bfa30bc1 chore: clean up einvoice actions 2020-11-05 13:17:59 +05:30
Saqib Ansari
778141c569 chore: remove unwanted fuctions 2020-11-05 13:17:58 +05:30
Saqib Ansari
b7ee2a44a0 feat: cancel eway bill 2020-11-05 13:17:58 +05:30
Saqib Ansari
3f9390c077 feat: generate & cancel IRN 2020-11-05 13:17:58 +05:30
Saqib Ansari
495ac7ba6b feat: fetch and cache GSTIN details 2020-11-05 13:17:57 +05:30
Saqib Ansari
ad19268b4c fix: qr code generation 2020-11-05 13:17:57 +05:30
Saqib Ansari
54405a4b64 chore: remove unwanted fields 2020-11-05 13:17:57 +05:30
Saqib Ansari
86f87e9b53 feat: initialize GSP connector 2020-11-05 13:17:57 +05:30
Saqib Ansari
049836dff8 fix: qr code image string 2020-11-05 13:17:56 +05:30
Saqib Ansari
c313f05a8e chore: improve document name validation message 2020-11-05 13:17:56 +05:30
Saqib Ansari
b77375c72b fix: other charges calculation 2020-11-05 13:17:56 +05:30
Saqib Ansari
6c064a1f95 fix: invoice totals calculation 2020-11-05 13:17:55 +05:30
Saqib Ansari
9182c2e09d fix: patch 2020-11-05 13:17:55 +05:30
Saqib Ansari
271f35fef5 fix: einvoice field validation 2020-11-05 13:17:55 +05:30
Saqib Ansari
37e4c91ec2 fix: rename e_invoice_utils.py 2020-11-05 13:17:54 +05:30
Saqib Ansari
12d9bc3787 fix: add missing package 2020-11-05 13:17:54 +05:30
Saqib Ansari
5eb430fe51 fix: e_invoice module not found 2020-11-05 13:17:54 +05:30
Saqib Ansari
31ee8b4011 fix: error logging 2020-11-05 13:17:53 +05:30
Saqib Ansari
9363725342 fix: validations 2020-11-05 13:17:53 +05:30
Saqib Ansari
e1e3dbcae2 fix: credit note einvoice 2020-11-05 13:17:53 +05:30
Saqib Ansari
8616684c24 fix: return date 2020-11-05 13:17:52 +05:30
Saqib Ansari
90a57c1f8c fix: validate document name 2020-11-05 13:17:52 +05:30
Saqib Ansari
ba1cd74189 feat: add patch 2020-11-05 13:17:46 +05:30
Saqib Ansari
c3719b46b2 fix: add permissions on regional setup 2020-11-05 13:17:14 +05:30
Saqib Ansari
e50804fb9d fix: validations 2020-11-05 13:17:14 +05:30
Saqib Ansari
cc704044bd fix: print format 2020-11-05 13:17:14 +05:30
Saqib Ansari
e6646efef3 fix: download & upload e-invoice 2020-11-05 13:17:13 +05:30
Saqib Ansari
57dd4689e0 chore: clean up e invoice actions 2020-11-05 13:17:13 +05:30
Saqib Ansari
08b4736ee0 chore: code cleanup 2020-11-05 13:17:13 +05:30
Saqib Ansari
662a0fcfe9 fix: invalid syntax 2020-11-05 13:17:12 +05:30
Saqib Ansari
d6f3be0fc1 fix: bug 2020-11-05 13:17:12 +05:30
Saqib Ansari
154c433a86 feat: QRCode Image and E-Invoice Print Format 2020-11-05 13:17:12 +05:30
Saqib Ansari
d3a6b9ed81 chore: move einvoicing stuff to seperate folder 2020-11-05 13:17:12 +05:30
Saqib Ansari
9c00b22703 fix: fetch token if not valid 2020-11-05 13:17:11 +05:30
Saqib Ansari
b3e0f482ac chore: save signed invoice and qrcode after uplaoding irn 2020-11-05 13:17:11 +05:30
Saqib Ansari
61824d3735 fix: fn name 2020-11-05 13:17:11 +05:30
Saqib Ansari
ada41295bb chore: group e-invoicing actions 2020-11-05 13:17:11 +05:30
Saqib Ansari
08e89b88f4 feat: manual download / upload json 2020-11-05 13:17:10 +05:30
Saqib Ansari
cc43805f25 feat: cancel e-way bill before cancelling IRN 2020-11-05 13:17:10 +05:30
Saqib Ansari
ec28262988 chore: no copy on e invoice custom fields 2020-11-05 13:17:10 +05:30
Saqib Ansari
22754a9c58 fix: save e-way bill no on irn generation 2020-11-05 13:17:10 +05:30
Saqib Ansari
6a9af076e5 feat: e-way bill details in e-invoice 2020-11-05 13:17:10 +05:30
Saqib Ansari
816235e99c chore: show irn field for proper gst_category 2020-11-05 13:17:09 +05:30
Saqib Ansari
dfbdd0b2ee fix: update irn_cancelled after cancelling irn 2020-11-05 13:17:09 +05:30
Saqib Ansari
59a757b3e3 fix: do not show generate irn for invalid supply type 2020-11-05 13:17:09 +05:30
Saqib Ansari
389610fb45 fix: validation if e invoicing is disabled 2020-11-05 13:17:09 +05:30
Saqib Ansari
175b26e6e8 fix: cannot find attached key file 2020-11-05 13:17:08 +05:30
Saqib Ansari
cea1a15dcd fix: public key is required on validate 2020-11-05 13:17:08 +05:30
Saqib Ansari
7a40ad340f fix: hide cancel irn dialog on error 2020-11-05 13:17:08 +05:30
Saqib Ansari
db13eb56c4 chore: show irn cancelled check after cancellation 2020-11-05 13:17:08 +05:30
Saqib Ansari
cf2ebc0d6f fix: item discount 2020-11-05 13:17:07 +05:30
Saqib Ansari
9003718481 chore: minor fixes 2020-11-05 13:17:07 +05:30
Saqib Ansari
18666b6a74 feat: Generate & Cancel IRN from Sales Invoice 2020-11-05 13:17:07 +05:30
Saqib Ansari
395ecf2392 feat: make IRN field on regional setup 2020-11-05 13:17:07 +05:30
Saqib Ansari
221e5993a8 chore: rename schema to template & js cleanup 2020-11-05 13:17:06 +05:30
Saqib Ansari
8eda5aca09 chore: split einvoice settings and operations 2020-11-05 13:17:06 +05:30
Saqib Ansari
bdfd30760a chore: move e-invoice settings to regional 2020-11-05 13:17:06 +05:30
Saqib Ansari
418818f0ec feat: complete e-invoice schema 2020-11-05 13:17:05 +05:30
Saqib Ansari
d971917ecf feat: cancel IRN 2020-11-05 13:17:05 +05:30
Saqib Ansari
dda44bb1f5 chore: validations 2020-11-05 13:17:05 +05:30
Saqib Ansari
448ab6e3df feat: decode signed json and QR code 2020-11-05 13:17:04 +05:30
Saqib Ansari
cc3e0bf806 feat: generate IRN 2020-11-05 13:17:04 +05:30
Saqib Ansari
93b3c2ce06 feat: make e invoice from erpnext sales invoice 2020-11-05 13:17:04 +05:30
Saqib Ansari
7c427aa890 feat: decrypt json data with SEK 2020-11-05 13:17:03 +05:30
Saqib Ansari
b6509ead64 feat: AES decryption of SEK with appkey 2020-11-05 13:17:03 +05:30
Saqib Ansari
f8346ce62f chore: handle error response 2020-11-05 13:17:03 +05:30
Saqib Ansari
e73a9deb42 feat: save token and sek from auth request 2020-11-05 13:17:02 +05:30
Saqib Ansari
5669a5f618 feat: rsa encryption with public key 2020-11-05 13:17:02 +05:30
Saqib Ansari
18afbc0617 feat: read public key file 2020-11-05 13:17:02 +05:30
Saqib Ansari
f396b35622 feat: init e-invoice settings 2020-11-05 13:17:02 +05:30
Marica
3960c49fc6 Merge branch 'version-12-hotfix' into delievered-received-items-to-bill-report-fix 2020-11-05 12:31:59 +05:30
Afshan
7e6c79819a fix: refactor and test 2020-11-05 11:59:45 +05:30
rohitwaghchaure
533954cd12 Merge pull request #23815 from Anurag810/stock_ledger_report_v12
fix:  list index out of range on incilding uom
2020-11-05 11:49:37 +05:30
Rohit Waghchaure
7ee2b0ed3a fix: default cost center in item master not set in stock entry 2020-11-05 11:47:22 +05:30
Anurag Mishra
8e37316832 fix: list index out of range on incilding uom 2020-11-04 15:27:17 +05:30
Afshan
2860f62772 Fix leave ledger patch (#23806)
* fix: leave ledger patch

* fix: modified patch date
2020-11-04 14:15:26 +05:30
marination
4f008f59fc fix: Received/Delivered Items to Billed Logic 2020-11-03 23:12:53 +05:30
Deepesh Garg
1f10da4d66 Merge pull request #23786 from deepeshgarg007/pos_v12_hotfix
fix: Place of Supply fix in Sales Invoices
2020-11-02 11:23:47 +05:30
Deepesh Garg
7036635007 fix: fieldname 2020-10-30 22:15:23 +05:30
Deepesh Garg
c1719ef54b fix: Place of Supply fix in Sales Invoices 2020-10-30 22:15:23 +05:30
Afshan
c8201eba33 fix: leave ledger entries (#23782) 2020-10-30 18:47:52 +05:30
rohitwaghchaure
b2bd8ef144 Merge pull request #23773 from rohitwaghchaure/fixed-set-po-details-in-subcontract-stock-entry
fix: po_detail field has no value for subcontracted stock entry
2020-10-30 14:19:55 +05:30
Rohit Waghchaure
e523cfbb02 fix: po_detail field has no value for subcontracted stock entry 2020-10-30 03:04:39 +05:30
Marica
d8705240a0 chore: (Production Plan) Simplify and fix translation in message popup (#23754) 2020-10-29 18:54:06 +05:30
Deepesh Garg
ab1415c0cc Merge pull request #23762 from rohitwaghchaure/fixed-subscription-test-case
fix: subscription test case
2020-10-29 17:04:12 +05:30
Rohit Waghchaure
2f12eed44d fix: subscription test case 2020-10-29 15:52:33 +05:30
rohitwaghchaure
c9e93fd9b1 Merge pull request #23740 from prssanna/job-card-gantt
fix: override field_map for job card gantt
2020-10-29 14:50:19 +05:30
Rucha Mahabal
82db751a52 fix: LMS sign-up link (#23752) 2020-10-29 11:19:34 +05:30
Marica
2d936fe5ca Merge pull request #23748 from marination/leave-type-filter
fix(HR) : Filter Leave Type based on allocation for a particular employee (#22050)
2020-10-28 17:23:45 +05:30
Abhishek Balam
d0541d77b3 Merge branch 'version-12-hotfix' into leave-type-filter 2020-10-28 16:29:06 +05:30
Anurag Mishra
5f148d3d3a fix: set_query in leave application (#22197) 2020-10-28 16:25:57 +05:30
Abhishek Balam
6c894f8f41 fix(HR) : Filter Leave Type based on allocation for a particular employee (#22050)
* table was showing empty with just headers when no leaves allocated, fixed template code

* added filters on Leave Type based on leave allocation for a particular employee and to/from dates
2020-10-28 16:12:57 +05:30
Marica
5effbeef49 Merge pull request #23733 from AfshanKhan/prod-order-reference-in-item-v12
fix: Remove Production Order reference from Item Validation
2020-10-28 16:09:52 +05:30
prssanna
1fa8dcb15b fix: override field_map for job card gantt 2020-10-28 11:02:02 +05:30
Saqib
acd5929ac3 feat: e invoicing
* feat: e-invoice

* fix: validations

* fix: add permissions on regional setup

* feat: add patch

* fix: validate document name

* fix: return date

* fix: credit note einvoice

* fix: validations

* chore: remove extras

* fix: error logging

* fix: e_invoice module not found

* fix: add missing package

* fix: travis
2020-10-27 20:37:20 +05:30
Afshan
0c511b31fd fix: Remove Production Order reference from Item Validation 2020-10-26 20:34:48 +05:30
Afshan
17a8874c50 fix: copying po no when mapping doc 2020-10-26 17:07:40 +05:30
Nabin Hait
439c4e11bf fix: Show accounts in financial statements upto level 20 (#23719) 2020-10-24 22:00:17 +05:30
Aditya Duggal
a76b1c530d fix: None type error if the Pricing Rule applicable_for is None (#23664)
* fix: None type error if the Pricing Rule applicable_for is None
* fix: sider

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2020-10-24 11:20:24 +05:30
rohitwaghchaure
aef8010bc1 Merge pull request #23712 from marination/cashier-closing-type-issue-fix
fix: Cashier Closing, Type Issue
2020-10-23 16:12:41 +05:30
marination
e9b7b69435 fix: Cashier Closing Type Issue 2020-10-23 14:46:44 +05:30
Saqib
eb6fb6fffa fix: cannot auto unlink payments for credit/debit notes (#23690) 2020-10-22 16:31:55 +05:30
Marica
ab5d596959 fix: Add Taxes if missing via Update Items (#23705)
* fix: Add Taxes if missing via Update Items

* chore: PO Test for adding tax row via Update Items

* chore: SO Test for adding tax row via Update Items
2020-10-22 16:28:41 +05:30
Afshan
203fc2b940 fix: removed extra space from label "Rate" (#23685) 2020-10-20 10:56:38 +05:30
Saqib
8e7a755aeb feat: show only available items in point of sale (#23667)
* feat: show available items in pos

* feat: show selected pos profile on pos screen

* fix: codacy

* fix: codacy
2020-10-19 11:37:22 +05:30
Sun Howwrongbum
334c282f7b fix: consider rounded_total in returns (#23631)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-10-19 11:30:48 +05:30
Saqib
3ae9bbc0a7 fix: fuel expense amount of vehicle log (#23634)
* fix: fuel expense amount of vehicle log

* fix: undefined var employee_id in test

* fix: test
2020-10-16 11:54:36 +05:30
rohitwaghchaure
8b8457c5d3 Merge pull request #23647 from rohitwaghchaure/fixed-overproduction-against-work-order
fix: overproduction, not allowed to transfer extra materials
2020-10-16 10:31:58 +05:30
rohitwaghchaure
eabe1af280 Merge pull request #23651 from rohitwaghchaure/donot-set-serial-nos-if-manually-set
fix: manually set serial nos override with current available serial nos
2020-10-15 22:01:32 +05:30
rohitwaghchaure
7bbdbaa2fa Merge pull request #23655 from rohitwaghchaure/removed-repetative-code
fix: remove repetative code
2020-10-15 21:57:33 +05:30
Rohit Waghchaure
28a5169646 fix: remove repetative code 2020-10-15 21:54:53 +05:30
Rohit Waghchaure
c7ec475429 fix: manually set serial nos override with current available serial nos 2020-10-15 19:00:02 +05:30
Rohit Waghchaure
433faa705e fix: overproduction, not allowed to transfer extra materials 2020-10-15 18:53:50 +05:30
rohitwaghchaure
2b4da0d518 Merge pull request #23646 from rohitwaghchaure/set-current-serial-no-in-serial-no-field
fix: serial no field is blank in stock reconciliation
2020-10-15 15:45:37 +05:30
Rohit Waghchaure
8d7e26c7dd fix: serial no field is blank in stock reconciliation 2020-10-15 14:29:57 +05:30
rohitwaghchaure
6ff846f9b0 Merge pull request #23645 from rohitwaghchaure/receive-at-warehouse-not-validate-for-extra-transfer-qty
fix: extra material received against send to warehouse entry
2020-10-15 13:59:45 +05:30
Rohit Waghchaure
f956a2cf72 fix: extra material received against send to warehouse entry 2020-10-15 12:59:10 +05:30
rohitwaghchaure
1fb3a29cf9 Merge pull request #23637 from anupamvs/item-group-filter-portal-v12
fix: added filter show in website for filtering product
2020-10-14 16:28:39 +05:30
Afshan
4b8d4a1cbe fix: setting user precision instead of 2 (#23630)
* fix: setting user precision instead of default

* fix: removing unused imports
2020-10-14 15:50:26 +05:30
Anupam
90eb489392 fix: added filter show in website for filtering product 2020-10-14 15:26:34 +05:30
318 changed files with 11933 additions and 3557 deletions

32
.flake8 Normal file
View File

@@ -0,0 +1,32 @@
[flake8]
ignore =
E121,
E126,
E127,
E128,
E203,
E225,
E226,
E231,
E241,
E251,
E261,
E265,
E302,
E303,
E305,
E402,
E501,
E741,
W291,
W292,
W293,
W391,
W503,
W504,
F403,
B007,
B950,
W191,
max-line-length = 200

26
.github/workflows/backport.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout Actions
uses: actions/checkout@v2
with:
repository: "frappe/backport"
path: ./actions
ref: develop
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run backport
uses: ./actions/backport
with:
token: ${{secrets.BACKPORT_BOT_TOKEN}}
labelsToAdd: "backport"
title: "{{originalTitle}}"

View File

@@ -40,8 +40,7 @@ install:
- cd ~
- nvm install 10
- git clone https://github.com/frappe/bench --depth 1
- pip install -e ./bench
- pip install -U frappe-bench --only-binary='all'
- git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
- bench init --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench

0
FETCH_HEAD Normal file
View File

View File

@@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '12.13.0'
__version__ = '12.29.0'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -6,8 +6,8 @@ import frappe, json
from frappe import _
from frappe.utils import add_to_date, date_diff, getdate, nowdate, get_last_day, formatdate, get_link_to_form
from erpnext.accounts.report.general_ledger.general_ledger import execute
from frappe.core.page.dashboard.dashboard import cache_source, get_from_date_from_timespan
from frappe.desk.doctype.dashboard_chart.dashboard_chart import get_period_ending
from frappe.core.page.dashboard.dashboard import cache_source
from frappe.utils.dateutils import get_from_date_from_timespan, get_period_ending
from frappe.utils.nestedset import get_descendants_of

View File

@@ -910,75 +910,8 @@
},
"is_group": 1
},
"Passiva": {
"Passiva - Verbindlichkeiten": {
"root_type": "Liability",
"A - Eigenkapital": {
"account_type": "Equity",
"is_group": 1,
"I - Gezeichnetes Kapital": {
"account_type": "Equity",
"is_group": 1
},
"II - Kapitalr\u00fccklage": {
"account_type": "Equity",
"is_group": 1
},
"III - Gewinnr\u00fccklagen": {
"account_type": "Equity",
"1 - gesetzliche R\u00fccklage": {
"account_type": "Equity",
"is_group": 1
},
"2 - R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": {
"account_type": "Equity",
"is_group": 1
},
"3 - satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_type": "Equity",
"is_group": 1
},
"4 - andere Gewinnr\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Gewinnr\u00fccklagen aus den \u00dcbergangsvorschriften BilMoG": {
"is_group": 1,
"Gewinnr\u00fccklagen (BilMoG)": {
"account_number": "2963"
},
"Gewinnr\u00fccklagen aus Zuschreibung Sachanlageverm\u00f6gen (BilMoG)": {
"account_number": "2964"
},
"Gewinnr\u00fccklagen aus Zuschreibung Finanzanlageverm\u00f6gen (BilMoG)": {
"account_number": "2965"
},
"Gewinnr\u00fccklagen aus Aufl\u00f6sung der Sonderposten mit R\u00fccklageanteil (BilMoG)": {
"account_number": "2966"
}
},
"Latente Steuern (Gewinnr\u00fccklage Haben) aus erfolgsneutralen Verrechnungen": {
"account_number": "2967"
},
"Latente Steuern (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2968"
},
"Rechnungsabgrenzungsposten (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2969"
}
},
"is_group": 1
},
"IV - Gewinnvortrag/Verlustvortrag": {
"account_type": "Equity",
"is_group": 1
},
"V - Jahres\u00fcberschu\u00df/Jahresfehlbetrag": {
"account_type": "Equity",
"is_group": 1
},
"Einlagen stiller Gesellschafter": {
"account_number": "9295"
}
},
"B - R\u00fcckstellungen": {
"is_group": 1,
"1 - R\u00fcckstellungen f. Pensionen und \u00e4hnliche Verplicht.": {
@@ -1595,6 +1528,143 @@
},
"is_group": 1
},
"Passiva - Eigenkapital": {
"root_type": "Equity",
"A - Eigenkapital": {
"account_type": "Equity",
"is_group": 1,
"I - Gezeichnetes Kapital": {
"account_type": "Equity",
"is_group": 1,
"Gezeichnetes Kapital": {
"account_number": "2900",
"account_type": "Equity"
},
"Gesch\u00e4ftsguthaben der verbleibenden Mitglieder": {
"account_number": "2901"
},
"Gesch\u00e4ftsguthaben der ausscheidenden Mitglieder": {
"account_number": "2902"
},
"Gesch\u00e4ftsguthaben aus gek\u00fcndigten Gesch\u00e4ftsanteilen": {
"account_number": "2903"
},
"R\u00fcckst\u00e4ndige f\u00e4llige Einzahlungen auf Gesch\u00e4ftsanteile, vermerkt": {
"account_number": "2906"
},
"Gegenkonto R\u00fcckst\u00e4ndige f\u00e4llige Einzahlungen auf Gesch\u00e4ftsanteile, vermerkt": {
"account_number": "2907"
},
"Kapitalerh\u00f6hung aus Gesellschaftsmitteln": {
"account_number": "2908"
},
"Ausstehende Einlagen auf das gezeichnete Kapital, nicht eingefordert": {
"account_number": "2910"
}
},
"II - Kapitalr\u00fccklage": {
"account_type": "Equity",
"is_group": 1,
"Kapitalr\u00fccklage": {
"account_number": "2920"
},
"Kapitalr\u00fccklage durch Ausgabe von Anteilen \u00fcber Nennbetrag": {
"account_number": "2925"
},
"Kapitalr\u00fccklage durch Ausgabe von Schuldverschreibungen": {
"account_number": "2926"
},
"Kapitalr\u00fccklage durch Zuzahlungen gegen Gew\u00e4hrung eines Vorzugs": {
"account_number": "2927"
},
"Kapitalr\u00fccklage durch Zuzahlungen in das Eigenkapital": {
"account_number": "2928"
},
"Nachschusskapital (Gegenkonto 1299)": {
"account_number": "2929"
}
},
"III - Gewinnr\u00fccklagen": {
"account_type": "Equity",
"1 - gesetzliche R\u00fccklage": {
"account_type": "Equity",
"is_group": 1,
"Gesetzliche R\u00fccklage": {
"account_number": "2930"
}
},
"2 - R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": {
"account_type": "Equity",
"is_group": 1,
"R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": {
"account_number": "2935"
}
},
"3 - satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_number": "2950"
}
},
"4 - andere Gewinnr\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Andere Gewinnr\u00fccklagen": {
"account_number": "2960"
},
"Andere Gewinnr\u00fccklagen aus dem Erwerb eigener Anteile": {
"account_number": "2961"
},
"Eigenkapitalanteil von Wertaufholungen": {
"account_number": "2962"
},
"Gewinnr\u00fccklagen aus den \u00dcbergangsvorschriften BilMoG": {
"is_group": 1,
"Gewinnr\u00fccklagen (BilMoG)": {
"account_number": "2963"
},
"Gewinnr\u00fccklagen aus Zuschreibung Sachanlageverm\u00f6gen (BilMoG)": {
"account_number": "2964"
},
"Gewinnr\u00fccklagen aus Zuschreibung Finanzanlageverm\u00f6gen (BilMoG)": {
"account_number": "2965"
},
"Gewinnr\u00fccklagen aus Aufl\u00f6sung der Sonderposten mit R\u00fccklageanteil (BilMoG)": {
"account_number": "2966"
}
},
"Latente Steuern (Gewinnr\u00fccklage Haben) aus erfolgsneutralen Verrechnungen": {
"account_number": "2967"
},
"Latente Steuern (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2968"
},
"Rechnungsabgrenzungsposten (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2969"
}
},
"is_group": 1
},
"IV - Gewinnvortrag/Verlustvortrag": {
"account_type": "Equity",
"is_group": 1,
"Gewinnvortrag vor Verwendung": {
"account_number": "2970"
},
"Verlustvortrag vor Verwendung": {
"account_number": "2978"
}
},
"V - Jahres\u00fcberschu\u00df/Jahresfehlbetrag": {
"account_type": "Equity",
"is_group": 1
},
"Einlagen stiller Gesellschafter": {
"account_number": "9295"
}
}
},
"1 - Umsatzerl\u00f6se": {
"root_type": "Income",
"is_group": 1,

View File

@@ -72,16 +72,14 @@
"138-Autres subventions d'investissement (m\u00eame ventilation que celle du compte 131)": {},
"139-Subventions d'investissement inscrites au compte de r\u00e9sultat": {
"1391-Subventions d'\u00e9quipement": {
"13911-Subventions d'\u00e9quipement": {
"13911-Etat": {},
"13912-R\u00e9gions": {},
"13913-D\u00e9partements": {},
"13914-Communes": {},
"13915-Collectivit\u00e9s publiques": {},
"13916-Entreprises publiques": {},
"13917-Entreprises et organismes priv\u00e9s": {},
"13918-Autres": {}
}
"13911-Etat": {},
"13912-R\u00e9gions": {},
"13913-D\u00e9partements": {},
"13914-Communes": {},
"13915-Collectivit\u00e9s publiques": {},
"13916-Entreprises publiques": {},
"13917-Entreprises et organismes priv\u00e9s": {},
"13918-Autres": {}
},
"1398-Autres subventions d'investissement (m\u00eame ventilation que celle du compte 1391)": {}
}
@@ -536,8 +534,8 @@
"3312-Produits en cours P2": {}
},
"335-Travaux en cours": {
"Travaux en cours T1": {},
"Travaux en cours T2": {}
"3351-Travaux en cours T1": {},
"3352-Travaux en cours T2": {}
}
},
"34-En-cours de production de services": {
@@ -595,7 +593,9 @@
"371-Marchandises (ou groupe) A": {},
"372-Marchandises (ou groupe) B": {}
},
"38-Stocks en voie d'acheminement, mis en d\u00e9p\u00f4t ou donn\u00e9s en consignation (en cas d'inventaire permanent en comptabilit\u00e9 g\u00e9n\u00e9rale)": {},
"38-Stocks en voie d'acheminement, mis en d\u00e9p\u00f4t ou donn\u00e9s en consignation (en cas d'inventaire permanent en comptabilit\u00e9 g\u00e9n\u00e9rale)": {
"account_type": "Stock"
},
"39-D\u00e9pr\u00e9ciations des stocks et en-cours": {
"391-D\u00e9pr\u00e9ciations des mati\u00e8res premi\u00e8res (et fournitures)": {
"3911-Mati\u00e8res (ou groupe) A": {},

View File

@@ -245,6 +245,9 @@ def get():
"account_number": "2200"
},
_("Duties and Taxes"): {
_("TDS Payable"): {
"account_number": "2310"
},
"account_type": "Tax",
"is_group": 1,
"account_number": "2300"

View File

@@ -41,6 +41,8 @@ frappe.ui.form.on('Accounting Dimension', {
});
});
}
frm.toggle_enable('document_type', frm.doc.__islocal);
},
document_type: function(frm) {

View File

@@ -29,6 +29,16 @@ class AccountingDimension(Document):
if exists and self.is_new():
frappe.throw("Document Type already used as a dimension")
if not self.is_new():
self.validate_document_type_change()
def validate_document_type_change(self):
doctype_before_save = frappe.db.get_value("Accounting Dimension", self.name, "document_type")
if doctype_before_save != self.document_type:
message = _("Cannot change Reference Document Type.")
message += _("Please create a new Accounting Dimension if required.")
frappe.throw(message)
def after_insert(self):
if frappe.flags.in_test:
make_dimension_in_accounting_doctypes(doc=self)

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide('erpnext.integrations');
frappe.ui.form.on('Bank', {
onload: function(frm) {
@@ -7,6 +8,12 @@ frappe.ui.form.on('Bank', {
},
refresh: function(frm) {
add_fields_to_mapping_table(frm);
if (frm.doc.plaid_access_token) {
frm.add_custom_button(__('Refresh Plaid Link'), () => {
new erpnext.integrations.refreshPlaidLink(frm.doc.plaid_access_token);
});
}
}
});
@@ -27,4 +34,79 @@ let add_fields_to_mapping_table = function (frm) {
frm.doc.name).options = options;
frm.fields_dict.bank_transaction_mapping.grid.refresh();
};
erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
constructor(access_token) {
this.access_token = access_token;
this.plaidUrl = 'https://cdn.plaid.com/link/v2/stable/link-initialize.js';
this.init_config();
}
async init_config() {
this.plaid_env = await frappe.db.get_single_value('Plaid Settings', 'plaid_env');
this.token = await this.get_link_token_for_update();
this.init_plaid();
}
async get_link_token_for_update() {
const token = frappe.xcall(
'erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.get_link_token_for_update',
{ access_token: this.access_token }
)
if (!token) {
frappe.throw(__('Cannot retrieve link token for update. Check Error Log for more information'));
}
return token;
}
init_plaid() {
const me = this;
me.loadScript(me.plaidUrl)
.then(() => {
me.onScriptLoaded(me);
})
.then(() => {
if (me.linkHandler) {
me.linkHandler.open();
}
})
.catch((error) => {
me.onScriptError(error);
});
}
loadScript(src) {
return new Promise(function (resolve, reject) {
if (document.querySelector("script[src='" + src + "']")) {
resolve();
return;
}
const el = document.createElement('script');
el.type = 'text/javascript';
el.async = true;
el.src = src;
el.addEventListener('load', resolve);
el.addEventListener('error', reject);
el.addEventListener('abort', reject);
document.head.appendChild(el);
});
}
onScriptLoaded(me) {
me.linkHandler = Plaid.create({
env: me.plaid_env,
token: me.token,
onSuccess: me.plaid_success
});
}
onScriptError(error) {
frappe.msgprint(__("There was an issue connecting to Plaid's authentication server. Check browser console for more information"));
console.log(error);
}
plaid_success(token, response) {
frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' });
}
};

View File

@@ -21,6 +21,14 @@ frappe.ui.form.on("Bank Reconciliation", {
};
});
frm.set_query("bank_account", function() {
return {
"filters": {
"is_company_account": 1
}
};
});
frm.set_value("from_date", frappe.datetime.month_start());
frm.set_value("to_date", frappe.datetime.month_end());
},

View File

@@ -271,6 +271,7 @@
"label": "Debit",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -304,6 +305,7 @@
"label": "Credit",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -632,6 +634,7 @@
"label": "Allocated Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -731,6 +734,7 @@
"label": "Unallocated Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -755,7 +759,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-05-11 05:27:55.244721",
"modified": "2021-11-26 12:44:55.244721",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",

View File

@@ -9,11 +9,13 @@ from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sal
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.page.bank_reconciliation.bank_reconciliation import reconcile, get_linked_payments
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
test_dependencies = ["Item", "Cost Center"]
class TestBankTransaction(unittest.TestCase):
def setUp(self):
make_pos_profile()
add_transactions()
add_payments()
@@ -27,6 +29,9 @@ class TestBankTransaction(unittest.TestCase):
frappe.db.sql("""delete from `tabPayment Entry Reference`""")
frappe.db.sql("""delete from `tabPayment Entry`""")
# Delete POS Profile
frappe.db.sql("delete from `tabPOS Profile`")
frappe.flags.test_bank_transactions_created = False
frappe.flags.test_payments_created = False

View File

@@ -7,19 +7,19 @@ DEFAULT_MAPPERS = [
'section_header': 'Cash flows from operating activities',
'section_leader': 'Adjustments for',
'section_name': 'Operating Activities',
'position': 0,
'position': 1,
'section_subtotal': 'Cash generated from operations',
},
{
'doctype': 'Cash Flow Mapper',
'position': 1,
'position': 2,
'section_footer': 'Net cash used in investing activities',
'section_header': 'Cash flows from investing activities',
'section_name': 'Investing Activities'
},
{
'doctype': 'Cash Flow Mapper',
'position': 2,
'position': 3,
'section_footer': 'Net cash used in financing activites',
'section_header': 'Cash flows from financing activities',
'section_name': 'Financing Activities',

View File

@@ -23,13 +23,13 @@ class CashierClosing(Document):
where posting_date=%s and posting_time>=%s and posting_time<=%s and owner=%s
""", (self.date, self.from_time, self.time, self.user))
self.outstanding_amount = flt(values[0][0] if values else 0)
def make_calculations(self):
total = 0.00
for i in self.payments:
total += flt(i.amount)
self.net_amount = total + self.outstanding_amount + self.expense - self.custody + self.returns
self.net_amount = total + self.outstanding_amount + flt(self.expense) - flt(self.custody) + flt(self.returns)
def validate_time(self):
if self.from_time >= self.time:

View File

@@ -81,10 +81,11 @@ class ExchangeRateRevaluation(Document):
sum(debit) - sum(credit) as balance
from `tabGL Entry`
where account in (%s)
group by account, party_type, party
and posting_date <= %s
group by account, NULLIF(party_type,''), NULLIF(party,'')
having sum(debit) != sum(credit)
order by account
""" % ', '.join(['%s']*len(accounts)), tuple(accounts), as_dict=1)
""" % (', '.join(['%s']*len(accounts)), '%s'), tuple(accounts + [self.posting_date]), as_dict=1)
return account_details
@@ -124,9 +125,9 @@ class ExchangeRateRevaluation(Document):
"party_type": d.get("party_type"),
"party": d.get("party"),
"account_currency": d.get("account_currency"),
"balance": d.get("balance_in_account_currency"),
dr_or_cr: abs(d.get("balance_in_account_currency")),
"exchange_rate":d.get("new_exchange_rate"),
"balance": flt(d.get("balance_in_account_currency"), d.precision("balance_in_account_currency")),
dr_or_cr: flt(abs(d.get("balance_in_account_currency")), d.precision("balance_in_account_currency")),
"exchange_rate": flt(d.get("new_exchange_rate"), d.precision("new_exchange_rate")),
"reference_type": "Exchange Rate Revaluation",
"reference_name": self.name,
})
@@ -135,9 +136,9 @@ class ExchangeRateRevaluation(Document):
"party_type": d.get("party_type"),
"party": d.get("party"),
"account_currency": d.get("account_currency"),
"balance": d.get("balance_in_account_currency"),
reverse_dr_or_cr: abs(d.get("balance_in_account_currency")),
"exchange_rate": d.get("current_exchange_rate"),
"balance": flt(d.get("balance_in_account_currency"), d.precision("balance_in_account_currency")),
reverse_dr_or_cr: flt(abs(d.get("balance_in_account_currency")), d.precision("balance_in_account_currency")),
"exchange_rate": flt(d.get("current_exchange_rate"), d.precision("current_exchange_rate")),
"reference_type": "Exchange Rate Revaluation",
"reference_name": self.name
})
@@ -166,9 +167,9 @@ def get_account_details(account, company, posting_date, party_type=None, party=N
account_details = {}
company_currency = erpnext.get_company_currency(company)
balance = get_balance_on(account, party_type=party_type, party=party, in_account_currency=False)
balance = get_balance_on(account, date=posting_date, party_type=party_type, party=party, in_account_currency=False)
if balance:
balance_in_account_currency = get_balance_on(account, party_type=party_type, party=party)
balance_in_account_currency = get_balance_on(account, date=posting_date, party_type=party_type, party=party)
current_exchange_rate = balance / balance_in_account_currency if balance_in_account_currency else 0
new_exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)
new_balance_in_base_currency = balance_in_account_currency * new_exchange_rate

View File

@@ -3,11 +3,13 @@
from __future__ import unicode_literals
import frappe, unittest
import unittest
import frappe
from frappe.utils import now_datetime
from erpnext.accounts.doctype.fiscal_year.fiscal_year import FiscalYearIncorrectDate
test_records = frappe.get_test_records('Fiscal Year')
test_ignore = ["Company"]
class TestFiscalYear(unittest.TestCase):
@@ -23,3 +25,29 @@ class TestFiscalYear(unittest.TestCase):
})
self.assertRaises(FiscalYearIncorrectDate, fy.insert)
def test_record_generator():
test_records = [
{
"doctype": "Fiscal Year",
"year": "_Test Short Fiscal Year 2011",
"is_short_year": 1,
"year_end_date": "2011-04-01",
"year_start_date": "2011-12-31"
}
]
start = 2012
end = now_datetime().year + 5
for year in range(start, end):
test_records.append({
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year {}".format(year),
"year_start_date": "{}-01-01".format(year),
"year_end_date": "{}-12-31".format(year)
})
return test_records
test_records = test_record_generator()

View File

@@ -1,69 +0,0 @@
[
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2012",
"year_end_date": "2012-12-31",
"year_start_date": "2012-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2013",
"year_end_date": "2013-12-31",
"year_start_date": "2013-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2014",
"year_end_date": "2014-12-31",
"year_start_date": "2014-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2015",
"year_end_date": "2015-12-31",
"year_start_date": "2015-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2016",
"year_end_date": "2016-12-31",
"year_start_date": "2016-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2017",
"year_end_date": "2017-12-31",
"year_start_date": "2017-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2018",
"year_end_date": "2018-12-31",
"year_start_date": "2018-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2019",
"year_end_date": "2019-12-31",
"year_start_date": "2019-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2020",
"year_end_date": "2020-12-31",
"year_start_date": "2020-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Fiscal Year 2021",
"year_end_date": "2021-12-31",
"year_start_date": "2021-01-01"
},
{
"doctype": "Fiscal Year",
"year": "_Test Short Fiscal Year 2021",
"is_short_year": 1,
"year_end_date": "2021-12-31",
"year_start_date": "2021-04-01"
}
]

View File

@@ -97,8 +97,7 @@ class GLEntry(Document):
def check_pl_account(self):
if self.is_opening=='Yes' and \
frappe.db.get_value("Account", self.account, "report_type")=="Profit and Loss" and \
self.voucher_type not in ['Purchase Invoice', 'Sales Invoice']:
frappe.db.get_value("Account", self.account, "report_type")=="Profit and Loss":
frappe.throw(_("{0} {1}: 'Profit and Loss' type account {2} not allowed in Opening Entry")
.format(self.voucher_type, self.voucher_no, self.account))
@@ -138,7 +137,8 @@ class GLEntry(Document):
frappe.throw(_("{0} {1}: Cost Center {2} does not belong to Company {3}")
.format(self.voucher_type, self.voucher_no, self.cost_center, self.company))
if not self.flags.from_repost and self.cost_center and _check_is_group():
if not self.flags.from_repost and not self.voucher_type == 'Period Closing Voucher' \
and self.cost_center and _check_is_group():
frappe.throw(_("""{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot
be used in transactions""").format(self.voucher_type, self.voucher_no, frappe.bold(self.cost_center)))
@@ -293,4 +293,8 @@ def rename_temporarily_named_docs(doctype):
oldname = doc.name
set_name_from_naming_options(frappe.get_meta(doctype).autoname, doc)
newname = doc.name
frappe.db.sql("""UPDATE `tab{}` SET name = %s, to_rename = 0 where name = %s""".format(doctype), (newname, oldname))
frappe.db.sql(
"UPDATE `tab{}` SET name = %s, to_rename = 0 where name = %s".format(doctype),
(newname, oldname),
auto_commit=True
)

View File

@@ -29,7 +29,11 @@ class JournalEntry(AccountsController):
self.validate_entries_for_advance()
self.validate_multi_currency()
self.set_amounts_in_company_currency()
self.validate_total_debit_and_credit()
# Do not validate while importing via data import
if not frappe.flags.in_import:
self.validate_total_debit_and_credit()
self.validate_against_jv()
self.validate_reference_doc()
self.set_against_account()
@@ -207,11 +211,11 @@ class JournalEntry(AccountsController):
if d.reference_type=="Journal Entry":
account_root_type = frappe.db.get_value("Account", d.account, "root_type")
if account_root_type == "Asset" and flt(d.debit) > 0:
frappe.throw(_("For {0}, only credit accounts can be linked against another debit entry")
.format(d.account))
frappe.throw(_("Row #{0}: For {1}, you can select reference document only if account gets credited")
.format(d.idx, d.account))
elif account_root_type == "Liability" and flt(d.credit) > 0:
frappe.throw(_("For {0}, only debit accounts can be linked against another credit entry")
.format(d.account))
frappe.throw(_("Row #{0}: For {1}, you can select reference document only if account gets debited")
.format(d.idx, d.account))
if d.reference_name == self.name:
frappe.throw(_("You can not enter current voucher in 'Against Journal Entry' column"))
@@ -1047,4 +1051,4 @@ def make_reverse_journal_entry(source_name, target_doc=None):
},
}, target_doc)
return doclist
return doclist

View File

@@ -38,7 +38,10 @@ def get_loyalty_details(customer, loyalty_program, expiry_date=None, company=Non
@frappe.whitelist()
def get_loyalty_program_details_with_points(customer, loyalty_program=None, expiry_date=None, company=None, silent=False, include_expired_entry=False, current_transaction_amount=0):
lp_details = get_loyalty_program_details(customer, loyalty_program, company=company, silent=silent)
loyalty_program = frappe.get_doc("Loyalty Program", loyalty_program)
loyalty_program_name = loyalty_program or lp_details.loyalty_program
if not loyalty_program_name: return
loyalty_program = frappe.get_doc("Loyalty Program", loyalty_program_name)
lp_details.update(get_loyalty_details(customer, loyalty_program.name, expiry_date, company, include_expired_entry))
# sort collection rule, first item on list will be lowest min_spent

View File

@@ -181,7 +181,8 @@ class OpeningInvoiceCreationTool(Document):
"due_date": row.due_date,
"posting_date": row.posting_date,
frappe.scrub(party_type): row.party,
"doctype": "Sales Invoice" if self.invoice_type == "Sales" else "Purchase Invoice"
"doctype": "Sales Invoice" if self.invoice_type == "Sales" else "Purchase Invoice",
"update_stock": 0
})
accounting_dimension = get_accounting_dimensions()

View File

@@ -7,17 +7,25 @@ import frappe
import unittest
test_dependencies = ["Customer", "Supplier"]
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
from erpnext.accounts.doctype.opening_invoice_creation_tool.opening_invoice_creation_tool import get_temporary_opening_account
from erpnext.controllers.accounts_controller import AccountMissingError
class TestOpeningInvoiceCreationTool(unittest.TestCase):
def make_invoices(self, invoice_type="Sales"):
def setUp(self):
if not frappe.db.exists("Company", "_Test Opening Invoice Company"):
make_company()
def make_invoices(self, invoice_type="Sales", company=None, party_1=None, party_2=None):
doc = frappe.get_single("Opening Invoice Creation Tool")
args = get_opening_invoice_creation_dict(invoice_type=invoice_type)
args = get_opening_invoice_creation_dict(invoice_type=invoice_type, company=company,
party_1=party_1, party_2=party_2)
doc.update(args)
return doc.make_invoices()
def test_opening_sales_invoice_creation(self):
invoices = self.make_invoices()
property_setter = make_property_setter("Sales Invoice", "update_stock", "default", 1, "Check")
invoices = self.make_invoices(company="_Test Opening Invoice Company")
self.assertEqual(len(invoices), 2)
expected_value = {
@@ -27,6 +35,13 @@ class TestOpeningInvoiceCreationTool(unittest.TestCase):
}
self.check_expected_values(invoices, expected_value)
si = frappe.get_doc("Sales Invoice", invoices[0])
# Check if update stock is not enabled
self.assertEqual(si.update_stock, 0)
property_setter.delete()
def check_expected_values(self, invoices, expected_value, invoice_type="Sales"):
doctype = "Sales Invoice" if invoice_type == "Sales" else "Purchase Invoice"
@@ -36,7 +51,7 @@ class TestOpeningInvoiceCreationTool(unittest.TestCase):
self.assertEqual(si.get(field, ""), expected_value[invoice_idx][field_idx])
def test_opening_purchase_invoice_creation(self):
invoices = self.make_invoices(invoice_type="Purchase")
invoices = self.make_invoices(invoice_type="Purchase", company="_Test Opening Invoice Company")
self.assertEqual(len(invoices), 2)
expected_value = {
@@ -46,6 +61,28 @@ class TestOpeningInvoiceCreationTool(unittest.TestCase):
}
self.check_expected_values(invoices, expected_value, invoice_type="Purchase", )
def test_opening_sales_invoice_creation_with_missing_debit_account(self):
company = "_Test Opening Invoice Company"
party_1, party_2 = make_customer("Customer A"), make_customer("Customer B")
old_default_receivable_account = frappe.db.get_value("Company", company, "default_receivable_account")
frappe.db.set_value("Company", company, "default_receivable_account", "")
if not frappe.db.exists("Cost Center", "_Test Opening Invoice Company - _TOIC"):
cc = frappe.get_doc({"doctype": "Cost Center", "cost_center_name": "_Test Opening Invoice Company",
"is_group": 1, "company": "_Test Opening Invoice Company"})
cc.insert(ignore_mandatory=True)
cc2 = frappe.get_doc({"doctype": "Cost Center", "cost_center_name": "Main", "is_group": 0,
"company": "_Test Opening Invoice Company", "parent_cost_center": cc.name})
cc2.insert()
frappe.db.set_value("Company", company, "cost_center", "Main - _TOIC")
self.assertRaises(AccountMissingError, self.make_invoices, company="_Test Opening Invoice Company", party_1=party_1, party_2=party_2)
# teardown
frappe.db.set_value("Company", company, "default_receivable_account", old_default_receivable_account)
def get_opening_invoice_creation_dict(**args):
party = "Customer" if args.get("invoice_type", "Sales") == "Sales" else "Supplier"
company = args.get("company", "_Test Company")
@@ -57,7 +94,7 @@ def get_opening_invoice_creation_dict(**args):
{
"qty": 1.0,
"outstanding_amount": 300,
"party": "_Test {0}".format(party),
"party": args.get("party_1") or "_Test {0}".format(party),
"item_name": "Opening Item",
"due_date": "2016-09-10",
"posting_date": "2016-09-05",
@@ -66,7 +103,7 @@ def get_opening_invoice_creation_dict(**args):
{
"qty": 2.0,
"outstanding_amount": 250,
"party": "_Test {0} 1".format(party),
"party": args.get("party_2") or "_Test {0} 1".format(party),
"item_name": "Opening Item",
"due_date": "2016-09-10",
"posting_date": "2016-09-05",
@@ -76,4 +113,31 @@ def get_opening_invoice_creation_dict(**args):
})
invoice_dict.update(args)
return invoice_dict
return invoice_dict
def make_company():
if frappe.db.exists("Company", "_Test Opening Invoice Company"):
return frappe.get_doc("Company", "_Test Opening Invoice Company")
company = frappe.new_doc("Company")
company.company_name = "_Test Opening Invoice Company"
company.abbr = "_TOIC"
company.default_currency = "INR"
company.country = "India"
company.insert()
return company
def make_customer(customer=None):
customer_name = customer or "Opening Customer"
customer = frappe.get_doc({
"doctype": "Customer",
"customer_name": customer_name,
"customer_group": "All Customer Groups",
"customer_type": "Company",
"territory": "All Territories"
})
if not frappe.db.exists("Customer", customer_name):
customer.insert(ignore_permissions=True)
return customer.name
else:
return frappe.db.exists("Customer", customer_name)

View File

@@ -187,7 +187,7 @@ frappe.ui.form.on('Payment Entry', {
frm.toggle_display("base_received_amount", (
frm.doc.paid_to_account_currency != company_currency &&
frm.doc.paid_from_account_currency != frm.doc.paid_to_account_currency
frm.doc.paid_from_account_currency != frm.doc.paid_to_account_currency
&& frm.doc.base_paid_amount != frm.doc.base_received_amount
));
@@ -386,6 +386,8 @@ frappe.ui.form.on('Payment Entry', {
set_account_currency_and_balance: function(frm, account, currency_field,
balance_field, callback_function) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
if (frm.doc.posting_date && account) {
frappe.call({
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_account_details",
@@ -412,6 +414,14 @@ frappe.ui.form.on('Payment Entry', {
if(!frm.doc.paid_amount && frm.doc.received_amount)
frm.events.received_amount(frm);
if (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency
&& frm.doc.paid_amount != frm.doc.received_amount) {
if (company_currency != frm.doc.paid_from_account_currency &&
frm.doc.payment_type == "Pay") {
frm.doc.paid_amount = frm.doc.received_amount;
}
}
}
},
() => {
@@ -583,12 +593,22 @@ frappe.ui.form.on('Payment Entry', {
{fieldtype:"Column Break"},
{fieldtype:"Float", label: __("Less Than Amount"), fieldname:"outstanding_amt_less_than"},
{fieldtype:"Section Break"},
{fieldtype:"Link", label:__("Cost Center"), fieldname:"cost_center", options:"Cost Center",
"get_query": function() {
return {
"filters": {"company": frm.doc.company}
}
}
},
{fieldtype:"Column Break"},
{fieldtype:"Section Break"},
{fieldtype:"Check", label: __("Allocate Payment Amount"), fieldname:"allocate_payment_amount", default:1},
];
frappe.prompt(fields, function(filters){
frappe.flags.allocate_payment_amount = true;
frm.events.validate_filters_data(frm, filters);
frm.doc.cost_center = filters.cost_center;
frm.events.get_outstanding_documents(frm, filters);
}, __("Filters"), __("Get Outstanding Documents"));
},
@@ -1031,18 +1051,10 @@ frappe.ui.form.on('Payment Entry', {
},
callback: function(r, rt) {
if(r.message) {
frappe.run_serially([
() => {
frm.set_value("paid_from_account_balance", r.message.paid_from_account_balance);
frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance);
frm.set_value("party_balance", r.message.party_balance);
},
() => {
if(frm.doc.payment_type != "Internal") {
frm.clear_table("references");
}
}
]);
}
}

View File

@@ -531,7 +531,8 @@
"fieldtype": "Data",
"hidden": 1,
"label": "Title",
"print_hide": 1
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "party",
@@ -575,7 +576,7 @@
}
],
"is_submittable": 1,
"modified": "2019-11-06 12:59:43.151721",
"modified": "2021-03-10 13:05:16.958866",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -619,4 +620,4 @@
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}
}

View File

@@ -441,6 +441,10 @@ class PaymentEntry(AccountsController):
.format(total_negative_outstanding), InvalidPaymentEntry)
def set_title(self):
if frappe.flags.in_import and self.title:
# do not set title dynamically if title exists during data import.
return
if self.payment_type in ("Receive", "Pay"):
self.title = self.party
else:

View File

@@ -1,12 +1,14 @@
frappe.listview_settings['Payment Entry'] = {
onload: function(listview) {
listview.page.fields_dict.party_type.get_query = function() {
return {
"filters": {
"name": ["in", Object.keys(frappe.boot.party_account_types)],
}
if (listview.page.fields_dict.party_type) {
listview.page.fields_dict.party_type.get_query = function() {
return {
"filters": {
"name": ["in", Object.keys(frappe.boot.party_account_types)],
}
};
};
};
}
}
};

View File

@@ -37,6 +37,11 @@ frappe.ui.form.on("Payment Reconciliation Payment", {
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this;
this.frm.set_query("party", function() {
check_mandatory(me.frm);
});
this.frm.set_query("party_type", function() {
return {
"filters": {
@@ -46,37 +51,39 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
});
this.frm.set_query('receivable_payable_account', function() {
if(!me.frm.doc.company || !me.frm.doc.party_type) {
frappe.msgprint(__("Please select Company and Party Type first"));
} else {
return{
filters: {
"company": me.frm.doc.company,
"is_group": 0,
"account_type": frappe.boot.party_account_types[me.frm.doc.party_type]
}
};
}
check_mandatory(me.frm);
return {
filters: {
"company": me.frm.doc.company,
"is_group": 0,
"account_type": frappe.boot.party_account_types[me.frm.doc.party_type]
}
};
});
this.frm.set_query('bank_cash_account', function() {
if(!me.frm.doc.company) {
frappe.msgprint(__("Please select Company first"));
} else {
return{
filters:[
['Account', 'company', '=', me.frm.doc.company],
['Account', 'is_group', '=', 0],
['Account', 'account_type', 'in', ['Bank', 'Cash']]
]
};
}
check_mandatory(me.frm, true);
return {
filters:[
['Account', 'company', '=', me.frm.doc.company],
['Account', 'is_group', '=', 0],
['Account', 'account_type', 'in', ['Bank', 'Cash']]
]
};
});
this.frm.set_value('party_type', '');
this.frm.set_value('party', '');
this.frm.set_value('receivable_payable_account', '');
var check_mandatory = (frm, only_company=false) => {
var title = __("Mandatory");
if (only_company && !frm.doc.company) {
frappe.throw({message: __("Please Select a Company First"), title: title});
} else if (!frm.doc.company || !frm.doc.party_type) {
frappe.throw({message: __("Please Select Both Company and Party Type First"), title: title});
}
};
},
refresh: function() {
@@ -90,7 +97,7 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
party: function() {
var me = this
if(!me.frm.doc.receivable_payable_account && me.frm.doc.party_type && me.frm.doc.party) {
if (!me.frm.doc.receivable_payable_account && me.frm.doc.party_type && me.frm.doc.party) {
return frappe.call({
method: "erpnext.accounts.party.get_party_account",
args: {
@@ -99,7 +106,7 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
party: me.frm.doc.party
},
callback: function(r) {
if(!r.exc && r.message) {
if (!r.exc && r.message) {
me.frm.set_value("receivable_payable_account", r.message);
}
}

View File

@@ -88,18 +88,18 @@ class PaymentReconciliation(Document):
voucher_type = ('Sales Invoice'
if self.party_type == 'Customer' else "Purchase Invoice")
return frappe.db.sql(""" SELECT `tab{doc}`.name as reference_name, %(voucher_type)s as reference_type,
(sum(`tabGL Entry`.{dr_or_cr}) - sum(`tabGL Entry`.{reconciled_dr_or_cr})) as amount,
return frappe.db.sql(""" SELECT doc.name as reference_name, %(voucher_type)s as reference_type,
(sum(gl.{dr_or_cr}) - sum(gl.{reconciled_dr_or_cr})) as amount,
account_currency as currency
FROM `tab{doc}`, `tabGL Entry`
FROM `tab{doc}` doc, `tabGL Entry` gl
WHERE
(`tab{doc}`.name = `tabGL Entry`.against_voucher or `tab{doc}`.name = `tabGL Entry`.voucher_no)
and `tab{doc}`.{party_type_field} = %(party)s
and `tab{doc}`.is_return = 1 and `tab{doc}`.return_against IS NULL
and `tabGL Entry`.against_voucher_type = %(voucher_type)s
and `tab{doc}`.docstatus = 1 and `tabGL Entry`.party = %(party)s
and `tabGL Entry`.party_type = %(party_type)s and `tabGL Entry`.account = %(account)s
GROUP BY `tab{doc}`.name
(doc.name = gl.against_voucher or doc.name = gl.voucher_no)
and doc.{party_type_field} = %(party)s
and doc.is_return = 1 and ifnull(doc.return_against, "") = ""
and gl.against_voucher_type = %(voucher_type)s
and doc.docstatus = 1 and gl.party = %(party)s
and gl.party_type = %(party_type)s and gl.account = %(account)s
GROUP BY doc.name
Having
amount > 0
""".format(
@@ -303,4 +303,4 @@ def reconcile_dr_cr_note(dr_cr_notes, company):
]
})
jv.submit()
jv.submit()

View File

@@ -1,283 +1,95 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "ACC-PCV-.YYYY.-.#####",
"beta": 0,
"creation": "2013-01-10 16:34:07",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 0,
"engine": "InnoDB",
"actions": [],
"autoname": "ACC-PCV-.YYYY.-.#####",
"creation": "2013-01-10 16:34:07",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"transaction_date",
"posting_date",
"fiscal_year",
"amended_from",
"company",
"cost_center_wise_pnl",
"column_break1",
"closing_account_head",
"remarks"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "transaction_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "transaction_date",
"fieldtype": "Date",
"label": "Transaction Date",
"oldfieldname": "transaction_date",
"oldfieldtype": "Date"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "posting_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "posting_date",
"fieldtype": "Date",
"label": "Posting Date",
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Closing Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "fiscal_year",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Closing Fiscal Year",
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"options": "Period Closing Voucher",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"options": "Period Closing Voucher",
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Select",
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Select",
"options": "Company",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "The account head under Liability or Equity, in which Profit/Loss will be booked",
"fieldname": "closing_account_head",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Closing Account Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "closing_account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"description": "The account head under Liability or Equity, in which Profit/Loss will be booked",
"fieldname": "closing_account_head",
"fieldtype": "Link",
"label": "Closing Account Head",
"oldfieldname": "closing_account_head",
"oldfieldtype": "Link",
"options": "Account",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "remarks",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
"length": 0,
"no_copy": 0,
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"fieldname": "remarks",
"fieldtype": "Small Text",
"label": "Remarks",
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
"reqd": 1
},
{
"default": "0",
"fieldname": "cost_center_wise_pnl",
"fieldtype": "Check",
"label": "Book Cost Center-Wise Profit/Loss"
}
],
"has_web_view": 0,
@@ -291,60 +103,43 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 16:15:49.089450",
"modified": "2021-05-20 15:27:37.210458",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Period Closing Voucher",
"owner": "jai@webnotestech.com",
"permissions": [
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"submit": 1,
"write": 1
},
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "posting_date, fiscal_year",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "closing_account_head",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
],
"search_fields": "posting_date, fiscal_year",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "closing_account_head"
}

View File

@@ -50,63 +50,96 @@ class PeriodClosingVoucher(AccountsController):
def make_gl_entries(self):
gl_entries = []
net_pl_balance = 0
dimension_fields = ['t1.cost_center']
net_pl_balance = 0
accounting_dimensions = get_accounting_dimensions()
for dimension in accounting_dimensions:
dimension_fields.append('t1.{0}'.format(dimension))
dimension_filters, default_dimensions = get_dimension_filters()
pl_accounts = self.get_pl_balances(dimension_fields)
pl_accounts = self.get_pl_balances()
for acc in pl_accounts:
if flt(acc.balance_in_company_currency):
if flt(acc.bal_in_company_currency):
gl_entries.append(self.get_gl_dict({
"account": acc.account,
"cost_center": acc.cost_center,
"account_currency": acc.account_currency,
"debit_in_account_currency": abs(flt(acc.balance_in_account_currency)) \
if flt(acc.balance_in_account_currency) < 0 else 0,
"debit": abs(flt(acc.balance_in_company_currency)) \
if flt(acc.balance_in_company_currency) < 0 else 0,
"credit_in_account_currency": abs(flt(acc.balance_in_account_currency)) \
if flt(acc.balance_in_account_currency) > 0 else 0,
"credit": abs(flt(acc.balance_in_company_currency)) \
if flt(acc.balance_in_company_currency) > 0 else 0
"debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) if flt(acc.bal_in_account_currency) < 0 else 0,
"debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) < 0 else 0,
"credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) if flt(acc.bal_in_account_currency) > 0 else 0,
"credit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0
}, item=acc))
net_pl_balance += flt(acc.balance_in_company_currency)
net_pl_balance += flt(acc.bal_in_company_currency)
if net_pl_balance:
cost_center = frappe.db.get_value("Company", self.company, "cost_center")
gl_entry = self.get_gl_dict({
"account": self.closing_account_head,
"debit_in_account_currency": abs(net_pl_balance) if net_pl_balance > 0 else 0,
"debit": abs(net_pl_balance) if net_pl_balance > 0 else 0,
"credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0,
"credit": abs(net_pl_balance) if net_pl_balance < 0 else 0,
"cost_center": cost_center
})
for dimension in accounting_dimensions:
gl_entry.update({
dimension: default_dimensions.get(self.company, {}).get(dimension)
})
gl_entries.append(gl_entry)
if self.cost_center_wise_pnl:
costcenter_wise_gl_entries = self.get_costcenter_wise_pnl_gl_entries(pl_accounts)
gl_entries += costcenter_wise_gl_entries
else:
gl_entry = self.get_pnl_gl_entry(net_pl_balance)
gl_entries.append(gl_entry)
from erpnext.accounts.general_ledger import make_gl_entries
make_gl_entries(gl_entries)
def get_pnl_gl_entry(self, net_pl_balance):
cost_center = frappe.db.get_value("Company", self.company, "cost_center")
gl_entry = self.get_gl_dict({
"account": self.closing_account_head,
"debit_in_account_currency": abs(net_pl_balance) if net_pl_balance > 0 else 0,
"debit": abs(net_pl_balance) if net_pl_balance > 0 else 0,
"credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0,
"credit": abs(net_pl_balance) if net_pl_balance < 0 else 0,
"cost_center": cost_center
})
self.update_default_dimensions(gl_entry)
return gl_entry
def get_costcenter_wise_pnl_gl_entries(self, pl_accounts):
company_cost_center = frappe.db.get_value("Company", self.company, "cost_center")
gl_entries = []
for acc in pl_accounts:
if flt(acc.bal_in_company_currency):
gl_entry = self.get_gl_dict({
"account": self.closing_account_head,
"cost_center": acc.cost_center or company_cost_center,
"account_currency": acc.account_currency,
"debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) if flt(acc.bal_in_account_currency) > 0 else 0,
"debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0,
"credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) if flt(acc.bal_in_account_currency) < 0 else 0,
"credit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) < 0 else 0
}, item=acc)
self.update_default_dimensions(gl_entry)
gl_entries.append(gl_entry)
return gl_entries
def update_default_dimensions(self, gl_entry):
if not self.accounting_dimensions:
self.accounting_dimensions = get_accounting_dimensions()
_, default_dimensions = get_dimension_filters()
for dimension in self.accounting_dimensions:
gl_entry.update({
dimension: default_dimensions.get(self.company, {}).get(dimension)
})
def get_pl_balances(self):
"""Get balance for dimension-wise pl accounts"""
dimension_fields = ['t1.cost_center']
self.accounting_dimensions = get_accounting_dimensions()
for dimension in self.accounting_dimensions:
dimension_fields.append('t1.{0}'.format(dimension))
def get_pl_balances(self, dimension_fields):
"""Get balance for pl accounts"""
return frappe.db.sql("""
select
t1.account, t2.account_currency, {dimension_fields},
sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as balance_in_account_currency,
sum(t1.debit) - sum(t1.credit) as balance_in_company_currency
sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as bal_in_account_currency,
sum(t1.debit) - sum(t1.credit) as bal_in_company_currency
from `tabGL Entry` t1, `tabAccount` t2
where t1.account = t2.name and t2.report_type = 'Profit and Loss'
and t2.docstatus < 2 and t2.company = %s

View File

@@ -8,6 +8,7 @@ import frappe
from frappe.utils import flt, today
from erpnext.accounts.utils import get_fiscal_year, now
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
class TestPeriodClosingVoucher(unittest.TestCase):
def test_closing_entry(self):
@@ -65,6 +66,58 @@ class TestPeriodClosingVoucher(unittest.TestCase):
self.assertEqual(gle_for_random_expense_account[0].amount_in_account_currency,
-1*random_expense_account[0].balance_in_account_currency)
def test_cost_center_wise_posting(self):
frappe.db.sql("delete from `tabGL Entry` where company='Test PCV Company'")
company = create_company()
surplus_account = create_account()
cost_center1 = create_cost_center("Test Cost Center 1")
cost_center2 = create_cost_center("Test Cost Center 2")
create_sales_invoice(
company=company,
cost_center=cost_center1,
income_account="Sales - TPC",
expense_account="Cost of Goods Sold - TPC",
rate=400,
debit_to="Debtors - TPC"
)
create_sales_invoice(
company=company,
cost_center=cost_center2,
income_account="Sales - TPC",
expense_account="Cost of Goods Sold - TPC",
rate=200,
debit_to="Debtors - TPC"
)
pcv = frappe.get_doc({
"transaction_date": today(),
"posting_date": today(),
"fiscal_year": get_fiscal_year(today())[0],
"company": "Test PCV Company",
"cost_center_wise_pnl": 1,
"closing_account_head": surplus_account,
"remarks": "Test",
"doctype": "Period Closing Voucher"
})
pcv.insert()
pcv.submit()
expected_gle = (
('Sales - TPC', 200.0, 0.0, cost_center2),
(surplus_account, 0.0, 200.0, cost_center2),
('Sales - TPC', 400.0, 0.0, cost_center1),
(surplus_account, 0.0, 400.0, cost_center1)
)
pcv_gle = frappe.db.sql("""
select account, debit, credit, cost_center from `tabGL Entry` where voucher_no=%s
""", (pcv.name))
self.assertTrue(pcv_gle, expected_gle)
def make_period_closing_voucher(self):
pcv = frappe.get_doc({
"doctype": "Period Closing Voucher",
@@ -80,6 +133,38 @@ class TestPeriodClosingVoucher(unittest.TestCase):
return pcv
def create_company():
company = frappe.get_doc({
'doctype': 'Company',
'company_name': "Test PCV Company",
'country': 'United States',
'default_currency': 'USD'
})
company.insert(ignore_if_duplicate = True)
return company.name
def create_account():
account = frappe.get_doc({
"account_name": "Reserve and Surplus",
"is_group": 0,
"company": "Test PCV Company",
"root_type": "Liability",
"report_type": "Balance Sheet",
"account_currency": "USD",
"parent_account": "Current Liabilities - TPC",
"doctype": "Account"
}).insert(ignore_if_duplicate = True)
return account.name
def create_cost_center(cc_name):
costcenter = frappe.get_doc({
"company": "Test PCV Company",
"cost_center_name": cc_name,
"doctype": "Cost Center",
"parent_cost_center": "Test PCV Company - TPC"
})
costcenter.insert(ignore_if_duplicate = True)
return costcenter.name
test_dependencies = ["Customer", "Cost Center"]
test_records = frappe.get_test_records("Period Closing Voucher")

View File

@@ -1,4 +1,5 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "Prompt",
"creation": "2013-05-24 12:15:51",
@@ -22,6 +23,7 @@
"allow_user_to_edit_discount",
"allow_print_before_pay",
"display_items_in_stock",
"hide_unavailable_items",
"section_break_15",
"applicable_for_users",
"section_break_11",
@@ -389,11 +391,18 @@
"fieldtype": "Link",
"label": "Tax Category",
"options": "Tax Category"
},
{
"default": "0",
"fieldname": "hide_unavailable_items",
"fieldtype": "Check",
"label": "Hide Unavailable Items"
}
],
"icon": "icon-cog",
"idx": 1,
"modified": "2020-01-24 15:52:03.797701",
"links": [],
"modified": "2020-10-16 04:33:57.283873",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",

View File

@@ -1,123 +1,39 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-10-27 16:46:06.060930",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"actions": [],
"creation": "2017-10-27 16:46:06.060930",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"default",
"user"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "default",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Default",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
"default": "0",
"fieldname": "default",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Default"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "user",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "User",
"length": 0,
"no_copy": 0,
"options": "User",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
"fieldname": "user",
"fieldtype": "Link",
"in_list_view": 1,
"label": "User",
"options": "User"
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-11-23 17:13:16.005475",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile User",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
],
"istable": 1,
"links": [],
"modified": "2020-10-16 04:33:27.594859",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile User",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -404,6 +404,7 @@
"fieldtype": "Column Break"
},
{
"default": "0",
"depends_on": "eval:doc.rate_or_discount==\"Rate\"",
"fieldname": "rate",
"fieldtype": "Currency",
@@ -467,6 +468,7 @@
"options": "UOM"
},
{
"description": "If rate is zero them item will be treated as \"Free Item\"",
"fieldname": "free_item_rate",
"fieldtype": "Currency",
"label": "Rate"
@@ -554,7 +556,8 @@
],
"icon": "fa fa-gift",
"idx": 1,
"modified": "2019-12-18 17:29:22.957077",
"links": [],
"modified": "2020-12-04 00:36:24.698219",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",

View File

@@ -49,9 +49,10 @@ class PricingRule(Document):
if self.apply_on == apply_on and len(self.get(field) or []) < 1:
throw(_("{0} is not added in the table").format(apply_on), frappe.MandatoryError)
tocheck = frappe.scrub(self.get("applicable_for", ""))
if tocheck and not self.get(tocheck):
throw(_("{0} is required").format(self.meta.get_label(tocheck)), frappe.MandatoryError)
if self.get("applicable_for", "") is not None:
tocheck = frappe.scrub(self.get("applicable_for", ""))
if tocheck and not self.get(tocheck):
throw(_("{0} is required").format(self.meta.get_label(tocheck)), frappe.MandatoryError)
if self.apply_rule_on_other:
o_field = 'other_' + frappe.scrub(self.apply_rule_on_other)
@@ -130,7 +131,7 @@ class PricingRule(Document):
for d in self.items:
max_discount = frappe.get_cached_value("Item", d.item_code, "max_discount")
if max_discount and flt(self.discount_percentage) > flt(max_discount):
throw(_("Max discount allowed for item: {0} is {1}%").format(self.item_code, max_discount))
throw(_("Max discount allowed for item: {0} is {1}%").format(d.item_code, max_discount))
def validate_price_list_with_currency(self):
if self.currency and self.for_price_list:
@@ -329,20 +330,30 @@ def get_pricing_rule_details(args, pricing_rule):
def apply_price_discount_rule(pricing_rule, item_details, args):
item_details.pricing_rule_for = pricing_rule.rate_or_discount
if ((pricing_rule.margin_type == 'Amount' and pricing_rule.currency == args.currency)
or (pricing_rule.margin_type == 'Percentage')):
item_details.margin_type = pricing_rule.margin_type
item_details.margin_rate_or_amount = pricing_rule.margin_rate_or_amount
else:
item_details.margin_type = None
item_details.margin_rate_or_amount = 0.0
for apply_on in ['Percentage', 'Amount']:
if pricing_rule.margin_type != apply_on:
continue
field = 'margin_rate_or_amount'
if field not in item_details:
item_details.setdefault(field, 0)
item_details.setdefault('margin_type', apply_on)
item_details[field] += (pricing_rule.get(field, 0)
if pricing_rule else args.get(field, 0))
if pricing_rule.rate_or_discount == 'Rate':
pricing_rule_rate = 0.0
if pricing_rule.currency == args.currency:
pricing_rule_rate = pricing_rule.rate
if pricing_rule_rate:
# Override already set price list rate (from item price)
# if pricing_rule_rate > 0
item_details.update({
"price_list_rate": pricing_rule_rate * args.get("conversion_factor", 1),
})
item_details.update({
"price_list_rate": pricing_rule_rate * args.get("conversion_factor", 1),
"discount_percentage": 0.0
})

View File

@@ -385,7 +385,7 @@ class TestPricingRule(unittest.TestCase):
so.load_from_db()
self.assertEqual(so.items[1].is_free_item, 1)
self.assertEqual(so.items[1].item_code, "_Test Item 2")
def test_cumulative_pricing_rule(self):
frappe.delete_doc_if_exists('Pricing Rule', '_Test Cumulative Pricing Rule')
test_record = {
@@ -430,6 +430,59 @@ class TestPricingRule(unittest.TestCase):
self.assertTrue(details)
def test_item_price_with_pricing_rule(self):
item = make_item("Water Flask")
make_item_price("Water Flask", "_Test Price List", 100)
pricing_rule_record = {
"doctype": "Pricing Rule",
"title": "_Test Water Flask Rule",
"apply_on": "Item Code",
"items": [{
"item_code": "Water Flask",
}],
"selling": 1,
"currency": "INR",
"rate_or_discount": "Rate",
"rate": 0,
"margin_type": "Percentage",
"margin_rate_or_amount": 2,
"company": "_Test Company"
}
rule = frappe.get_doc(pricing_rule_record)
rule.insert()
si = create_sales_invoice(do_not_save=True, item_code="Water Flask")
si.selling_price_list = "_Test Price List"
si.save()
# If rate in Rule is 0, give preference to Item Price if it exists
self.assertEqual(si.items[0].price_list_rate, 100)
self.assertEqual(si.items[0].margin_rate_or_amount, 2)
self.assertEqual(si.items[0].rate_with_margin, 102)
self.assertEqual(si.items[0].rate, 102)
si.delete()
rule.delete()
frappe.get_doc("Item Price", {"item_code": "Water Flask"}).delete()
item.delete()
def test_pricing_rule_for_transaction(self):
make_item("Water Flask 1")
frappe.delete_doc_if_exists('Pricing Rule', '_Test Pricing Rule')
make_pricing_rule(selling=1, min_qty=5, price_or_product_discount="Product",
apply_on="Transaction", free_item="Water Flask 1", free_qty=1, free_item_rate=10)
si = create_sales_invoice(qty=5, do_not_submit=True)
self.assertEquals(len(si.items), 2)
self.assertEquals(si.items[1].rate, 10)
si1 = create_sales_invoice(qty=2, do_not_submit=True)
self.assertEquals(len(si1.items), 1)
for doc in [si, si1]:
doc.delete()
def make_pricing_rule(**args):
args = frappe._dict(args)
@@ -447,15 +500,23 @@ def make_pricing_rule(**args):
"rate_or_discount": args.rate_or_discount or "Discount Percentage",
"discount_percentage": args.discount_percentage or 0.0,
"rate": args.rate or 0.0,
"margin_type": args.margin_type,
"margin_rate_or_amount": args.margin_rate_or_amount or 0.0
"margin_rate_or_amount": args.margin_rate_or_amount or 0.0,
"condition": args.condition or '',
"apply_multiple_pricing_rules": args.apply_multiple_pricing_rules or 0
})
for field in ["free_item", "free_qty", "free_item_rate", "priority",
"margin_type", "price_or_product_discount"]:
if args.get(field):
doc.set(field, args.get(field))
apply_on = doc.apply_on.replace(' ', '_').lower()
child_table = {'Item Code': 'items', 'Item Group': 'item_groups', 'Brand': 'brands'}
doc.append(child_table.get(doc.apply_on), {
apply_on: args.get(apply_on) or "_Test Item"
})
if doc.apply_on != "Transaction":
doc.append(child_table.get(doc.apply_on), {
apply_on: args.get(apply_on) or "_Test Item"
})
doc.insert(ignore_permissions=True)
if args.get(apply_on) and apply_on != "item_code":

View File

@@ -453,6 +453,9 @@ def apply_pricing_rule_on_transaction(doc):
pricing_rules = filter_pricing_rules_for_qty_amount(doc.total_qty,
doc.total, pricing_rules)
if not pricing_rules:
remove_free_item(doc)
for d in pricing_rules:
if d.price_or_product_discount == 'Price':
if d.apply_discount_on:
@@ -464,7 +467,7 @@ def apply_pricing_rule_on_transaction(doc):
if not d.get(pr_field): continue
if d.validate_applied_rule and doc.get(field) < d.get(pr_field):
if d.validate_applied_rule and doc.get(field) is not None and doc.get(field) < d.get(pr_field):
frappe.msgprint(_("User has not applied rule on the invoice {0}")
.format(doc.name))
else:
@@ -476,6 +479,12 @@ def apply_pricing_rule_on_transaction(doc):
get_product_discount_rule(d, item_details, doc=doc)
apply_pricing_rule_for_free_items(doc, item_details.free_item_data)
doc.set_missing_values()
doc.calculate_taxes_and_totals()
def remove_free_item(doc):
for d in doc.items:
if d.is_free_item:
doc.remove(d)
def get_applied_pricing_rules(pricing_rules):
if pricing_rules:
@@ -488,7 +497,7 @@ def get_applied_pricing_rules(pricing_rules):
def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None):
free_item = pricing_rule.free_item
if pricing_rule.same_item:
if pricing_rule.same_item and pricing_rule.get("apply_on") != 'Transaction':
free_item = item_details.item_code or args.item_code
if not free_item:
@@ -517,13 +526,17 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None):
if item_details.get("parenttype") == 'Sales Order':
item_details.free_item_data['delivery_date'] = doc.delivery_date if doc else today()
company = args.get('company') or doc.company
item_details.free_item_data['income_account'] = get_default_income_account(
args=args,
item=get_item_defaults(free_item, company),
item_group=get_item_group_defaults(free_item, company),
brand=get_brand_defaults(free_item, company),
)
company = doc.company
if args and args.get("company"):
company = args.get("company")
if args:
item_details.free_item_data['income_account'] = get_default_income_account(
args=args,
item=get_item_defaults(free_item, company),
item_group=get_item_group_defaults(free_item, company),
brand=get_brand_defaults(free_item, company),
)
def apply_pricing_rule_for_free_items(doc, pricing_rule_args, set_missing_values=False):
if pricing_rule_args.get('item_code'):

View File

@@ -509,7 +509,7 @@ frappe.ui.form.on("Purchase Invoice", {
},
onload: function(frm) {
if(frm.doc.__onload) {
if(frm.doc.__onload && frm.is_new()) {
if(frm.doc.supplier) {
frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0;
}

View File

@@ -142,6 +142,11 @@ class PurchaseInvoice(BuyingController):
throw(_("Conversion rate cannot be 0 or 1"))
def validate_credit_to_acc(self):
if not self.credit_to:
self.credit_to = get_party_account("Supplier", self.supplier, self.company)
if not self.credit_to:
self.raise_missing_debit_credit_account_error("Supplier", self.supplier)
account = frappe.db.get_value("Account", self.credit_to,
["account_type", "report_type", "account_currency"], as_dict=True)
@@ -242,8 +247,15 @@ class PurchaseInvoice(BuyingController):
else:
item.expense_account = stock_not_billed_account
elif item.is_fixed_asset and not is_cwip_accounting_enabled(asset_category):
item.expense_account = get_asset_category_account('fixed_asset_account', item=item.item_code,
asset_category_account = get_asset_category_account('fixed_asset_account', item=item.item_code,
company = self.company)
if not asset_category_account:
form_link = get_link_to_form('Asset Category', asset_category)
throw(
_("Please set Fixed Asset Account in {} against {}.").format(form_link, self.company),
title=_("Missing Account")
)
item.expense_account = asset_category_account
elif item.is_fixed_asset and item.pr_detail:
item.expense_account = asset_received_but_not_billed
elif not item.expense_account and for_validate:

View File

@@ -43,7 +43,7 @@
}
],
"grand_total": 0,
"naming_series": "_T-BILL",
"naming_series": "T-PINV-",
"taxes": [
{
"account_head": "_Test Account Shipping Charges - _TC",
@@ -168,7 +168,7 @@
}
],
"grand_total": 0,
"naming_series": "_T-Purchase Invoice-",
"naming_series": "T-PINV-",
"taxes": [
{
"account_head": "_Test Account Shipping Charges - _TC",

View File

@@ -153,8 +153,8 @@ def update_multi_mode_option(doc, pos_profile):
def get_mode_of_payment(doc):
return frappe.db.sql("""
select mpa.default_account, mpa.parent, mp.type as type
from `tabMode of Payment Account` mpa,`tabMode of Payment` mp
select mpa.default_account, mpa.parent, mp.type as type
from `tabMode of Payment Account` mpa,`tabMode of Payment` mp
where mpa.parent = mp.name and mpa.company = %(company)s and mp.enabled = 1""",
{'company': doc.company}, as_dict=1)
@@ -175,6 +175,13 @@ def get_items_list(pos_profile, company):
if args_list:
cond = "and i.item_group in (%s)" % (', '.join(['%s'] * len(args_list)))
bin_join = bin_cond = ""
if pos_profile.get('hide_unavailable_items'):
bin_join = ",`tabBin` b"
bin_cond = "and i.item_code = b.item_code and ifnull(b.actual_qty, 0) > 0 "
if pos_profile.get('warehouse'):
bin_cond += "and b.warehouse = {}".format(frappe.db.escape(pos_profile.get('warehouse')))
return frappe.db.sql("""
select
i.name, i.item_code, i.item_name, i.description, i.item_group, i.has_batch_no,
@@ -186,11 +193,13 @@ def get_items_list(pos_profile, company):
left join `tabItem Default` id on id.parent = i.name and id.company = %s
left join `tabItem Tax` it on it.parent = i.name
left join `tabUOM Conversion Detail` c on i.name = c.parent and i.sales_uom = c.uom
{bin_join}
where
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
{cond}
{bin_cond}
group by i.item_code
""".format(cond=cond), tuple([company] + args_list), as_dict=1)
""".format(cond=cond, bin_join=bin_join, bin_cond=bin_cond), tuple([company] + args_list), as_dict=1)
def get_item_groups(pos_profile):
@@ -385,6 +394,14 @@ def get_pricing_rule_data(doc):
between ifnull(valid_from, '2000-01-01') and ifnull(valid_upto, '2500-12-31')
order by priority desc, name desc""",
{'company': doc.company, 'price_list': doc.selling_price_list, 'date': nowdate()}, as_dict=1)
for row in pricing_rules:
if row.apply_on:
doctype = "Pricing Rule " + row.apply_on
apply_on = frappe.scrub(row.apply_on)
row[apply_on] = [d.get(apply_on) for d in frappe.get_all(doctype,
filters = {"parent": row.name}, fields = [apply_on])]
return pricing_rules
@@ -425,10 +442,10 @@ def make_invoice(pos_profile, doc_list={}, email_queue_list={}, customers_list={
name_list.append(name)
email_queue = make_email_queue(email_queue_list)
if isinstance(pos_profile, string_types):
pos_profile = json.loads(pos_profile)
customers = get_customers_list(pos_profile)
return {
'invoice': name_list,

View File

@@ -1,6 +1,8 @@
{% include "erpnext/regional/india/taxes.js" %}
{% include "erpnext/regional/india/e_invoice/einvoice.js" %}
erpnext.setup_auto_gst_taxation('Sales Invoice');
erpnext.setup_einvoice_actions('Sales Invoice')
frappe.ui.form.on("Sales Invoice", {
setup: function(frm) {
@@ -12,6 +14,16 @@ frappe.ui.form.on("Sales Invoice", {
};
});
frm.set_query('transporter_address', function (doc) {
return {
query: 'frappe.contacts.doctype.address.address.address_query',
filters: {
link_doctype: 'Supplier',
link_name: doc.transporter
}
}
});
frm.set_query('driver', function(doc) {
return {
filters: {

View File

@@ -825,45 +825,43 @@ frappe.ui.form.on('Sales Invoice', {
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_invoice_discounting",
frm: frm
});
}
})
},
frappe.ui.form.on('Sales Invoice Timesheet', {
calculate_timesheet_totals: function(frm) {
frm.set_value("total_billing_amount",
frm.doc.timesheets.reduce((a, b) => a + (b["billing_amount"] || 0.0), 0.0));
frm.set_value("total_billing_hours",
frm.doc.timesheets.reduce((a, b) => a + (b["billing_hours"] || 0.0), 0.0));
}
});
frappe.ui.form.on("Sales Invoice Timesheet", {
time_sheet: function(frm, cdt, cdn){
var d = locals[cdt][cdn];
if(d.time_sheet) {
frappe.call({
method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_data",
args: {
'name': d.time_sheet,
'project': frm.doc.project || null
"name": d.time_sheet,
"project": frm.doc.project || null
},
callback: function(r, rt) {
callback: function(r) {
if(r.message){
data = r.message;
frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);
calculate_total_billing_amount(frm)
frappe.model.set_value(cdt, cdn, "billing_hours", r.message.billing_hours);
frappe.model.set_value(cdt, cdn, "billing_amount", r.message.billing_amount);
frappe.model.set_value(cdt, cdn, "timesheet_detail", r.message.timesheet_detail);
frm.trigger("calculate_timesheet_totals");
}
}
})
});
}
},
timesheets_remove: function(frm, cdt, cdn) {
frm.trigger("calculate_timesheet_totals");
}
})
});
var calculate_total_billing_amount = function(frm) {
var doc = frm.doc;
doc.total_billing_amount = 0.0
if(doc.timesheets) {
$.each(doc.timesheets, function(index, data){
doc.total_billing_amount += data.billing_amount
})
}
refresh_field('total_billing_amount')
}
var select_loyalty_program = function(frm, loyalty_programs) {
var dialog = new frappe.ui.Dialog({

View File

@@ -69,6 +69,7 @@
"time_sheet_list",
"timesheets",
"total_billing_amount",
"total_billing_hours",
"section_break_30",
"total_qty",
"base_total",
@@ -1564,12 +1565,20 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "total_billing_hours",
"fieldtype": "Float",
"label": "Total Billing Hours",
"print_hide": 1,
"read_only": 1
}
],
"icon": "fa fa-file-text",
"idx": 181,
"is_submittable": 1,
"modified": "2020-07-01 12:41:29.484813",
"modified": "2021-07-26 14:01:34.605644",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe, erpnext
import frappe.defaults
from frappe.utils import cint, flt, add_months, today, date_diff, getdate, add_days, cstr, nowdate
from frappe.utils import cint, flt, getdate, add_days, cstr, nowdate, formatdate
from frappe import _, msgprint, throw
from erpnext.accounts.party import get_party_account, get_due_date
from erpnext.controllers.stock_controller import update_gl_entries_after
@@ -225,9 +225,9 @@ class SalesInvoice(SellingController):
frappe.throw(_("At least one mode of payment is required for POS invoice."))
def before_cancel(self):
super(SalesInvoice, self).before_cancel()
self.update_time_sheet(None)
def on_cancel(self):
super(SalesInvoice, self).on_cancel()
@@ -398,6 +398,8 @@ class SalesInvoice(SellingController):
from erpnext.stock.get_item_details import get_pos_profile_item_details, get_pos_profile
if not self.pos_profile:
pos_profile = get_pos_profile(self.company) or {}
if not pos_profile:
frappe.throw(_("No POS Profile found. Please create a New POS Profile first"))
self.pos_profile = pos_profile.get('name')
pos = {}
@@ -448,7 +450,7 @@ class SalesInvoice(SellingController):
# set pos values in items
for item in self.get("items"):
if item.get('item_code'):
profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos)
profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos, update_data=True)
for fname, val in iteritems(profile_details):
if (not for_validate) or (for_validate and not item.get(fname)):
item.set(fname, val)
@@ -467,6 +469,11 @@ class SalesInvoice(SellingController):
return frappe.db.sql("select abbr from tabCompany where name=%s", self.company)[0][0]
def validate_debit_to_acc(self):
if not self.debit_to:
self.debit_to = get_party_account("Customer", self.customer, self.company)
if not self.debit_to:
self.raise_missing_debit_credit_account_error("Customer", self.customer)
account = frappe.get_cached_value("Account", self.debit_to,
["account_type", "report_type", "account_currency"], as_dict=True)
@@ -530,7 +537,12 @@ class SalesInvoice(SellingController):
self.against_income_account = ','.join(against_acc)
def add_remarks(self):
if not self.remarks: self.remarks = 'No Remarks'
if not self.remarks:
if self.po_no and self.po_date:
self.remarks = _("Against Customer Order {0} dated {1}").format(self.po_no,
formatdate(self.po_date))
else:
self.remarks = _("No Remarks")
def validate_auto_set_posting_time(self):
# Don't auto set the posting date and time if invoice is amended
@@ -570,7 +582,8 @@ class SalesInvoice(SellingController):
def validate_pos(self):
if self.is_return:
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(self.grand_total) > \
invoice_total = self.rounded_total or self.grand_total
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(invoice_total) > \
1.0/(10.0**(self.precision("grand_total") + 1.0)):
frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))
@@ -670,12 +683,11 @@ class SalesInvoice(SellingController):
self.calculate_billing_amount_for_timesheet()
def calculate_billing_amount_for_timesheet(self):
total_billing_amount = 0.0
for data in self.timesheets:
if data.billing_amount:
total_billing_amount += data.billing_amount
def timesheet_sum(field):
return sum((ts.get(field) or 0.0) for ts in self.timesheets)
self.total_billing_amount = total_billing_amount
self.total_billing_amount = timesheet_sum("billing_amount")
self.total_billing_hours = timesheet_sum("billing_hours")
def get_warehouse(self):
user_pos_profile = frappe.db.sql("""select name, warehouse from `tabPOS Profile`
@@ -1394,6 +1406,7 @@ def make_delivery_note(source_name, target_doc=None):
def set_missing_values(source, target):
target.ignore_pricing_rule = 1
target.run_method("set_missing_values")
target.run_method("set_po_nos")
target.run_method("calculate_taxes_and_totals")
def update_item(source_doc, target_doc, source_parent):

View File

@@ -30,7 +30,7 @@
"base_grand_total": 561.8,
"grand_total": 561.8,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"naming_series": "T-SINV-",
"base_net_total": 500.0,
"taxes": [
{
@@ -103,7 +103,7 @@
"base_grand_total": 630.0,
"grand_total": 630.0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"naming_series": "T-SINV-",
"base_net_total": 500.0,
"taxes": [
{
@@ -174,7 +174,7 @@
],
"grand_total": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"naming_series": "T-SINV-",
"taxes": [
{
"account_head": "_Test Account Shipping Charges - _TC",
@@ -300,7 +300,7 @@
],
"grand_total": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"naming_series": "T-SINV-",
"taxes": [
{
"account_head": "_Test Account Excise Duty - _TC",

View File

@@ -690,7 +690,8 @@ class TestSalesInvoice(unittest.TestCase):
self.assertFalse(gle)
def test_pos_gl_entry_with_perpetual_inventory(self):
make_pos_profile()
make_pos_profile(company="_Test Company with perpetual inventory", income_account = "Sales - TCP1",
expense_account = "Cost of Goods Sold - TCP1", warehouse="Stores - TCP1", cost_center = "Main - TCP1", write_off_account="_Test Write Off - TCP1")
pr = make_purchase_receipt(company= "_Test Company with perpetual inventory",supplier_warehouse= "Work In Progress - TCP1", item_code= "_Test FG Item",warehouse= "Stores - TCP1",cost_center= "Main - TCP1")
@@ -773,7 +774,8 @@ class TestSalesInvoice(unittest.TestCase):
def test_pos_change_amount(self):
make_pos_profile()
make_pos_profile(company="_Test Company with perpetual inventory", income_account = "Sales - TCP1",
expense_account = "Cost of Goods Sold - TCP1", warehouse="Stores - TCP1", cost_center = "Main - TCP1", write_off_account="_Test Write Off - TCP1")
pr = make_purchase_receipt(company= "_Test Company with perpetual inventory",supplier_warehouse= "Work In Progress - TCP1", item_code= "_Test FG Item",warehouse= "Stores - TCP1",cost_center= "Main - TCP1")
@@ -795,7 +797,8 @@ class TestSalesInvoice(unittest.TestCase):
def test_make_pos_invoice(self):
from erpnext.accounts.doctype.sales_invoice.pos import make_invoice
pos_profile = make_pos_profile()
pos_profile = make_pos_profile(company="_Test Company with perpetual inventory", income_account = "Sales - TCP1",
expense_account = "Cost of Goods Sold - TCP1", warehouse="Stores - TCP1", cost_center = "Main - TCP1", write_off_account="_Test Write Off - TCP1")
pr = make_purchase_receipt(company= "_Test Company with perpetual inventory",supplier_warehouse= "Work In Progress - TCP1", item_code= "_Test FG Item",warehouse= "Stores - TCP1",cost_center= "Main - TCP1")
pos = create_sales_invoice(company= "_Test Company with perpetual inventory", debit_to="Debtors - TCP1", item_code= "_Test FG Item", warehouse="Stores - TCP1", income_account = "Sales - TCP1", expense_account = "Cost of Goods Sold - TCP1", cost_center = "Main - TCP1", do_not_save=True)
@@ -1838,93 +1841,7 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(target_doc.supplier, "_Test Internal Supplier")
def test_eway_bill_json(self):
if not frappe.db.exists('Address', '_Test Address for Eway bill-Billing'):
address = frappe.get_doc({
"address_line1": "_Test Address Line 1",
"address_title": "_Test Address for Eway bill",
"address_type": "Billing",
"city": "_Test City",
"state": "Test State",
"country": "India",
"doctype": "Address",
"is_primary_address": 1,
"phone": "+91 0000000000",
"gstin": "27AAECE4835E1ZR",
"gst_state": "Maharashtra",
"gst_state_number": "27",
"pincode": "401108"
}).insert()
address.append("links", {
"link_doctype": "Company",
"link_name": "_Test Company"
})
address.save()
if not frappe.db.exists('Address', '_Test Customer-Address for Eway bill-Shipping'):
address = frappe.get_doc({
"address_line1": "_Test Address Line 1",
"address_title": "_Test Customer-Address for Eway bill",
"address_type": "Shipping",
"city": "_Test City",
"state": "Test State",
"country": "India",
"doctype": "Address",
"is_primary_address": 1,
"phone": "+91 0000000000",
"gst_state": "Maharashtra",
"gst_state_number": "27",
"pincode": "410038"
}).insert()
address.append("links", {
"link_doctype": "Customer",
"link_name": "_Test Customer"
})
address.save()
gst_settings = frappe.get_doc("GST Settings")
gst_account = frappe.get_all(
"GST Account",
fields=["cgst_account", "sgst_account", "igst_account"],
filters = {"company": "_Test Company"})
if not gst_account:
gst_settings.append("gst_accounts", {
"company": "_Test Company",
"cgst_account": "CGST - _TC",
"sgst_account": "SGST - _TC",
"igst_account": "IGST - _TC",
})
gst_settings.save()
si = create_sales_invoice(do_not_save =1, rate = '60000')
si.distance = 2000
si.company_address = "_Test Address for Eway bill-Billing"
si.customer_address = "_Test Customer-Address for Eway bill-Shipping"
si.vehicle_no = "KA12KA1234"
si.gst_category = "Registered Regular"
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "CGST - _TC",
"cost_center": "Main - _TC",
"description": "CGST @ 9.0",
"rate": 9
})
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "SGST - _TC",
"cost_center": "Main - _TC",
"description": "SGST @ 9.0",
"rate": 9
})
si = make_sales_invoice_for_ewaybill()
si.submit()
@@ -1940,27 +1857,206 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(data['billLists'][0]['sgstValue'], 5400)
self.assertEqual(data['billLists'][0]['vehicleNo'], 'KA12KA1234')
self.assertEqual(data['billLists'][0]['itemList'][0]['taxableAmount'], 60000)
def test_einvoice_submission_without_irn(self):
# init
einvoice_settings = frappe.get_doc('E Invoice Settings')
einvoice_settings.enable = 1
einvoice_settings.applicable_from = nowdate()
einvoice_settings.append('credentials', {
'company': '_Test Company',
'gstin': '27AAECE4835E1ZR',
'username': 'test',
'password': 'test'
})
einvoice_settings.save()
def test_item_tax_validity(self):
item = frappe.get_doc("Item", "_Test Item 2")
country = frappe.flags.country
frappe.flags.country = 'India'
if item.taxes:
item.taxes = []
item.save()
si = make_sales_invoice_for_ewaybill()
self.assertRaises(frappe.ValidationError, si.submit)
item.append("taxes", {
"item_tax_template": "_Test Item Tax Template 1",
"valid_from": add_days(nowdate(), 1)
si.irn = 'test_irn'
si.submit()
# reset
einvoice_settings = frappe.get_doc('E Invoice Settings')
einvoice_settings.enable = 0
frappe.flags.country = country
def test_einvoice_json(self):
from erpnext.regional.india.e_invoice.utils import make_einvoice
si = make_sales_invoice_for_ewaybill()
si.naming_series = 'INV-2020-.#####'
si.items = []
si.append("items", {
"item_code": "_Test Item",
"uom": "Nos",
"warehouse": "_Test Warehouse - _TC",
"qty": 2000,
"rate": 12,
"income_account": "Sales - _TC",
"expense_account": "Cost of Goods Sold - _TC",
"cost_center": "_Test Cost Center - _TC",
})
si.append("items", {
"item_code": "_Test Item 2",
"uom": "Nos",
"warehouse": "_Test Warehouse - _TC",
"qty": 420,
"rate": 15,
"income_account": "Sales - _TC",
"expense_account": "Cost of Goods Sold - _TC",
"cost_center": "_Test Cost Center - _TC",
})
si.discount_amount = 100
si.save()
einvoice = make_einvoice(si)
total_item_ass_value = 0
total_item_cgst_value = 0
total_item_sgst_value = 0
total_item_igst_value = 0
total_item_value = 0
for item in einvoice['ItemList']:
total_item_ass_value += item['AssAmt']
total_item_cgst_value += item['CgstAmt']
total_item_sgst_value += item['SgstAmt']
total_item_igst_value += item['IgstAmt']
total_item_value += item['TotItemVal']
self.assertTrue(item['AssAmt'], item['TotAmt'] - item['Discount'])
self.assertTrue(item['TotItemVal'], item['AssAmt'] + item['CgstAmt'] + item['SgstAmt'] + item['IgstAmt'])
value_details = einvoice['ValDtls']
self.assertEqual(einvoice['Version'], '1.1')
self.assertTrue(abs(value_details['AssVal'] - total_item_ass_value) <= 1)
self.assertTrue(abs(value_details['CgstVal'] - total_item_cgst_value) <= 1)
self.assertTrue(abs(value_details['SgstVal'] - total_item_sgst_value) <= 1)
self.assertTrue(abs(value_details['IgstVal'] - total_item_igst_value) <= 1)
calculated_invoice_value = \
value_details['AssVal'] + value_details['CgstVal'] \
+ value_details['SgstVal'] + value_details['IgstVal'] \
+ value_details['OthChrg'] - value_details['Discount']
self.assertTrue(abs(value_details['TotInvVal'] - calculated_invoice_value) <= 1)
self.assertTrue(einvoice['EwbDtls'])
def make_test_address_for_ewaybill():
if not frappe.db.exists('Address', '_Test Address for Eway bill-Billing'):
address = frappe.get_doc({
"address_line1": "_Test Address Line 1",
"address_title": "_Test Address for Eway bill",
"address_type": "Billing",
"city": "_Test City",
"state": "Test State",
"country": "India",
"doctype": "Address",
"is_primary_address": 1,
"phone": "+910000000000",
"gstin": "27AAECE4835E1ZR",
"gst_state": "Maharashtra",
"gst_state_number": "27",
"pincode": "401108"
}).insert()
address.append("links", {
"link_doctype": "Company",
"link_name": "_Test Company"
})
item.save()
address.save()
sales_invoice = create_sales_invoice(item = "_Test Item 2", do_not_save=1)
sales_invoice.items[0].item_tax_template = "_Test Item Tax Template 1"
self.assertRaises(frappe.ValidationError, sales_invoice.save)
if not frappe.db.exists('Address', '_Test Customer-Address for Eway bill-Shipping'):
address = frappe.get_doc({
"address_line1": "_Test Address Line 1",
"address_title": "_Test Customer-Address for Eway bill",
"address_type": "Shipping",
"city": "_Test City",
"state": "Test State",
"country": "India",
"doctype": "Address",
"is_primary_address": 1,
"phone": "+910000000000",
"gstin": "27AACCM7806M1Z3",
"gst_state": "Maharashtra",
"gst_state_number": "27",
"pincode": "410038"
}).insert()
item.taxes = []
item.save()
address.append("links", {
"link_doctype": "Customer",
"link_name": "_Test Customer"
})
address.save()
def make_test_transporter_for_ewaybill():
if not frappe.db.exists('Supplier', '_Test Transporter'):
frappe.get_doc({
"doctype": "Supplier",
"supplier_name": "_Test Transporter",
"country": "India",
"supplier_group": "_Test Supplier Group",
"supplier_type": "Company",
"is_transporter": 1
}).insert()
def make_sales_invoice_for_ewaybill():
make_test_address_for_ewaybill()
make_test_transporter_for_ewaybill()
gst_settings = frappe.get_doc("GST Settings")
gst_account = frappe.get_all(
"GST Account",
fields=["cgst_account", "sgst_account", "igst_account"],
filters = {"company": "_Test Company"}
)
if not gst_account:
gst_settings.append("gst_accounts", {
"company": "_Test Company",
"cgst_account": "CGST - _TC",
"sgst_account": "SGST - _TC",
"igst_account": "IGST - _TC",
})
gst_settings.save()
si = create_sales_invoice(do_not_save=1, rate='60000')
si.distance = 2000
si.company_address = "_Test Address for Eway bill-Billing"
si.customer_address = "_Test Customer-Address for Eway bill-Shipping"
si.vehicle_no = "KA12KA1234"
si.gst_category = "Registered Regular"
si.mode_of_transport = 'Road'
si.transporter = '_Test Transporter'
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "CGST - _TC",
"cost_center": "Main - _TC",
"description": "CGST @ 9.0",
"rate": 9
})
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "SGST - _TC",
"cost_center": "Main - _TC",
"description": "SGST @ 9.0",
"rate": 9
})
return si
def create_sales_invoice(**args):
si = frappe.new_doc("Sales Invoice")
@@ -1978,6 +2074,7 @@ def create_sales_invoice(**args):
si.return_against = args.return_against
si.currency=args.currency or "INR"
si.conversion_rate = args.conversion_rate or 1
si.naming_series = args.naming_series or "T-SINV-"
si.append("items", {
"item_code": args.item or args.item_code or "_Test Item",

View File

@@ -34,6 +34,9 @@ def valdiate_taxes_and_charges_template(doc):
validate_disabled(doc)
# Validate with existing taxes and charges template for unique tax category
validate_for_tax_category(doc)
for tax in doc.get("taxes"):
validate_taxes_and_charges(tax)
validate_inclusive_tax(tax, doc)
@@ -41,3 +44,7 @@ def valdiate_taxes_and_charges_template(doc):
def validate_disabled(doc):
if doc.is_default and doc.disabled:
frappe.throw(_("Disabled template must not be default template"))
def validate_for_tax_category(doc):
if frappe.db.exists(doc.doctype, {"company": doc.company, "tax_category": doc.tax_category, "disabled": 0}):
frappe.throw(_("A template with tax category {0} already exists. Only one template is allowed with each tax category").format(frappe.bold(doc.tax_category)))

View File

@@ -169,7 +169,7 @@ class ShareTransfer(Document):
def folio_no_validation(self):
shareholders = ['from_shareholder', 'to_shareholder']
shareholders = [shareholder for shareholder in shareholders if self.get(shareholder) is not '']
shareholders = [shareholder for shareholder in shareholders if self.get(shareholder) != '']
for shareholder in shareholders:
doc = self.get_shareholder_doc(self.get(shareholder))
if doc.company != self.company:

View File

@@ -13,6 +13,7 @@
"cancelation_date",
"trial_period_start",
"trial_period_end",
"generate_new_invoices_past_due_date",
"column_break_11",
"current_invoice_start",
"current_invoice_end",
@@ -29,6 +30,7 @@
"additional_discount_percentage",
"additional_discount_amount",
"sb_3",
"submit_invoice",
"invoices",
"accounting_dimensions_section",
"dimension_col_break"
@@ -183,8 +185,7 @@
"fieldname": "invoices",
"fieldtype": "Table",
"label": "Invoices",
"options": "Subscription Invoice",
"read_only": 1
"options": "Subscription Invoice"
},
{
"collapsible": 1,
@@ -195,9 +196,22 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "New invoices will be generated as per schedule even if current invoices are unpaid or past due date",
"fieldname": "generate_new_invoices_past_due_date",
"fieldtype": "Check",
"label": "Generate New Invoices Past Due Date"
},
{
"default": "1",
"fieldname": "submit_invoice",
"fieldtype": "Check",
"label": "Submit Invoice Automatically"
}
],
"modified": "2020-08-27 23:30:02.504042",
"modified": "2021-05-03 13:35:21.422940",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Subscription",

View File

@@ -288,8 +288,11 @@ class Subscription(Document):
invoice.to_date = self.current_invoice_end
invoice.flags.ignore_mandatory = True
invoice.set_missing_values()
invoice.save()
invoice.submit()
if self.submit_invoice:
invoice.submit()
return invoice
@@ -298,7 +301,8 @@ class Subscription(Document):
Returns the `Item`s linked to `Subscription Plan`
"""
if prorate:
prorate_factor = get_prorata_factor(self.current_invoice_end, self.current_invoice_start)
prorate_factor = get_prorata_factor(self.current_invoice_end, self.current_invoice_start,
self.generate_invoice_at_period_start)
items = []
customer = self.customer
@@ -333,7 +337,7 @@ class Subscription(Document):
if not self.generate_invoice_at_period_start:
return False
if self.is_new_subscription():
if self.is_new_subscription() and getdate(nowdate()) >= getdate(self.current_invoice_start):
return True
# Check invoice dates and make sure it doesn't have outstanding invoices
@@ -408,6 +412,15 @@ class Subscription(Document):
else:
self.set_status_grace_period()
if getdate() > getdate(self.current_invoice_end):
self.update_subscription_period(add_days(self.current_invoice_end, 1))
# Generate invoices periodically even if current invoice are unpaid
if self.generate_new_invoices_past_due_date and not self.is_current_invoice_generated() and (self.is_postpaid_to_invoice()
or self.is_prepaid_to_invoice()):
prorate = frappe.db.get_single_value('Subscription Settings', 'prorate')
self.generate_invoice(prorate)
@staticmethod
def is_not_outstanding(invoice):
"""
@@ -459,11 +472,13 @@ class Subscription(Document):
if invoice:
return invoice.precision('grand_total')
def get_prorata_factor(period_end, period_start):
diff = flt(date_diff(nowdate(), period_start) + 1)
plan_days = flt(date_diff(period_end, period_start) + 1)
prorate_factor = diff / plan_days
def get_prorata_factor(period_end, period_start, is_prepaid):
if is_prepaid:
prorate_factor = 1
else:
diff = flt(date_diff(nowdate(), period_start) + 1)
plan_days = flt(date_diff(period_end, period_start) + 1)
prorate_factor = diff / plan_days
return prorate_factor

View File

@@ -209,7 +209,7 @@ class TestSubscription(unittest.TestCase):
subscription = frappe.new_doc('Subscription')
subscription.customer = '_Test Customer'
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
subscription.start = '2018-01-01'
subscription.start = add_days(nowdate(), -1000)
subscription.days_until_due = 1
subscription.insert()
subscription.process() # generate first invoice
@@ -291,7 +291,8 @@ class TestSubscription(unittest.TestCase):
self.assertEqual(
flt(
get_prorata_factor(subscription.current_invoice_end, subscription.current_invoice_start),
get_prorata_factor(subscription.current_invoice_end, subscription.current_invoice_start,
subscription.generate_invoice_at_period_start),
2),
flt(prorate_factor, 2)
)
@@ -528,9 +529,7 @@ class TestSubscription(unittest.TestCase):
current_inv = subscription.get_current_invoice()
self.assertEqual(current_inv.status, "Unpaid")
diff = flt(date_diff(nowdate(), subscription.current_invoice_start) + 1)
plan_days = flt(date_diff(subscription.current_invoice_end, subscription.current_invoice_start) + 1)
prorate_factor = flt(diff / plan_days)
prorate_factor = 1
self.assertEqual(flt(current_inv.grand_total, 2), flt(prorate_factor * 900, 2))

View File

@@ -163,7 +163,7 @@ def get_tds_amount(suppliers, net_total, company, tax_details, fiscal_year_detai
debit_note_amount = get_debit_note_amount(suppliers, year_start_date, year_end_date)
supplier_credit_amount -= debit_note_amount
if ((tax_details.get('threshold', 0) and supplier_credit_amount >= tax_details.threshold)
if ((tax_details.get('threshold', 0) and net_total >= tax_details.threshold)
or (tax_details.get('cumulative_threshold', 0) and supplier_credit_amount >= tax_details.cumulative_threshold)):
if ldc and is_valid_certificate(ldc.valid_from, ldc.valid_upto, posting_date, tds_deducted, net_total,

View File

@@ -83,47 +83,6 @@ class TestTaxWithholdingCategory(unittest.TestCase):
for d in invoices:
d.cancel()
def test_single_threshold_tds_with_previous_vouchers(self):
invoices = []
frappe.db.set_value("Supplier", "Test TDS Supplier2", "tax_withholding_category", "Single Threshold TDS")
pi = create_purchase_invoice(supplier="Test TDS Supplier2")
pi.submit()
invoices.append(pi)
pi = create_purchase_invoice(supplier="Test TDS Supplier2")
pi.submit()
invoices.append(pi)
self.assertEqual(pi.taxes_and_charges_deducted, 2000)
self.assertEqual(pi.grand_total, 8000)
# delete invoices to avoid clashing
for d in invoices:
d.cancel()
def test_single_threshold_tds_with_previous_vouchers_and_no_tds(self):
invoices = []
frappe.db.set_value("Supplier", "Test TDS Supplier2", "tax_withholding_category", "Single Threshold TDS")
pi = create_purchase_invoice(supplier="Test TDS Supplier2")
pi.submit()
invoices.append(pi)
# TDS not applied
pi = create_purchase_invoice(supplier="Test TDS Supplier2", do_not_apply_tds=True)
pi.submit()
invoices.append(pi)
pi = create_purchase_invoice(supplier="Test TDS Supplier2")
pi.submit()
invoices.append(pi)
self.assertEqual(pi.taxes_and_charges_deducted, 2000)
self.assertEqual(pi.grand_total, 8000)
# delete invoices to avoid clashing
for d in invoices:
d.cancel()
def create_purchase_invoice(**args):
# return sales invoice doc object
item = frappe.get_doc('Item', {'item_name': 'TDS Item'})

View File

@@ -147,7 +147,7 @@ def make_entry(args, adv_adj, update_outstanding, from_repost=False):
gle.submit()
def validate_account_for_perpetual_inventory(gl_map):
if cint(erpnext.is_perpetual_inventory_enabled(gl_map[0].company)):
if cint(erpnext.is_perpetual_inventory_enabled(gl_map[0].company)) and gl_map[0].voucher_type=="Journal Entry":
account_list = [gl_entries.account for gl_entries in gl_map]
aii_accounts = [d.name for d in frappe.get_all("Account",
@@ -160,13 +160,12 @@ def validate_account_for_perpetual_inventory(gl_map):
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(account,
gl_map[0].posting_date, gl_map[0].company)
if gl_map[0].voucher_type=="Journal Entry":
# In case of Journal Entry, there are no corresponding SL entries,
# hence deducting currency amount
account_bal -= flt(gl_map[0].debit) - flt(gl_map[0].credit)
if account_bal == stock_bal:
frappe.throw(_("Account: {0} can only be updated via Stock Transactions")
.format(account), StockAccountInvalidTransaction)
# In case of Journal Entry, there are no corresponding SL entries,
# hence deducting currency amount
account_bal -= flt(gl_map[0].debit) - flt(gl_map[0].credit)
if account_bal == stock_bal:
frappe.throw(_("Account: {0} can only be updated via Stock Transactions")
.format(account), StockAccountInvalidTransaction)
# This has been comment for a temporary, will add this code again on release of immutable ledger
# elif account_bal != stock_bal:
@@ -240,10 +239,10 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision):
for d in gl_map:
if d.account == round_off_account:
round_off_gle = d
if d.debit_in_account_currency:
debit_credit_diff -= flt(d.debit_in_account_currency)
if d.debit:
debit_credit_diff -= flt(d.debit)
else:
debit_credit_diff += flt(d.credit_in_account_currency)
debit_credit_diff += flt(d.credit)
round_off_account_exists = True
if round_off_account_exists and abs(debit_credit_diff) <= (1.0 / (10**precision)):
@@ -252,7 +251,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision):
if not round_off_gle:
for k in ["voucher_type", "voucher_no", "company",
"posting_date", "remarks", "is_opening"]:
"posting_date", "remarks"]:
round_off_gle[k] = gl_map[0][k]
round_off_gle.update({
@@ -264,6 +263,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision):
"cost_center": round_off_cost_center,
"party_type": None,
"party": None,
"is_opening": "No",
"against_voucher_type": None,
"against_voucher": None
})
@@ -293,7 +293,8 @@ def delete_gl_entries(gl_entries=None, voucher_type=None, voucher_no=None,
select account, posting_date, party_type, party, cost_center, fiscal_year,voucher_type,
voucher_no, against_voucher_type, against_voucher, cost_center, company
from `tabGL Entry`
where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no), as_dict=True)
where voucher_type=%s and voucher_no=%s
for update""", (voucher_type, voucher_no), as_dict=True)
if gl_entries:
validate_accounting_period(gl_entries)

View File

@@ -260,7 +260,11 @@ def check_amount_vs_description(amount_matching, description_matching):
continue
if "reference_no" in am_match and "reference_no" in des_match:
if difflib.SequenceMatcher(lambda x: x == " ", am_match["reference_no"], des_match["reference_no"]).ratio() > 70:
# Sequence Matcher does not handle None as input
am_reference = am_match["reference_no"] or ""
des_reference = des_match["reference_no"] or ""
if difflib.SequenceMatcher(lambda x: x == " ", am_reference, des_reference).ratio() > 70:
if am_match not in result:
result.append(am_match)
if result:

View File

@@ -81,7 +81,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
me.page.set_indicator(__("Online"), "green")
}
}
})
});
},
onload: function () {
@@ -278,6 +278,14 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
})
},
set_pos_profile_title(pos_profile) {
this.page.set_title_sub(
`<span class="indicator blue">
<a class="text-muted" href="#Form/POS Profile/${pos_profile}">${pos_profile}</a>
</span>`
);
},
get_data_from_server: function (callback) {
var me = this;
frappe.call({
@@ -286,6 +294,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
freeze_message: __("Master data syncing, it might take some time"),
callback: function (r) {
localStorage.setItem('doc', JSON.stringify(r.message.doc));
me.set_pos_profile_title(r.message.pos_profile.name);
me.init_master_data(r)
me.set_interval_for_si_sync();
me.check_internet_connection();
@@ -2009,34 +2018,57 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
apply_pricing_rule: function () {
var me = this;
var remove_item = false;
$.each(this.frm.doc["items"], function (n, item) {
var pricing_rule = me.get_pricing_rule(item)
me.validate_pricing_rule(pricing_rule)
if (pricing_rule.length) {
item.pricing_rule = pricing_rule[0].name;
item.margin_type = pricing_rule[0].margin_type;
item.price_list_rate = pricing_rule[0].price || item.price_list_rate;
item.margin_rate_or_amount = pricing_rule[0].margin_rate_or_amount;
item.discount_percentage = pricing_rule[0].discount_percentage || 0.0;
me.apply_pricing_rule_on_item(item)
if (pricing_rule[0].price_or_product_discount == "Price") {
item.pricing_rule = pricing_rule[0].name;
item.margin_type = pricing_rule[0].margin_type;
item.price_list_rate = pricing_rule[0].price || item.price_list_rate;
item.margin_rate_or_amount = pricing_rule[0].margin_rate_or_amount;
item.discount_percentage = pricing_rule[0].discount_percentage || 0.0;
me.apply_pricing_rule_on_item(item)
} else {
me.child = frappe.model.add_child(me.frm.doc, me.frm.doc.doctype + " Item", "items");
me.child.item_code = pricing_rule[0].same_item ? item.item_code : pricing_rule[0].free_item;
me.child.item_name = pricing_rule[0].same_item ? item.item_name : pricing_rule[0].free_item;
me.child.stock_uom = pricing_rule[0].same_item ? item.stock_uom : pricing_rule[0].free_item_uom;
me.child.uom = pricing_rule[0].same_item ? item.uom : pricing_rule[0].free_item_uom;
me.child.conversion_factor = 1;
me.child.qty = pricing_rule.qty || 1;
me.child.is_free_item = 1;
me.child.brand = pricing_rule[0].same_item ? item.brand : "";
me.child.description = pricing_rule[0].same_item ? item.description : pricing_rule[0].free_item;
}
} else if (item.pricing_rule) {
item.price_list_rate = me.price_list_data[item.item_code]
item.margin_rate_or_amount = 0.0;
item.discount_percentage = 0.0;
item.pricing_rule = null;
me.apply_pricing_rule_on_item(item)
} else if (item.is_free_item) {
remove_item = true;
item.qty = 0
}
if(item.discount_percentage > 0) {
me.apply_pricing_rule_on_item(item)
}
})
});
if (remove_item) {
this.remove_zero_qty_items_from_cart();
}
},
get_pricing_rule: function (item) {
var me = this;
return $.grep(this.pricing_rules, function (data) {
if (item.qty >= data.min_qty && (item.qty <= (data.max_qty ? data.max_qty : item.qty))) {
me.get_mixed_min_max_qty_and_amt(data, item);
if (data.mixed_qty >= data.min_qty && (data.mixed_qty <= (data.max_qty ? data.max_qty : data.mixed_qty))) {
if (me.validate_item_condition(data, item)) {
if (in_list(['Customer', 'Customer Group', 'Territory', 'Campaign'], data.applicable_for)) {
return me.validate_condition(data)
@@ -2048,11 +2080,26 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
})
},
get_mixed_min_max_qty_and_amt: function(data, item) {
var apply_on = frappe.model.scrub(data.apply_on);
data.mixed_qty = 0.0
if (data.mixed_conditions && in_list(data[apply_on], item[apply_on])) {
this.frm.doc.items.forEach(d => {
if (in_list(data[apply_on], d[apply_on])) {
data.mixed_qty += d.qty;
data.mixed_amt += d.amount;
}
});
} else {
data.mixed_qty = item.qty;
data.mixed_amt = item.amount;
}
},
validate_item_condition: function (data, item) {
var apply_on = frappe.model.scrub(data.apply_on);
return (data.apply_on == 'Item Group')
? this.validate_item_group(data.item_group, item.item_group) : (data[apply_on] == item[apply_on]);
return in_list(data[apply_on], item[apply_on]);
},
validate_item_group: function (pr_item_group, cart_item_group) {

View File

@@ -60,7 +60,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
billing_address=party_address, shipping_address=shipping_address)
if fetch_payment_terms_template:
party_details["payment_terms_template"] = get_pyt_term_template(party.name, party_type, company)
party_details["payment_terms_template"] = get_payment_terms_template(party.name, party_type, company)
if not party_details.get("currency"):
party_details["currency"] = currency
@@ -204,7 +204,7 @@ def set_account_and_due_date(party, account, party_type, company, posting_date,
return out
@frappe.whitelist()
def get_party_account(party_type, party, company):
def get_party_account(party_type, party, company=None):
"""Returns the account for the given `party`.
Will first search in party (Customer / Supplier) record, if not found,
will search in group (Customer Group / Supplier Group),
@@ -318,7 +318,7 @@ def get_due_date(posting_date, party_type, party, company=None, bill_date=None):
due_date = None
if (bill_date or posting_date) and party:
due_date = bill_date or posting_date
template_name = get_pyt_term_template(party, party_type, company)
template_name = get_payment_terms_template(party, party_type, company)
if template_name:
due_date = get_due_date_from_template(template_name, posting_date, bill_date).strftime("%Y-%m-%d")
@@ -425,7 +425,7 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
@frappe.whitelist()
def get_pyt_term_template(party_name, party_type, company=None):
def get_payment_terms_template(party_name, party_type, company=None):
if party_type not in ("Customer", "Supplier"):
return
template = None

View File

@@ -0,0 +1,166 @@
{%- from "templates/print_formats/standard_macros.html" import add_header, render_field, print_value -%}
{%- set einvoice = json.loads(doc.signed_einvoice) -%}
<div class="page-break">
<div {% if print_settings.repeat_header_footer %} id="header-html" class="hidden-pdf" {% endif %}>
{% if letter_head and not no_letterhead %}
<div class="letter-head">{{ letter_head }}</div>
{% endif %}
<div class="print-heading">
<h2>E Invoice<br><small>{{ doc.name }}</small></h2>
</div>
</div>
{% if print_settings.repeat_header_footer %}
<div id="footer-html" class="visible-pdf">
{% if not no_letterhead and footer %}
<div class="letter-head-footer">
{{ footer }}
</div>
{% endif %}
<p class="text-center small page-number visible-pdf">
{{ _("Page {0} of {1}").format('<span class="page"></span>', '<span class="topage"></span>') }}
</p>
</div>
{% endif %}
<div class="row section-break" style="border-bottom: 1px solid #d1d8dd; padding-bottom: 10px;">
<h5 class="font-bold" style="margin-left: 15px; margin-top: 0px;">1. Transaction Details</h5>
<div class="col-xs-7 column-break">
<div class="row data-field">
<div class="col-xs-4"><label>IRN</label></div>
<div class="col-xs-8 value">{{ einvoice.Irn }}</div>
</div>
<div class="row data-field">
<div class="col-xs-4"><label>Ack. No</label></div>
<div class="col-xs-8 value">{{ einvoice.AckNo }}</div>
</div>
<div class="row data-field">
<div class="col-xs-4"><label>Ack. Date</label></div>
<div class="col-xs-8 value">{{ frappe.utils.format_datetime(einvoice.AckDt, "dd/MM/yyyy hh:mm:ss") }}</div>
</div>
<div class="row data-field">
<div class="col-xs-4"><label>Category</label></div>
<div class="col-xs-8 value">{{ einvoice.TranDtls.SupTyp }}</div>
</div>
<div class="row data-field">
<div class="col-xs-4"><label>Document Type</label></div>
<div class="col-xs-8 value">{{ einvoice.DocDtls.Typ }}</div>
</div>
<div class="row data-field">
<div class="col-xs-4"><label>Document No</label></div>
<div class="col-xs-8 value">{{ einvoice.DocDtls.No }}</div>
</div>
</div>
<div class="col-xs-5 column-break">
<img src="{{ doc.qrcode_image }}" alt="QRCode Image" style="
width: 175px; height: 175px;
float: right; border: 1px solid gray;
display: flex; align-items: center; justify-content: center;
">
</div>
</div>
<div class="row section-break" style="border-bottom: 1px solid #d1d8dd; padding-bottom: 10px;">
<h5 class="font-bold" style="margin-left: 15px; margin-bottom: 0px;">2. Party Details</h5>
{%- set seller = einvoice.SellerDtls -%}
<div class="col-xs-6 column-break">
<h5 style="margin-bottom: 5px;">Seller</h5>
<p>{{ seller.Gstin }}</p>
<p>{{ seller.LglNm }}</p>
<p>{{ seller.Addr1 }}</p>
{%- if seller.Addr2 -%} <p>{{ seller.Addr2 }}</p> {% endif %}
<p>{{ seller.Loc }}</p>
<p>{{ frappe.db.get_value("Address", doc.company_address, "gst_state") }} - {{ seller.Pin }}</p>
{%- if einvoice.ShipDtls -%}
{%- set shipping = einvoice.ShipDtls -%}
<h5 style="margin-bottom: 5px;">Shipping</h5>
<p>{{ shipping.Gstin }}</p>
<p>{{ shipping.LglNm }}</p>
<p>{{ shipping.Addr1 }}</p>
{%- if shipping.Addr2 -%} <p>{{ shipping.Addr2 }}</p> {% endif %}
<p>{{ shipping.Loc }}</p>
<p>{{ frappe.db.get_value("Address", doc.shipping_address_name, "gst_state") }} - {{ shipping.Pin }}</p>
{% endif %}
</div>
{%- set buyer = einvoice.BuyerDtls -%}
<div class="col-xs-6 column-break">
<h5 style="margin-bottom: 5px;">Buyer</h5>
<p>{{ buyer.Gstin }}</p>
<p>{{ buyer.LglNm }}</p>
<p>{{ buyer.Addr1 }}</p>
{%- if buyer.Addr2 -%} <p>{{ buyer.Addr2 }}</p> {% endif %}
<p>{{ buyer.Loc }}</p>
<p>{{ frappe.db.get_value("Address", doc.customer_address, "gst_state") }} - {{ buyer.Pin }}</p>
</div>
</div>
<div style="overflow-x: auto;">
<h5 class="font-bold" style="margin-bottom: 0px;">3. Item Details</h5>
<table class="table table-bordered">
<thead>
<tr>
<th class="text-left" style="width: 3%;">Sr. No.</th>
<th class="text-left">Item</th>
<th class="text-left" style="width: 10%;">HSN Code</th>
<th class="text-left" style="width: 5%;">Qty</th>
<th class="text-left" style="width: 5%;">UOM</th>
<th class="text-left">Rate</th>
<th class="text-left" style="width: 5%;">Discount</th>
<th class="text-left">Taxable Amount</th>
<th class="text-left" style="width: 7%;">Tax Rate</th>
<th class="text-left" style="width: 5%;">Other Charges</th>
<th class="text-left">Total</th>
</tr>
</thead>
<tbody>
{% for item in einvoice.ItemList %}
<tr>
<td class="text-left" style="width: 3%;">{{ item.SlNo }}</td>
<td class="text-left">{{ item.PrdDesc }}</td>
<td class="text-left" style="width: 10%;">{{ item.HsnCd }}</td>
<td class="text-right" style="width: 5%;">{{ item.Qty }}</td>
<td class="text-left" style="width: 5%;">{{ item.Unit }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(item.UnitPrice, None, "INR") }}</td>
<td class="text-right" style="width: 5%;">{{ frappe.utils.fmt_money(item.Discount, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(item.AssAmt, None, "INR") }}</td>
<td class="text-right" style="width: 7%;">{{ item.GstRt + item.CesRt }} %</td>
<td class="text-right" style="width: 5%;">{{ frappe.utils.fmt_money(0, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(item.TotItemVal, None, "INR") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div style="overflow-x: auto;">
<h5 class="font-bold" style="margin-bottom: 0px;">4. Value Details</h5>
<table class="table table-bordered">
<thead>
<tr>
<th class="text-left">Taxable Amount</th>
<th class="text-left">CGST</th>
<th class="text-left"">SGST</th>
<th class="text-left">IGST</th>
<th class="text-left">CESS</th>
<th class="text-left" style="width: 10%;">State CESS</th>
<th class="text-left">Discount</th>
<th class="text-left" style="width: 10%;">Other Charges</th>
<th class="text-left" style="width: 10%;">Round Off</th>
<th class="text-left">Total Value</th>
</tr>
</thead>
<tbody>
{%- set value_details = einvoice.ValDtls -%}
<tr>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.AssVal, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.CgstVal, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.SgstVal, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.IgstVal, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.CesVal, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(0, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.Discount, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.OthChrg, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.RndOffAmt, None, "INR") }}</td>
<td class="text-right">{{ frappe.utils.fmt_money(value_details.TotInvVal, None, "INR") }}</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,24 @@
{
"align_labels_right": 1,
"creation": "2020-10-10 18:01:21.032914",
"custom_format": 0,
"default_print_language": "en-US",
"disabled": 1,
"doc_type": "Sales Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "",
"idx": 0,
"line_breaks": 1,
"modified": "2020-10-23 19:54:40.634936",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GST E-Invoice",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Jinja",
"raw_printing": 0,
"show_section_headings": 1,
"standard": "Yes"
}

View File

@@ -49,7 +49,10 @@ class TestAccountBalance(unittest.TestCase):
},
]
self.assertEqual(expected_data, report[1])
expected_data = sorted(expected_data, key=lambda k:k['account'])
output = sorted(report[1], key=lambda k:k['account'])
self.assertEqual(expected_data, output)
def make_sales_invoice():
frappe.set_user("Administrator")

View File

@@ -42,11 +42,13 @@
{% if(filters.show_future_payments) { %}
{% var balance_row = data.slice(-1).pop();
var range1 = report.columns[11].label;
var range2 = report.columns[12].label;
var range3 = report.columns[13].label;
var range4 = report.columns[14].label;
var range5 = report.columns[15].label;
var start = filters.based_on_payment_terms ? 13 : 11;
var range1 = report.columns[start].label;
var range2 = report.columns[start+1].label;
var range3 = report.columns[start+2].label;
var range4 = report.columns[start+3].label;
var range5 = report.columns[start+4].label;
var range6 = report.columns[start+5].label;
%}
{% if(balance_row) { %}
<table class="table table-bordered table-condensed">
@@ -70,20 +72,34 @@
<th>{%= __(range3) %}</th>
<th>{%= __(range4) %}</th>
<th>{%= __(range5) %}</th>
<th>{%= __(range6) %}</th>
<th>{%= __("Total") %}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{%= __("Total Outstanding") %}</td>
<td class="text-right">{%= format_number(balance_row["range1"], null, 2) %}</td>
<td class="text-right">{%= format_currency(balance_row["range2"]) %}</td>
<td class="text-right">{%= format_currency(balance_row["range3"]) %}</td>
<td class="text-right">{%= format_currency(balance_row["range4"]) %}</td>
<td class="text-right">{%= format_currency(balance_row["range5"]) %}</td>
<td class="text-right">
{%= format_number(balance_row["age"], null, 2) %}
</td>
<td class="text-right">
{%= format_currency(balance_row["range1"], data[data.length-1]["currency"]) %}
</td>
<td class="text-right">
{%= format_currency(balance_row["range2"], data[data.length-1]["currency"]) %}
</td>
<td class="text-right">
{%= format_currency(balance_row["range3"], data[data.length-1]["currency"]) %}
</td>
<td class="text-right">
{%= format_currency(balance_row["range4"], data[data.length-1]["currency"]) %}
</td>
<td class="text-right">
{%= format_currency(balance_row["range5"], data[data.length-1]["currency"]) %}
</td>
<td class="text-right">
{%= format_currency(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) %}
</td>
</td>
</tr>
<td>{%= __("Future Payments") %}</td>
<td></td>
@@ -91,6 +107,7 @@
<td></td>
<td></td>
<td></td>
<td></td>
<td class="text-right">
{%= format_currency(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) %}
</td>
@@ -101,6 +118,7 @@
<th></th>
<th></th>
<th></th>
<th></th>
<th class="text-right">
{%= format_currency(flt(balance_row["outstanding"] - balance_row[("future_amount")]), data[data.length-1]["currency"]) %}</th>
</tr>
@@ -218,15 +236,15 @@
<td></td>
<td style="text-align: right"><b>{%= __("Total") %}</b></td>
<td style="text-align: right">
{%= format_currency(data[i]["invoiced"], data[0]["currency"] ) %}</td>
{%= format_currency(data[i]["invoiced"], data[i]["currency"] ) %}</td>
{% if(!filters.show_future_payments) { %}
<td style="text-align: right">
{%= format_currency(data[i]["paid"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[0]["currency"]) %} </td>
{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} </td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["outstanding"], data[0]["currency"]) %}</td>
{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
{% if(filters.show_future_payments) { %}
{% if(report.report_name === "Accounts Receivable") { %}
@@ -234,8 +252,8 @@
{%= data[i]["po_no"] %}</td>
{% } %}
<td style="text-align: right">{%= data[i]["future_ref"] %}</td>
<td style="text-align: right">{%= format_currency(data[i]["future_amount"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["remaining_balance"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}</td>
{% } %}
{% } %}
{% } else { %}
@@ -256,10 +274,10 @@
{% } else { %}
<td><b>{%= __("Total") %}</b></td>
{% } %}
<td style="text-align: right">{%= format_currency(data[i]["invoiced"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["paid"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["outstanding"], data[0]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
{% } %}
{% } %}
</tr>

View File

@@ -160,6 +160,8 @@ class ReceivablePayableReport(object):
else:
# advance / unlinked payment or other adjustment
row.paid -= gle_balance
if gle.cost_center:
row.cost_center = gle.cost_center
def update_sub_total_row(self, row, party):
total_row = self.total_row_map.get(party)
@@ -210,7 +212,6 @@ class ReceivablePayableReport(object):
for key, row in self.voucher_balance.items():
row.outstanding = flt(row.invoiced - row.paid - row.credit_note, self.currency_precision)
row.invoice_grand_total = row.invoiced
if abs(row.outstanding) > 1.0/10 ** self.currency_precision:
# non-zero oustanding, we must consider this row
@@ -577,7 +578,7 @@ class ReceivablePayableReport(object):
self.gl_entries = frappe.db.sql("""
select
name, posting_date, account, party_type, party, voucher_type, voucher_no,
name, posting_date, account, party_type, party, voucher_type, voucher_no, cost_center,
against_voucher_type, against_voucher, account_currency, remarks, {0}
from
`tabGL Entry`
@@ -741,6 +742,7 @@ class ReceivablePayableReport(object):
self.add_column(_("Customer Contact"), fieldname='customer_primary_contact',
fieldtype='Link', options='Contact')
self.add_column(label=_('Cost Center'), fieldname='cost_center', fieldtype='Data')
self.add_column(label=_('Voucher Type'), fieldname='voucher_type', fieldtype='Data')
self.add_column(label=_('Voucher No'), fieldname='voucher_no', fieldtype='Dynamic Link',
options='voucher_type', width=180)

View File

@@ -15,15 +15,51 @@ def execute(filters=None):
return columns, data
def get_columns():
return [
_("Payment Document") + "::130",
_("Payment Entry") + ":Dynamic Link/"+_("Payment Document")+":110",
_("Posting Date") + ":Date:100",
_("Cheque/Reference No") + "::120",
_("Clearance Date") + ":Date:100",
_("Against Account") + ":Link/Account:170",
_("Amount") + ":Currency:120"
]
columns = [{
"label": _("Payment Document Type"),
"fieldname": "payment_document_type",
"fieldtype": "Link",
"options": "Doctype",
"width": 130
},
{
"label": _("Payment Entry"),
"fieldname": "payment_entry",
"fieldtype": "Dynamic Link",
"options": "payment_document_type",
"width": 140
},
{
"label": _("Posting Date"),
"fieldname": "posting_date",
"fieldtype": "Date",
"width": 100
},
{
"label": _("Cheque/Reference No"),
"fieldname": "cheque_no",
"width": 120
},
{
"label": _("Clearance Date"),
"fieldname": "clearance_date",
"fieldtype": "Date",
"width": 100
},
{
"label": _("Against Account"),
"fieldname": "against",
"fieldtype": "Link",
"options": "Account",
"width": 170
},
{
"label": _("Amount"),
"fieldname": "amount",
"width": 120
}]
return columns
def get_conditions(filters):
conditions = ""

View File

@@ -165,7 +165,7 @@ def add_data_for_operating_activities(
if profit_data:
profit_data.update({
"indent": 1,
"parent_account": get_mapper_for(light_mappers, position=0)['section_header']
"parent_account": get_mapper_for(light_mappers, position=1)['section_header']
})
data.append(profit_data)
section_data.append(profit_data)
@@ -312,10 +312,10 @@ def add_data_for_other_activities(
def compute_data(filters, company_currency, profit_data, period_list, light_mappers, full_mapper):
data = []
operating_activities_mapper = get_mapper_for(light_mappers, position=0)
operating_activities_mapper = get_mapper_for(light_mappers, position=1)
other_mappers = [
get_mapper_for(light_mappers, position=1),
get_mapper_for(light_mappers, position=2)
get_mapper_for(light_mappers, position=2),
get_mapper_for(light_mappers, position=3)
]
if operating_activities_mapper:
@@ -396,7 +396,7 @@ def _get_account_type_based_data(filters, account_names, period_list, accumulate
gl_sum = frappe.db.sql_list("""
select sum(credit) - sum(debit)
from `tabGL Entry`
where company=%s and posting_date >= %s and posting_date <= %s
where company=%s and posting_date >= %s and posting_date <= %s
and voucher_type != 'Period Closing Voucher'
and account in ( SELECT name FROM tabAccount WHERE name IN (%s)
OR parent_account IN (%s))
@@ -405,7 +405,7 @@ def _get_account_type_based_data(filters, account_names, period_list, accumulate
gl_sum = frappe.db.sql_list("""
select sum(credit) - sum(debit)
from `tabGL Entry`
where company=%s and posting_date >= %s and posting_date <= %s
where company=%s and posting_date >= %s and posting_date <= %s
and voucher_type != 'Period Closing Voucher'
and account in ( SELECT name FROM tabAccount WHERE name IN (%s)
OR parent_account IN (%s))

View File

@@ -206,7 +206,7 @@ def get_data(companies, root_type, balance_must_be, fiscal_year, filters=None, i
set_gl_entries_by_account(fiscal_year.year_start_date,
fiscal_year.year_end_date, root.lft, root.rgt, filters,
gl_entries_by_account, accounts_by_name, ignore_closing_entries=False)
gl_entries_by_account, accounts_by_name, accounts, ignore_closing_entries=False)
calculate_values(accounts_by_name, gl_entries_by_account, companies, fiscal_year, filters)
accumulate_values_into_parents(accounts, accounts_by_name, companies)
@@ -224,8 +224,7 @@ def get_company_currency(filters=None):
def calculate_values(accounts_by_name, gl_entries_by_account, companies, fiscal_year, filters):
for entries in gl_entries_by_account.values():
for entry in entries:
key = entry.account_number or entry.account_name
d = accounts_by_name.get(key)
d = accounts_by_name.get(entry.account_name)
if d:
for company in companies:
# check if posting date is within the period
@@ -240,7 +239,8 @@ def accumulate_values_into_parents(accounts, accounts_by_name, companies):
"""accumulate children's values in parent accounts"""
for d in reversed(accounts):
if d.parent_account:
account = d.parent_account.split('-')[0].strip()
account = d.parent_account_name
if not accounts_by_name.get(account):
continue
@@ -251,16 +251,34 @@ def accumulate_values_into_parents(accounts, accounts_by_name, companies):
accounts_by_name[account]["opening_balance"] = \
accounts_by_name[account].get("opening_balance", 0.0) + d.get("opening_balance", 0.0)
def get_account_heads(root_type, companies, filters):
accounts = get_accounts(root_type, filters)
if not accounts:
return None, None
accounts = update_parent_account_names(accounts)
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
return accounts, accounts_by_name
def update_parent_account_names(accounts):
"""Update parent_account_name in accounts list.
parent_name is `name` of parent account which could have other prefix
of account_number and suffix of company abbr. This function adds key called
`parent_account_name` which does not have such prefix/suffix.
"""
name_to_account_map = { d.name : d.account_name for d in accounts }
for account in accounts:
if account.parent_account:
account["parent_account_name"] = name_to_account_map[account.parent_account]
return accounts
def get_companies(filters):
companies = {}
all_companies = get_subsidiary_companies(filters.get('company'))
@@ -325,7 +343,7 @@ def prepare_data(accounts, fiscal_year, balance_must_be, companies, company_curr
return data
def set_gl_entries_by_account(from_date, to_date, root_lft, root_rgt, filters, gl_entries_by_account,
accounts_by_name, ignore_closing_entries=False):
accounts_by_name, accounts, ignore_closing_entries=False):
"""Returns a dict like { "account": [gl entries], ... }"""
company_lft, company_rgt = frappe.get_cached_value('Company',
@@ -367,16 +385,32 @@ def set_gl_entries_by_account(from_date, to_date, root_lft, root_rgt, filters, g
convert_to_presentation_currency(gl_entries, currency_info)
for entry in gl_entries:
key = entry.account_number or entry.account_name
validate_entries(key, entry, accounts_by_name)
gl_entries_by_account.setdefault(key, []).append(entry)
account_name = entry.account_name
validate_entries(account_name, entry, accounts_by_name, accounts)
gl_entries_by_account.setdefault(account_name, []).append(entry)
return gl_entries_by_account
def validate_entries(key, entry, accounts_by_name):
def get_account_details(account):
return frappe.get_cached_value('Account', account, ['name', 'report_type', 'root_type', 'company',
'is_group', 'account_name', 'account_number', 'parent_account', 'lft', 'rgt'], as_dict=1)
def validate_entries(key, entry, accounts_by_name, accounts):
if key not in accounts_by_name:
field = "Account number" if entry.account_number else "Account name"
frappe.throw(_("{0} {1} is not present in the parent company").format(field, key))
args = get_account_details(entry.account)
if args.parent_account:
parent_args = get_account_details(args.parent_account)
args.update({
'lft': parent_args.lft + 1,
'rgt': parent_args.rgt - 1,
'root_type': parent_args.root_type,
'report_type': parent_args.report_type
})
accounts_by_name.setdefault(key, args)
accounts.append(args)
def get_additional_conditions(from_date, ignore_closing_entries, filters):
additional_conditions = []
@@ -422,8 +456,7 @@ def filter_accounts(accounts, depth=10):
parent_children_map = {}
accounts_by_name = {}
for d in accounts:
key = d.account_number or d.account_name
accounts_by_name[key] = d
accounts_by_name[d.account_name] = d
parent_children_map.setdefault(d.parent_account or None, []).append(d)
filtered_accounts = []

View File

@@ -294,7 +294,7 @@ def get_accounts(company, root_type):
where company=%s and root_type=%s order by lft""", (company, root_type), as_dict=True)
def filter_accounts(accounts, depth=10):
def filter_accounts(accounts, depth=20):
parent_children_map = {}
accounts_by_name = {}
for d in accounts:

View File

@@ -36,5 +36,20 @@ frappe.query_reports["Gross Profit"] = {
"options": "Invoice\nItem Code\nItem Group\nBrand\nWarehouse\nCustomer\nCustomer Group\nTerritory\nSales Person\nProject",
"default": "Invoice"
},
]
],
"tree": true,
"name_field": "parent",
"parent_field": "parent_invoice",
"initial_depth": 3,
"formatter": function(value, row, column, data, default_formatter) {
value = default_formatter(value, row, column, data);
if (data && data.indent == 0.0) {
value = $(`<span>${value}</span>`);
var $value = $(value).css("font-weight", "bold");
value = $value.wrap("<p></p>").parent().html();
}
return value;
},
}

View File

@@ -1,16 +1,20 @@
{
"add_total_row": 1,
"add_total_row": 0,
"columns": [],
"creation": "2013-02-25 17:03:34",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"filters": [],
"idx": 3,
"is_standard": "Yes",
"modified": "2020-08-13 11:26:39.112352",
"modified": "2021-08-19 18:57:07.468202",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Gross Profit",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "Sales Invoice",
"report_name": "Gross Profit",
"report_type": "Script Report",

View File

@@ -41,16 +41,44 @@ def execute(filters=None):
columns = get_columns(group_wise_columns, filters)
for src in gross_profit_data.grouped_data:
if filters.group_by == 'Invoice':
get_data_when_grouped_by_invoice(columns, gross_profit_data, filters, group_wise_columns, data)
else:
get_data_when_not_grouped_by_invoice(gross_profit_data, filters, group_wise_columns, data)
return columns, data
def get_data_when_grouped_by_invoice(columns, gross_profit_data, filters, group_wise_columns, data):
column_names = get_column_names()
# to display item as Item Code: Item Name
columns[0] = 'Sales Invoice:Link/Item:300'
# removing Item Code and Item Name columns
del columns[4:6]
for src in gross_profit_data.si_list:
row = frappe._dict()
row.indent = src.indent
row.parent_invoice = src.parent_invoice
row.currency = filters.currency
for col in group_wise_columns.get(scrub(filters.group_by)):
row[column_names[col]] = src.get(col)
data.append(row)
def get_data_when_not_grouped_by_invoice(gross_profit_data, filters, group_wise_columns, data):
for idx, src in enumerate(gross_profit_data.grouped_data):
row = []
for col in group_wise_columns.get(scrub(filters.group_by)):
row.append(src.get(col))
row.append(filters.currency)
if idx == len(gross_profit_data.grouped_data)-1:
row[0] = frappe.bold("Total")
data.append(row)
return columns, data
def get_columns(group_wise_columns, filters):
columns = []
column_map = frappe._dict({
@@ -91,12 +119,38 @@ def get_columns(group_wise_columns, filters):
return columns
def get_column_names():
return frappe._dict({
'parent': 'sales_invoice',
'customer': 'customer',
'customer_group': 'customer_group',
'posting_date': 'posting_date',
'item_code': 'item_code',
'item_name': 'item_name',
'item_group': 'item_group',
'brand': 'brand',
'description': 'description',
'warehouse': 'warehouse',
'qty': 'qty',
'base_rate': 'avg._selling_rate',
'buying_rate': 'valuation_rate',
'base_amount': 'selling_amount',
'buying_amount': 'buying_amount',
'gross_profit': 'gross_profit',
'gross_profit_percent': 'gross_profit_%',
'project': 'project'
})
class GrossProfitGenerator(object):
def __init__(self, filters=None):
self.data = []
self.average_buying_rate = {}
self.filters = frappe._dict(filters)
self.load_invoice_items()
if filters.group_by == 'Invoice':
self.group_items_by_invoice()
self.load_stock_ledger_entries()
self.load_product_bundle()
self.load_non_stock_items()
@@ -110,7 +164,12 @@ class GrossProfitGenerator(object):
self.currency_precision = cint(frappe.db.get_default("currency_precision")) or 3
self.float_precision = cint(frappe.db.get_default("float_precision")) or 2
for row in self.si_list:
grouped_by_invoice = True if self.filters.get("group_by") == "Invoice" else False
if grouped_by_invoice:
buying_amount = 0
for row in reversed(self.si_list):
if self.skip_row(row, self.product_bundles):
continue
@@ -132,12 +191,20 @@ class GrossProfitGenerator(object):
row.buying_amount = flt(self.get_buying_amount(row, row.item_code),
self.currency_precision)
if grouped_by_invoice:
if row.indent == 1.0:
buying_amount += row.buying_amount
elif row.indent == 0.0:
row.buying_amount = buying_amount
buying_amount = 0
# get buying rate
if row.qty:
row.buying_rate = flt(row.buying_amount / row.qty, self.float_precision)
row.base_rate = flt(row.base_amount / row.qty, self.float_precision)
else:
row.buying_rate, row.base_rate = 0.0, 0.0
if self.is_not_invoice_row(row):
row.buying_rate, row.base_rate = 0.0, 0.0
# calculate gross profit
row.gross_profit = flt(row.base_amount - row.buying_amount, self.currency_precision)
@@ -154,6 +221,15 @@ class GrossProfitGenerator(object):
def get_average_rate_based_on_group_by(self):
# sum buying / selling totals for group
self.totals = frappe._dict(
qty=0,
base_amount=0,
buying_amount=0,
gross_profit=0,
gross_profit_percent=0,
base_rate=0,
buying_rate=0
)
for key in list(self.grouped):
if self.filters.get("group_by") != "Invoice":
for i, row in enumerate(self.grouped[key]):
@@ -165,6 +241,7 @@ class GrossProfitGenerator(object):
new_row.base_amount += flt(row.base_amount, self.currency_precision)
new_row = self.set_average_rate(new_row)
self.grouped_data.append(new_row)
self.add_to_totals(new_row)
else:
for i, row in enumerate(self.grouped[key]):
if row.parent in self.returned_invoices \
@@ -173,19 +250,32 @@ class GrossProfitGenerator(object):
for returned_item_row in returned_item_rows:
row.qty += returned_item_row.qty
row.base_amount += flt(returned_item_row.base_amount, self.currency_precision)
row.buying_amount = flt(row.qty * row.buying_rate, self.currency_precision)
if row.qty or row.base_amount:
row.buying_amount = flt(flt(row.qty) * flt(row.buying_rate), self.currency_precision)
if (flt(row.qty) or row.base_amount) and self.is_not_invoice_row(row):
row = self.set_average_rate(row)
self.grouped_data.append(row)
self.add_to_totals(row)
self.set_average_gross_profit(self.totals)
self.grouped_data.append(self.totals)
def is_not_invoice_row(self, row):
return (self.filters.get("group_by") == "Invoice" and row.indent != 0.0) or self.filters.get("group_by") != "Invoice"
def set_average_rate(self, new_row):
self.set_average_gross_profit(new_row)
new_row.buying_rate = flt(new_row.buying_amount / new_row.qty, self.float_precision) if new_row.qty else 0
new_row.base_rate = flt(new_row.base_amount / new_row.qty, self.float_precision) if new_row.qty else 0
return new_row
def set_average_gross_profit(self, new_row):
new_row.gross_profit = flt(new_row.base_amount - new_row.buying_amount, self.currency_precision)
new_row.gross_profit_percent = flt(((new_row.gross_profit / new_row.base_amount) * 100.0), self.currency_precision) \
if new_row.base_amount else 0
new_row.buying_rate = flt(new_row.buying_amount / new_row.qty, self.float_precision) if new_row.qty else 0
new_row.base_rate = flt(new_row.base_amount / new_row.qty, self.float_precision) if new_row.qty else 0
return new_row
def add_to_totals(self, new_row):
for key in self.totals:
if new_row.get(key):
self.totals[key] += new_row[key]
def get_returned_invoice_items(self):
returned_invoices = frappe.db.sql("""
@@ -334,6 +424,109 @@ class GrossProfitGenerator(object):
.format(conditions=conditions, sales_person_cols=sales_person_cols,
sales_team_table=sales_team_table, match_cond = get_match_cond('Sales Invoice')), self.filters, as_dict=1)
def group_items_by_invoice(self):
"""
Turns list of Sales Invoice Items to a tree of Sales Invoices with their Items as children.
"""
parents = []
for row in self.si_list:
if row.parent not in parents:
parents.append(row.parent)
parents_index = 0
for index, row in enumerate(self.si_list):
if parents_index < len(parents) and row.parent == parents[parents_index]:
invoice = self.get_invoice_row(row)
self.si_list.insert(index, invoice)
parents_index += 1
else:
# skipping the bundle items rows
if not row.indent:
row.indent = 1.0
row.parent_invoice = row.parent
row.parent = row.item_code
if frappe.db.exists('Product Bundle', row.item_code):
self.add_bundle_items(row, index)
def get_invoice_row(self, row):
return frappe._dict({
'parent_invoice': "",
'indent': 0.0,
'parent': row.parent,
'posting_date': row.posting_date,
'posting_time': row.posting_time,
'project': row.project,
'update_stock': row.update_stock,
'customer': row.customer,
'customer_group': row.customer_group,
'item_code': None,
'item_name': None,
'description': None,
'warehouse': None,
'item_group': None,
'brand': None,
'dn_detail': None,
'delivery_note': None,
'qty': None,
'item_row': None,
'is_return': row.is_return,
'cost_center': row.cost_center,
'base_net_amount': frappe.db.get_value('Sales Invoice', row.parent, 'base_net_total')
})
def add_bundle_items(self, product_bundle, index):
bundle_items = self.get_bundle_items(product_bundle)
for i, item in enumerate(bundle_items):
bundle_item = self.get_bundle_item_row(product_bundle, item)
self.si_list.insert((index+i+1), bundle_item)
def get_bundle_items(self, product_bundle):
return frappe.get_all(
'Product Bundle Item',
filters = {
'parent': product_bundle.item_code
},
fields = ['item_code', 'qty']
)
def get_bundle_item_row(self, product_bundle, item):
item_name, description, item_group, brand = self.get_bundle_item_details(item.item_code)
return frappe._dict({
'parent_invoice': product_bundle.item_code,
'indent': product_bundle.indent + 1,
'parent': item.item_code,
'posting_date': product_bundle.posting_date,
'posting_time': product_bundle.posting_time,
'project': product_bundle.project,
'customer': product_bundle.customer,
'customer_group': product_bundle.customer_group,
'item_code': item.item_code,
'item_name': item_name,
'description': description,
'warehouse': product_bundle.warehouse,
'item_group': item_group,
'brand': brand,
'dn_detail': product_bundle.dn_detail,
'delivery_note': product_bundle.delivery_note,
'qty': (flt(product_bundle.qty) * flt(item.qty)),
'item_row': None,
'is_return': product_bundle.is_return,
'cost_center': product_bundle.cost_center
})
def get_bundle_item_details(self, item_code):
return frappe.db.get_value(
'Item',
item_code,
['item_name', 'description', 'item_group', 'brand']
)
def load_stock_ledger_entries(self):
res = frappe.db.sql("""select item_code, voucher_type, voucher_no,
voucher_detail_no, stock_value, warehouse, actual_qty as qty

View File

@@ -8,6 +8,7 @@ from frappe.utils import flt
from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import (get_tax_accounts,
get_grand_total, add_total_row, get_display_value, get_group_by_and_display_fields, add_sub_total_row,
get_group_by_conditions)
from erpnext.selling.report.item_wise_sales_history.item_wise_sales_history import get_item_details
def execute(filters=None):
return _execute(filters)
@@ -23,7 +24,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
aii_account_map = get_aii_accounts()
if item_list:
itemised_tax, tax_columns = get_tax_accounts(item_list, columns, company_currency,
doctype="Purchase Invoice", tax_doctype="Purchase Taxes and Charges")
doctype='Purchase Invoice', tax_doctype='Purchase Taxes and Charges')
po_pr_map = get_purchase_receipts_against_purchase_order(item_list)
@@ -35,10 +36,14 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
if filters.get('group_by'):
grand_total = get_grand_total(filters, 'Purchase Invoice')
item_details = get_item_details()
for d in item_list:
if not d.stock_qty:
continue
item_record = item_details.get(d.item_code)
purchase_receipt = None
if d.purchase_receipt:
purchase_receipt = d.purchase_receipt
@@ -49,8 +54,8 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
row = {
'item_code': d.item_code,
'item_name': d.item_name,
'item_group': d.item_group,
'item_name': item_record.item_name if item_record else d.item_name,
'item_group': item_record.item_group if item_record else d.item_group,
'description': d.description,
'invoice': d.parent,
'posting_date': d.posting_date,
@@ -82,10 +87,10 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
for tax in tax_columns:
item_tax = itemised_tax.get(d.name, {}).get(tax, {})
row.update({
frappe.scrub(tax + ' Rate'): item_tax.get("tax_rate", 0),
frappe.scrub(tax + ' Amount'): item_tax.get("tax_amount", 0),
frappe.scrub(tax + ' Rate'): item_tax.get('tax_rate', 0),
frappe.scrub(tax + ' Amount'): item_tax.get('tax_amount', 0),
})
total_tax += flt(item_tax.get("tax_amount"))
total_tax += flt(item_tax.get('tax_amount'))
row.update({
'total_tax': total_tax,
@@ -317,8 +322,9 @@ def get_items(filters, additional_query_columns):
select
`tabPurchase Invoice Item`.`name`, `tabPurchase Invoice Item`.`parent`,
`tabPurchase Invoice`.posting_date, `tabPurchase Invoice`.credit_to, `tabPurchase Invoice`.company,
`tabPurchase Invoice`.supplier, `tabPurchase Invoice`.remarks, `tabPurchase Invoice`.base_net_total, `tabPurchase Invoice Item`.`item_code`,
`tabPurchase Invoice Item`.`item_name`, `tabPurchase Invoice Item`.`item_group`, `tabPurchase Invoice Item`.description,
`tabPurchase Invoice`.supplier, `tabPurchase Invoice`.remarks, `tabPurchase Invoice`.base_net_total,
`tabPurchase Invoice Item`.`item_code`, `tabPurchase Invoice Item`.description,
`tabPurchase Invoice Item`.`item_name`, `tabPurchase Invoice Item`.`item_group`,
`tabPurchase Invoice Item`.`project`, `tabPurchase Invoice Item`.`purchase_order`,
`tabPurchase Invoice Item`.`purchase_receipt`, `tabPurchase Invoice Item`.`po_detail`,
`tabPurchase Invoice Item`.`expense_account`, `tabPurchase Invoice Item`.`stock_qty`,

View File

@@ -8,6 +8,7 @@ from frappe.utils import flt, cstr
from frappe.model.meta import get_field_precision
from frappe.utils.xlsxutils import handle_html
from erpnext.accounts.report.sales_register.sales_register import get_mode_of_payments
from erpnext.selling.report.item_wise_sales_history.item_wise_sales_history import get_item_details, get_customer_details
def execute(filters=None):
return _execute(filters)
@@ -17,7 +18,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
columns = get_columns(additional_table_columns, filters)
company_currency = frappe.get_cached_value('Company', filters.get("company"), "default_currency")
company_currency = frappe.get_cached_value('Company', filters.get('company'), 'default_currency')
item_list = get_items(filters, additional_query_columns)
if item_list:
@@ -34,7 +35,13 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
if filters.get('group_by'):
grand_total = get_grand_total(filters, 'Sales Invoice')
customer_details = get_customer_details()
item_details = get_item_details()
for d in item_list:
customer_record = customer_details.get(d.customer)
item_record = item_details.get(d.item_code)
delivery_note = None
if d.delivery_note:
delivery_note = d.delivery_note
@@ -46,14 +53,14 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
row = {
'item_code': d.item_code,
'item_name': d.item_name,
'item_group': d.item_group,
'item_name': item_record.item_name if item_record else d.item_name,
'item_group': item_record.item_group if item_record else d.item_group,
'description': d.description,
'invoice': d.parent,
'posting_date': d.posting_date,
'customer': d.customer,
'customer_name': d.customer_name,
'customer_group': d.customer_group,
'customer_name': customer_record.customer_name,
'customer_group': customer_record.customer_group,
}
if additional_query_columns:
@@ -91,10 +98,10 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
for tax in tax_columns:
item_tax = itemised_tax.get(d.name, {}).get(tax, {})
row.update({
frappe.scrub(tax + ' Rate'): item_tax.get("tax_rate", 0),
frappe.scrub(tax + ' Amount'): item_tax.get("tax_amount", 0),
frappe.scrub(tax + ' Rate'): item_tax.get('tax_rate', 0),
frappe.scrub(tax + ' Amount'): item_tax.get('tax_amount', 0),
})
total_tax += flt(item_tax.get("tax_amount"))
total_tax += flt(item_tax.get('tax_amount'))
row.update({
'total_tax': total_tax,
@@ -227,7 +234,7 @@ def get_columns(additional_table_columns, filters):
if filters.get('group_by') != 'Terriotory':
columns.extend([
{
'label': _("Territory"),
'label': _('Territory'),
'fieldname': 'territory',
'fieldtype': 'Link',
'options': 'Territory',
@@ -382,13 +389,13 @@ def get_items(filters, additional_query_columns):
`tabSales Invoice`.posting_date, `tabSales Invoice`.debit_to,
`tabSales Invoice`.project, `tabSales Invoice`.customer, `tabSales Invoice`.remarks,
`tabSales Invoice`.territory, `tabSales Invoice`.company, `tabSales Invoice`.base_net_total,
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.item_name,
`tabSales Invoice Item`.item_group, `tabSales Invoice Item`.description, `tabSales Invoice Item`.sales_order,
`tabSales Invoice Item`.delivery_note, `tabSales Invoice Item`.income_account,
`tabSales Invoice Item`.cost_center, `tabSales Invoice Item`.stock_qty,
`tabSales Invoice Item`.stock_uom, `tabSales Invoice Item`.base_net_rate,
`tabSales Invoice Item`.base_net_amount, `tabSales Invoice`.customer_name,
`tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.description,
`tabSales Invoice Item`.`item_name`, `tabSales Invoice Item`.`item_group`,
`tabSales Invoice Item`.sales_order, `tabSales Invoice Item`.delivery_note,
`tabSales Invoice Item`.income_account, `tabSales Invoice Item`.cost_center,
`tabSales Invoice Item`.stock_qty, `tabSales Invoice Item`.stock_uom,
`tabSales Invoice Item`.base_net_rate, `tabSales Invoice Item`.base_net_amount,
`tabSales Invoice`.customer_name, `tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
`tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom, `tabSales Invoice Item`.qty {0}
from `tabSales Invoice`, `tabSales Invoice Item`
where `tabSales Invoice`.name = `tabSales Invoice Item`.parent
@@ -425,14 +432,14 @@ def get_deducted_taxes():
return frappe.db.sql_list("select name from `tabPurchase Taxes and Charges` where add_deduct_tax = 'Deduct'")
def get_tax_accounts(item_list, columns, company_currency,
doctype="Sales Invoice", tax_doctype="Sales Taxes and Charges"):
doctype='Sales Invoice', tax_doctype='Sales Taxes and Charges'):
import json
item_row_map = {}
tax_columns = []
invoice_item_row = {}
itemised_tax = {}
tax_amount_precision = get_field_precision(frappe.get_meta(tax_doctype).get_field("tax_amount"),
tax_amount_precision = get_field_precision(frappe.get_meta(tax_doctype).get_field('tax_amount'),
currency=company_currency) or 2
for d in item_list:
@@ -477,8 +484,8 @@ def get_tax_accounts(item_list, columns, company_currency,
tax_rate = tax_data
tax_amount = 0
if charge_type == "Actual" and not tax_rate:
tax_rate = "NA"
if charge_type == 'Actual' and not tax_rate:
tax_rate = 'NA'
item_net_amount = sum([flt(d.base_net_amount)
for d in item_row_map.get(parent, {}).get(item_code, [])])
@@ -492,17 +499,17 @@ def get_tax_accounts(item_list, columns, company_currency,
if (doctype == 'Purchase Invoice' and name in deducted_tax) else tax_value)
itemised_tax.setdefault(d.name, {})[description] = frappe._dict({
"tax_rate": tax_rate,
"tax_amount": tax_value
'tax_rate': tax_rate,
'tax_amount': tax_value
})
except ValueError:
continue
elif charge_type == "Actual" and tax_amount:
elif charge_type == 'Actual' and tax_amount:
for d in invoice_item_row.get(parent, []):
itemised_tax.setdefault(d.name, {})[description] = frappe._dict({
"tax_rate": "NA",
"tax_amount": flt((tax_amount * d.base_net_amount) / d.base_net_total,
'tax_rate': 'NA',
'tax_amount': flt((tax_amount * d.base_net_amount) / d.base_net_total,
tax_amount_precision)
})
@@ -564,7 +571,7 @@ def add_total_row(data, filters, prev_group_by_value, item, total_row_map,
})
total_row_map.setdefault('total_row', {
subtotal_display_field: "Total",
subtotal_display_field: 'Total',
'stock_qty': 0.0,
'amount': 0.0,
'bold': 1,

View File

@@ -59,23 +59,111 @@ def validate_filters(filters):
def get_columns(filters):
return [
_("Payment Document") + ":: 100",
_("Payment Entry") + ":Dynamic Link/"+_("Payment Document")+":140",
_("Party Type") + "::100",
_("Party") + ":Dynamic Link/Party Type:140",
_("Posting Date") + ":Date:100",
_("Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == _("Outgoing") else ":Link/Sales Invoice:130"),
_("Invoice Posting Date") + ":Date:130",
_("Payment Due Date") + ":Date:130",
_("Debit") + ":Currency:120",
_("Credit") + ":Currency:120",
_("Remarks") + "::150",
_("Age") +":Int:40",
"0-30:Currency:100",
"30-60:Currency:100",
"60-90:Currency:100",
_("90-Above") + ":Currency:100",
_("Delay in payment (Days)") + "::150"
{
"fieldname": "payment_document",
"label": _("Payment Document Type"),
"fieldtype": "Data",
"width": 100
},
{
"fieldname": "payment_entry",
"label": _("Payment Document"),
"fieldtype": "Dynamic Link",
"options": "payment_document",
"width": 160
},
{
"fieldname": "party_type",
"label": _("Party Type"),
"fieldtype": "Data",
"width": 100
},
{
"fieldname": "party",
"label": _("Party"),
"fieldtype": "Dynamic Link",
"options": "party_type",
"width": 160
},
{
"fieldname": "posting_date",
"label": _("Posting Date"),
"fieldtype": "Date",
"width": 100
},
{
"fieldname": "invoice",
"label": _("Invoice"),
"fieldtype": "Link",
"options": "Purchase Invoice" if filters.get("payment_type") == _("Outgoing") else "Sales Invoice",
"width": 160
},
{
"fieldname": "invoice_posting_date",
"label": _("Invoice Posting Date"),
"fieldtype": "Date",
"width": 100
},
{
"fieldname": "due_date",
"label": _("Payment Due Date"),
"fieldtype": "Date",
"width": 100
},
{
"fieldname": "debit",
"label": _("Debit"),
"fieldtype": "Currency",
"width": 140
},
{
"fieldname": "credit",
"label": _("Credit"),
"fieldtype": "Currency",
"width": 140
},
{
"fieldname": "remarks",
"label": _("Remarks"),
"fieldtype": "Data",
"width": 200
},
{
"fieldname": "age",
"label": _("Age"),
"fieldtype": "Int",
"width": 50
},
{
"fieldname": "range1",
"label": _("0-30"),
"fieldtype": "Currency",
"width": 140
},
{
"fieldname": "range2",
"label": _("30-60"),
"fieldtype": "Currency",
"width": 140
},
{
"fieldname": "range3",
"label": _("60-90"),
"fieldtype": "Currency",
"width": 140
},
{
"fieldname": "range4",
"label": _("90 Above"),
"fieldtype": "Currency",
"width": 140
},
{
"fieldname": "delay_in_payment",
"label": _("Delay in payment (Days)"),
"fieldtype": "Int",
"width": 100
}
]
def get_conditions(filters):

View File

@@ -75,7 +75,10 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb
else:
return ((fy.name, fy.year_start_date, fy.year_end_date),)
error_msg = _("""{0} {1} not in any active Fiscal Year.""").format(label, formatdate(transaction_date))
error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(label, formatdate(transaction_date))
if company:
error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company))
if verbose==1: frappe.msgprint(error_msg)
raise FiscalYearError(error_msg)

View File

@@ -78,6 +78,7 @@ frappe.ui.form.on('Asset', {
frappe.ui.form.trigger("Asset", "is_existing_asset");
frm.toggle_display("next_depreciation_date", frm.doc.docstatus < 1);
frm.events.make_schedules_editable(frm);
frm.trigger("toggle_make_depreciation_entry");
if (frm.doc.docstatus==1) {
if (in_list(["Submitted", "Partially Depreciated", "Fully Depreciated"], frm.doc.status)) {
@@ -136,6 +137,20 @@ frappe.ui.form.on('Asset', {
if (frm.doc.docstatus == 0) {
frm.toggle_reqd("finance_books", frm.doc.calculate_depreciation);
frm.set_df_property('depreciation_start_date', 'reqd', 1, frm.doc.name, 'finance_books');
frm.refresh_field('finance_books');
}
},
toggle_make_depreciation_entry: function(frm) {
if (frm.doc.calculate_depreciation){
if (in_list(["Submitted", "Partially Depreciated"], frm.doc.status)){
frm.fields_dict['schedules'].grid.set_column_disp('make_depreciation_entry', true);
} else {
frm.fields_dict['schedules'].grid.set_column_disp('make_depreciation_entry', false);
}
frm.refresh_field('schedules');
}
},
@@ -232,7 +247,7 @@ frappe.ui.form.on('Asset', {
item_code: function(frm) {
if(frm.doc.item_code) {
if(frm.doc.item_code && frm.doc.calculate_depreciation) {
frm.trigger('set_finance_book');
}
},
@@ -323,6 +338,10 @@ frappe.ui.form.on('Asset', {
calculate_depreciation: function(frm) {
frm.toggle_reqd("finance_books", frm.doc.calculate_depreciation);
if (frm.doc.calculate_depreciation) {
frm.trigger('set_finance_book');
}
},
gross_purchase_amount: function(frm) {

View File

@@ -122,11 +122,6 @@ class Asset(AccountsController):
if self.is_existing_asset:
return
docname = self.purchase_receipt or self.purchase_invoice
if docname:
doctype = 'Purchase Receipt' if self.purchase_receipt else 'Purchase Invoice'
date = frappe.db.get_value(doctype, docname, 'posting_date')
if self.available_for_use_date and getdate(self.available_for_use_date) < getdate(self.purchase_date):
frappe.throw(_("Available-for-use Date should be after purchase date"))
@@ -404,9 +399,10 @@ class Asset(AccountsController):
if accumulated_depreciation_after_full_schedule:
accumulated_depreciation_after_full_schedule = max(accumulated_depreciation_after_full_schedule)
asset_value_after_full_schedule = flt(flt(self.gross_purchase_amount) -
flt(accumulated_depreciation_after_full_schedule),
self.precision('gross_purchase_amount'))
asset_value_after_full_schedule = flt(
flt(self.gross_purchase_amount) -
flt(self.opening_accumulated_depreciation) -
flt(accumulated_depreciation_after_full_schedule), self.precision('gross_purchase_amount'))
if (row.expected_value_after_useful_life and
row.expected_value_after_useful_life < asset_value_after_full_schedule):

View File

@@ -34,6 +34,8 @@ def make_depreciation_entry(asset_name, date=None):
date = today()
asset = frappe.get_doc("Asset", asset_name)
validate_asset(asset)
fixed_asset_account, accumulated_depreciation_account, depreciation_expense_account = \
get_depreciation_accounts(asset)
@@ -59,7 +61,7 @@ def make_depreciation_entry(asset_name, date=None):
"credit_in_account_currency": d.depreciation_amount,
"reference_type": "Asset",
"reference_name": asset.name,
"cost_center": ""
"cost_center": depreciation_cost_center
}
debit_entry = {
@@ -101,6 +103,10 @@ def make_depreciation_entry(asset_name, date=None):
return asset
def validate_asset(asset):
if asset.status not in ['Submitted', 'Partially Depreciated']:
frappe.throw(_("Cannot depreciate {0} Asset").format(asset.status))
def get_depreciation_accounts(asset):
fixed_asset_account = accumulated_depreciation_account = depreciation_expense_account = None

View File

@@ -50,6 +50,5 @@ frappe.ui.form.on('Asset Category', {
}
};
});
}
});

View File

@@ -1,5 +1,4 @@
{
"actions": [],
"creation": "2018-05-08 14:44:37.095570",
"doctype": "DocType",
"editable_grid": 1,
@@ -54,8 +53,7 @@
"fieldname": "depreciation_start_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Depreciation Posting Date",
"reqd": 1
"label": "Depreciation Posting Date"
},
{
"default": "0",
@@ -83,10 +81,8 @@
"label": "Rate of Depreciation"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-09-16 12:11:30.631788",
"modified": "2020-12-30 15:43:03.188256",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Finance Book",

View File

@@ -108,7 +108,7 @@ def update_maintenance_log(asset_maintenance, item_code, item_name, task):
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_team_members(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.get_values('Maintenance Team Member', { 'parent': filters.get("maintenance_team") })
return frappe.db.get_values('Maintenance Team Member', { 'parent': filters.get("maintenance_team") }, "team_member")
@frappe.whitelist()
def get_maintenance_log(asset_name):

View File

@@ -12,8 +12,8 @@ from frappe.model.document import Document
class AssetValueAdjustment(Document):
def validate(self):
self.validate_date()
self.set_difference_amount()
self.set_current_asset_value()
self.set_difference_amount()
def on_submit(self):
self.make_depreciation_entry()

View File

@@ -141,31 +141,30 @@ def get_data(filters):
assets_record = frappe.db.get_all("Asset",
filters=conditions,
fields=["name", "asset_name", "department", "cost_center", "purchase_receipt",
fields=["name as asset_id", "asset_name", "department", "cost_center", "purchase_receipt",
"asset_category", "purchase_date", "gross_purchase_amount", "location",
"available_for_use_date", "status", "purchase_invoice", "opening_accumulated_depreciation"])
for asset in assets_record:
asset_value = asset.gross_purchase_amount - flt(asset.opening_accumulated_depreciation) \
- flt(depreciation_amount_map.get(asset.name))
if asset_value:
row = {
"asset_id": asset.name,
"asset_name": asset.asset_name,
"status": asset.status,
"department": asset.department,
"cost_center": asset.cost_center,
"vendor_name": pr_supplier_map.get(asset.purchase_receipt) or pi_supplier_map.get(asset.purchase_invoice),
"gross_purchase_amount": asset.gross_purchase_amount,
"opening_accumulated_depreciation": asset.opening_accumulated_depreciation,
"depreciated_amount": depreciation_amount_map.get(asset.name) or 0.0,
"available_for_use_date": asset.available_for_use_date,
"location": asset.location,
"asset_category": asset.asset_category,
"purchase_date": asset.purchase_date,
"asset_value": asset_value
}
data.append(row)
row = {
"asset_id": asset.asset_id,
"asset_name": asset.asset_name,
"status": asset.status,
"department": asset.department,
"cost_center": asset.cost_center,
"vendor_name": pr_supplier_map.get(asset.purchase_receipt) or pi_supplier_map.get(asset.purchase_invoice),
"gross_purchase_amount": asset.gross_purchase_amount,
"opening_accumulated_depreciation": asset.opening_accumulated_depreciation,
"depreciated_amount": depreciation_amount_map.get(asset.asset_id) or 0.0,
"available_for_use_date": asset.available_for_use_date,
"location": asset.location,
"asset_category": asset.asset_category,
"purchase_date": asset.purchase_date,
"asset_value": asset_value
}
data.append(row)
return data

View File

@@ -3,6 +3,7 @@
"description": "Settings for Buying Module",
"doctype": "DocType",
"document_type": "Other",
"engine": "InnoDB",
"field_order": [
"supp_master_name",
"supplier_group",
@@ -92,7 +93,7 @@
"icon": "fa fa-cog",
"idx": 1,
"issingle": 1,
"modified": "2019-08-20 13:13:09.055189",
"modified": "2021-03-02 18:16:03.947813",
"modified_by": "Administrator",
"module": "Buying",
"name": "Buying Settings",
@@ -107,5 +108,8 @@
"share": 1,
"write": 1
}
]
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -355,7 +355,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
material_request_type: "Purchase",
docstatus: 1,
status: ["!=", "Stopped"],
per_ordered: ["<", 99.99],
per_ordered: ["<", 100],
}
})
}, __("Get items from"));

View File

@@ -1056,7 +1056,7 @@
"idx": 105,
"is_submittable": 1,
"links": [],
"modified": "2020-09-14 14:36:12.418690",
"modified": "2021-01-22 20:27:11.418690",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@@ -366,7 +366,6 @@ def make_purchase_receipt(source_name, target_doc=None):
"Purchase Order": {
"doctype": "Purchase Receipt",
"field_map": {
"per_billed": "per_billed",
"supplier_warehouse":"supplier_warehouse"
},
"validation": {

View File

@@ -89,7 +89,7 @@ class TestPurchaseOrder(unittest.TestCase):
frappe.db.set_value("Accounts Settings", None, "over_billing_allowance", 0)
def test_update_child_qty_rate(self):
def test_update_child(self):
mr = make_material_request(qty=10)
po = make_purchase_order(mr.name)
po.supplier = "_Test Supplier"
@@ -119,7 +119,7 @@ class TestPurchaseOrder(unittest.TestCase):
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 3)
def test_add_new_item_in_update_child_qty_rate(self):
def test_update_child_adding_new_item(self):
po = create_purchase_order(do_not_save=1)
po.items[0].qty = 4
po.save()
@@ -145,7 +145,7 @@ class TestPurchaseOrder(unittest.TestCase):
self.assertEqual(po.status, 'To Receive and Bill')
def test_remove_item_in_update_child_qty_rate(self):
def test_update_child_removing_item(self):
po = create_purchase_order(do_not_save=1)
po.items[0].qty = 4
po.save()
@@ -185,7 +185,7 @@ class TestPurchaseOrder(unittest.TestCase):
self.assertEquals(len(po.get('items')), 1)
self.assertEqual(po.status, 'To Receive and Bill')
def test_update_child_qty_rate_perm(self):
def test_update_child_perm(self):
po = create_purchase_order(item_code= "_Test Item", qty=4)
user = 'test@example.com'
@@ -855,7 +855,7 @@ class TestPurchaseOrder(unittest.TestCase):
},
{
"item_code":item_code,"rm_item_code":"Sub Contracted Raw Material 4","item_name":"_Test Item",
"qty":250,"warehouse":"_Test Warehouse - _TC", "stock_uom":"Nos", "name": po.supplied_items[1].name
"qty":250,"warehouse":"_Test Warehouse - _TC", "stock_uom":"Nos"
},
]
@@ -864,6 +864,10 @@ class TestPurchaseOrder(unittest.TestCase):
se = frappe.get_doc(make_subcontract_transfer_entry(po.name, rm_item_string))
se.submit()
# Test po_detail field has value or not
for item_row in se.items:
self.assertEqual(item_row.po_detail, po.supplied_items[item_row.idx - 1].name)
po_doc = frappe.get_doc("Purchase Order", po.name)
for row in po_doc.supplied_items:
# Valid that whether transferred quantity is matching with supplied qty or not in the purchase order

View File

@@ -271,7 +271,7 @@ erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.e
material_request_type: "Purchase",
docstatus: 1,
status: ["!=", "Stopped"],
per_ordered: ["<", 99.99]
per_ordered: ["<", 100]
}
})
}, __("Get items from"));
@@ -316,7 +316,7 @@ erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.e
material_request_type: "Purchase",
docstatus: 1,
status: ["!=", "Stopped"],
per_ordered: ["<", 99.99]
per_ordered: ["<", 100]
}
});
$(btn).done_working();

View File

@@ -108,6 +108,10 @@ class RequestforQuotation(BuyingController):
'link_doctype': 'Supplier',
'link_name': rfq_supplier.supplier
})
contact.append('email_ids', {
'email_id': user.name,
'is_primary': 1
})
if not contact.email_id and not contact.user:
contact.email_id = user.name
@@ -275,19 +279,21 @@ def add_items(sq_doc, supplier, items):
create_rfq_items(sq_doc, supplier, data)
def create_rfq_items(sq_doc, supplier, data):
sq_doc.append('items', {
"item_code": data.item_code,
"item_name": data.item_name,
"description": data.description,
"qty": data.qty,
"rate": data.rate,
"conversion_factor": data.conversion_factor if data.conversion_factor else None,
"supplier_part_no": frappe.db.get_value("Item Supplier", {'parent': data.item_code, 'supplier': supplier}, "supplier_part_no"),
"warehouse": data.warehouse or '',
args = {}
for field in ['item_code', 'item_name', 'description', 'qty', 'rate', 'conversion_factor',
'warehouse', 'material_request', 'material_request_item', 'stock_qty']:
args[field] = data.get(field)
args.update({
"request_for_quotation_item": data.name,
"request_for_quotation": data.parent
"request_for_quotation": data.parent,
"supplier_part_no": frappe.db.get_value("Item Supplier",
{'parent': data.item_code, 'supplier': supplier}, "supplier_part_no")
})
sq_doc.append('items', args)
@frappe.whitelist()
def get_pdf(doctype, name, supplier_idx):
doc = get_rfq_doc(doctype, name, supplier_idx)

View File

@@ -46,7 +46,7 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
material_request_type: "Purchase",
docstatus: 1,
status: ["!=", "Stopped"],
per_ordered: ["<", 99.99]
per_ordered: ["<", 100]
}
})
}, __("Get items from"));

View File

@@ -1,5 +1,4 @@
{
"actions": [],
"autoname": "hash",
"creation": "2013-05-22 12:43:10",
"doctype": "DocType",
@@ -237,7 +236,7 @@
"fieldname": "rate",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Rate ",
"label": "Rate",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
"options": "currency"
@@ -531,9 +530,9 @@
}
],
"idx": 1,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-04-07 18:35:51.175947",
"modified": "2020-10-19 17:16:06.731729",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation Item",

View File

@@ -35,9 +35,7 @@ def update_last_purchase_rate(doc, is_submit):
frappe.throw(_("UOM Conversion factor is required in row {0}").format(d.idx))
# update last purchsae rate
if last_purchase_rate:
frappe.db.sql("""update `tabItem` set last_purchase_rate = %s where name = %s""",
(flt(last_purchase_rate), d.item_code))
frappe.db.set_value('Item', d.item_code, 'last_purchase_rate', flt(last_purchase_rate))
def validate_for_items(doc):
items = []

View File

@@ -0,0 +1,36 @@
## ERPNext v12.14.0 Release Note
### Fixes and Enhancements
- Incorrect backflush qty in manufacture entry ([#23878](https://github.com/frappe/erpnext/pull/23878))
- Fuel expense amount of vehicle log ([#23634](https://github.com/frappe/erpnext/pull/23634))
- Extra material received against send to warehouse entry ([#23645](https://github.com/frappe/erpnext/pull/23645))
- Show accounts in financial statements upto level 20 ([#23719](https://github.com/frappe/erpnext/pull/23719))
- Remove Production Order reference from Item Validation ([#23733](https://github.com/frappe/erpnext/pull/23733))
- Place of Supply fix in Sales Invoices ([#23786](https://github.com/frappe/erpnext/pull/23786))
- Filter Leave Type based on allocation for a particular employee ([#22050](https://github.com/frappe/erpnext/pull/22050))
- Incorrect assign to in Maintenance Schedule ([#23830](https://github.com/frappe/erpnext/pull/23830))
- Manually set serial nos override with current available serial nos ([#23651](https://github.com/frappe/erpnext/pull/23651))
- SO to PO flow improvement ([#23357](https://github.com/frappe/erpnext/pull/23357))
- Payment Terms not fetched in Purchase Invoice from Purchase Receipt ([#23866](https://github.com/frappe/erpnext/pull/23866))
- Re-linking bank accounts with plaid ([#23913](https://github.com/frappe/erpnext/pull/23913))
- Incorrect outstanding amount for multicurrency with Reverse Charge ([#23863](https://github.com/frappe/erpnext/pull/23863))
- Overproduction, not allowed to transfer extra materials ([#23647](https://github.com/frappe/erpnext/pull/23647))
- Consider rounded_total in returns ([#23631](https://github.com/frappe/erpnext/pull/23631))
- Default cost center in item master not set in stock entry ([#23816](https://github.com/frappe/erpnext/pull/23816))
- Asset finance book posting date fix ([#23780](https://github.com/frappe/erpnext/pull/23780))
- Added column cost_center to receivable reports ([#23837](https://github.com/frappe/erpnext/pull/23837))
- Override field_map for job card gantt ([#23740](https://github.com/frappe/erpnext/pull/23740))
- Added filter show in website for filtering product ([#23637](https://github.com/frappe/erpnext/pull/23637))
- Serial no field is blank in stock reconciliation ([#23646](https://github.com/frappe/erpnext/pull/23646))
- Copying po no when mapping doc ([#23730](https://github.com/frappe/erpnext/pull/23730))
- Show form buttons only if permissions exist ([#23889](https://github.com/frappe/erpnext/pull/23889))
- Cannot auto unlink payments for credit/debit notes ([#23690](https://github.com/frappe/erpnext/pull/23690))
- None type error if the Pricing Rule applicable_for is None ([#23664](https://github.com/frappe/erpnext/pull/23664))
- Don't copy terms, discount and required by from SO to PO ([#23904](https://github.com/frappe/erpnext/pull/23904))
- Add Taxes if missing via Update Items ([#23705](https://github.com/frappe/erpnext/pull/23705))
- Don't overrule Item Price via Pricing Rule Rate if 0 ([#23915](https://github.com/frappe/erpnext/pull/23915))
- Show only available items in point of sale ([#23667](https://github.com/frappe/erpnext/pull/23667))
- Auto State-wise gst tax template ([#23859](https://github.com/frappe/erpnext/pull/23859))
- Stock ageing report not working ([#23924](https://github.com/frappe/erpnext/pull/23924))
- Validate duplicate packing item in Product Bundle ([#23898](https://github.com/frappe/erpnext/pull/23898))

View File

@@ -0,0 +1,40 @@
## ERPNext v12.15.0 Release Note
### Fixes and Enhancements
- BOM stock report color showing always red ([#23993](https://github.com/frappe/erpnext/pull/23993))
- Clear error message when approval not availab ([#23972](https://github.com/frappe/erpnext/pull/23972))
- Show tax amount in base currencies ([#24071](https://github.com/frappe/erpnext/pull/24071))
- Depreciation Posting Date is mandatory even if Calculate Depreciation is not checked ([#24037](https://github.com/frappe/erpnext/pull/24037))
- Handle Account and Item None not found in Opening Invoice Creation Tool ([#24103](https://github.com/frappe/erpnext/pull/24103))
- Opening invoices in GSTR-1 report ([#24020](https://github.com/frappe/erpnext/pull/24020))
- Incorrect balance value in stock balance report ([#23997](https://github.com/frappe/erpnext/pull/23997))
- Columns mismatch in AR report([#24085](https://github.com/frappe/erpnext/pull/24085))
- Job card error handling for operations field ([#23996](https://github.com/frappe/erpnext/pull/23996))
- Set proper state code in ewaybill JSON when GST category is SEZ ([#23954](https://github.com/frappe/erpnext/pull/23954))
- PO orverride ([#24023](https://github.com/frappe/erpnext/pull/24023))
- Invoice generation for Unpaid subscriptions ([#23966](https://github.com/frappe/erpnext/pull/23966))
- Throw an error when no pos profile exist ([#24026](https://github.com/frappe/erpnext/pull/24026))
- Purchase receipt to purchase invoice bill date mapping ([#23968](https://github.com/frappe/erpnext/pull/23968))
- Validation for duplicate Tax Category ([#24175](https://github.com/frappe/erpnext/pull/24175))
- Double exception in payroll ([#24080](https://github.com/frappe/erpnext/pull/24080))
- Sales invoice add button on sales order dashboard ([#24081](https://github.com/frappe/erpnext/pull/24081))
- Hide Ex-Employees from Employee Tree and minor message UX ([#23927](https://github.com/frappe/erpnext/pull/23927))
- Get value of allow_items_in_stock even if not an exact match ([#24099](https://github.com/frappe/erpnext/pull/24099))
- Incorrect delink serial no and batch ([#23958](https://github.com/frappe/erpnext/pull/23958))
- Pricing rule with transaction not working for additional product ([#24064](https://github.com/frappe/erpnext/pull/24064))
- Check if list view standard filter exists in Payment Entry ([#23929](https://github.com/frappe/erpnext/pull/23929))
- Do not fetch items until POS Profile is set ([#24076](https://github.com/frappe/erpnext/pull/24076))
- Taxation fixes for India ([#24162](https://github.com/frappe/erpnext/pull/24162))
- Don't cancel job card if manufacturing entry has made ([#24034](https://github.com/frappe/erpnext/pull/24034))
- Payment Reconciliation client side validations ([#23930](https://github.com/frappe/erpnext/pull/23930))
- Item Link Formatter Behaviour ([#23931](https://github.com/frappe/erpnext/pull/23931))
- Asset with value zero doesn't show up in fixed asset register ([#24098](https://github.com/frappe/erpnext/pull/24098))
- Allow add to cart for any item if allow_items_not_in_stock is enabled ([#24084](https://github.com/frappe/erpnext/pull/24084))
- Incoming rate for finished good ([#24013](https://github.com/frappe/erpnext/pull/24013))
- Incorrect stock ledger entries for stock reco ([#23938](https://github.com/frappe/erpnext/pull/23938))
- Function imports in account_balance_timeline.py ([#24097](https://github.com/frappe/erpnext/pull/24097))
- Sequence Matcher error in Bank Reconciliation ([#23539](https://github.com/frappe/erpnext/pull/23539))
- Shipping charges not sync from shopify ([#24009](https://github.com/frappe/erpnext/pull/24009))
- Delete Receive at Warehouse entry on cancellation of Send to War… ([#24068](https://github.com/frappe/erpnext/pull/24068))
- Get formatted value in 'taxes' print template ([#24036](https://github.com/frappe/erpnext/pull/24036))

View File

@@ -0,0 +1,11 @@
## ERPNext v12.16.0 Release Note
### Feature
- GST E-invoicing for India ([#24184](https://github.com/frappe/erpnext/pull/24184))
### Fixes
- Do not override the manually added valuation rate in stock entry ([#24221](https://github.com/frappe/erpnext/pull/24221))
- Do not manufacture same serial no multiple times ([#24163](https://github.com/frappe/erpnext/pull/24163))

Some files were not shown because too many files have changed in this diff Show More