Compare commits

..

768 Commits

Author SHA1 Message Date
Sahil Khan
d959463cbc Merge branch 'v12-pre-release' into version-12 2020-04-17 11:27:54 +05:30
Sahil Khan
e6d02ecd7f bumped to version 12.7.0 2020-04-17 11:47:54 +05:50
Nabin Hait
4770626bbd fix: requested qty for customer provided item and rate for sales (#21301)
* fix: requested qty for customer provided item and rate for sales

* fix: requested qty for material transfer

* fix: customer provided item can be sales item

* fix: requested qty test cases
2020-04-17 10:52:18 +05:30
rohitwaghchaure
df045e9f6d Merge pull request #21308 from rohitwaghchaure/fixed_job_card_time_issue_pre_release
fix: job card timer issue
2020-04-17 00:56:16 +05:30
Rohit Waghchaure
c10c920914 fix: job card time issue 2020-04-17 00:48:08 +05:30
rohitwaghchaure
fd99cc8494 Merge pull request #21294 from nabinhait/b12-7-pre-release-1
fix: requested qty calculation and some other small fixes
2020-04-16 19:18:54 +05:30
Nabin Hait
9ea9ed4256 Merge branch 'v12-pre-release' into b12-7-pre-release-1 2020-04-16 19:07:45 +05:30
Saqib
65eea97e0c fix: serial and batch selection from delivery note bug fix (#21293) 2020-04-16 16:22:16 +05:30
Nabin Hait
bd57cbda03 fix: requested qty calculation fix for UOM 2020-04-16 14:27:25 +05:30
Nabin Hait
31c8f8e795 chore: added change log v12.7.0 (#21289) 2020-04-16 12:46:42 +05:30
Nabin Hait
ccfc005932 fix: Made received qty readonly and no-copy 2020-04-16 11:25:15 +05:30
Nabin Hait
b4dfc8e1bf fix: Made release date mandatory 2020-04-16 11:24:43 +05:30
Marica
3635b17f22 Merge pull request #21287 from nextchamp-saqib/warehouse-fix-pre-release
fix: warehouse unset when cannot find item warehouse
2020-04-15 23:56:39 +05:30
Saqib Ansari
5d3e211531 fix: warehouse unset when cannot find item warehouse
* cannot set delivery date when all items gets deleted and new are added
2020-04-15 22:10:00 +05:30
Saqib Ansari
bde676ef74 fix: pos not accessible without default customer 2020-04-15 22:09:50 +05:30
rohitwaghchaure
18a04a24b3 Merge pull request #21278 from marination/default-item-manufacturer-pre-release
feat: Provision to set Default Item Manufacturer
2020-04-15 16:47:47 +05:30
marination
64f053d583 feat: Provision to set Default Item Manufacturer
- Is Default checkbox added in Item Manufacturer
- Default Item Manufacturer and Part No fields added to Item Master
- Manufacturer Part No field editable in all child tables with validation
- Manufacturer and Part No auto fetched via get_item_details in child table
2020-04-15 16:43:41 +05:30
Nabin Hait
1fc8de32f1 fix: merge conflict 2020-04-14 20:31:50 +05:30
rohitwaghchaure
09f6199b36 fix: pick list test (#21267) 2020-04-14 19:43:26 +05:30
Rohan
b0f000b1c8 fix: order_type validation restriction (#18096) (#21264)
Co-authored-by: Don-Leopardo <46027152+Don-Leopardo@users.noreply.github.com>
2020-04-14 19:42:21 +05:30
Nabin Hait
49b653b444 fix: merge conflict 2020-04-14 19:34:48 +05:30
Nabin Hait
107229de04 fix: Fixed expense claim payment status 2020-04-14 19:33:05 +05:30
Deepesh Garg
1112bd0f23 Merge pull request #21260 from Alchez/v12-stock-available-order-desk
fix: [minor] show stock UOM in POS (v12)
2020-04-14 17:00:49 +05:30
rohitwaghchaure
8c931e4185 Merge pull request #21263 from rohitwaghchaure/fixed_stock_reco_test_case
fix: stock reco test case
2020-04-14 14:50:49 +05:30
Rohit Waghchaure
5771aabc49 fix: stock reco test case 2020-04-14 14:49:47 +05:30
Rohan Bansal
954c6540fd fix: show stock UOM in POS 2020-04-14 14:22:10 +05:30
rohitwaghchaure
4eea8bd2c0 fix: on changing qty free item not removed (#21250) 2020-04-14 12:49:38 +05:30
Marica
335d35a988 fix: Lead Contact with blank first name via Customer (#21248) 2020-04-14 11:53:00 +05:30
Faris Ansari
2833db559e fix: Set Price List in case of User Permissions (#21238)
Frontport of #18968
2020-04-14 11:50:54 +05:30
rohitwaghchaure
3d667bfe55 fix: minor issues (#21203) 2020-04-14 11:48:56 +05:30
Marica
7841653a03 fix: Project Update Email Error (#21209)
* fix: Project Update Email Error

* fix: Removed mandatory depends on

Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
2020-04-14 11:47:22 +05:30
Saqib
02a9b5a8a5 chore: hide redundant base received amount (#21229)
* fix: formatting

* chore: hide redundant base received amount
2020-04-14 11:45:56 +05:30
Vishal Dhayagude
4b1d0d19fb fix: str object not callable (#21228) 2020-04-14 11:42:22 +05:30
Mangesh-Khairnar
8b31e3ec2a fix: consider revereted expired leaves entry (#21256) 2020-04-14 09:33:53 +05:30
Marica
b2ba5dbd6a Merge pull request #21214 from vishdha/batch_message
fix(UX): batch error message improved
2020-04-13 15:38:59 +05:30
Marica
b2a9413c06 Merge branch 'version-12-hotfix' into batch_message 2020-04-13 13:20:43 +05:30
vishdha
1b15734bd8 fix: batch message ux improved 2020-04-13 12:36:54 +05:30
Deepesh Garg
725d6b235f Merge pull request #21241 from mujeerhashmi/v12_gstr_3b_report_fix
fix: GSTR 3B Report tax amount calculation
2020-04-13 11:05:24 +05:30
Syed Mujeer Hashmi
87c6b6d12f fix: GSTR 3B Report tax amount calculation
The tax amount after discount amount should be considered for tax
calculation.

Fixes #21231

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>
(cherry picked from commit 58a16f1a3b)
2020-04-11 22:56:00 +05:30
Deepesh Garg
703e20df79 Merge pull request #21178 from nextchamp-saqib/purchase-register-filters-v12
feat: (minor) purchase register filters
2020-04-11 18:12:20 +05:30
Deepesh Garg
9d0af22b88 Merge pull request #21202 from marination/serial-no-status-hotfix
fix: Added Status field in Serial No for filter and report builder
2020-04-10 20:48:45 +05:30
Deepesh Garg
073d1c4c13 fix: SQL ssyntax error 2020-04-10 20:33:03 +05:30
Deepesh Garg
c4115c19e4 Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into purchase-register-filters-v12 2020-04-10 20:32:30 +05:30
rohitwaghchaure
38896efd6d Merge pull request #21157 from marination/mr-customer-provided-to-stock-entry-hotfix
fix: Mapping Customer Provided Material Request to Stock Entry
2020-04-09 13:19:41 +05:30
Marica
b225ffa003 fix: Error on any new doc from Shipping Rule. (#21207) 2020-04-09 12:01:29 +05:30
vishdha
c3bb5a97f8 fix: item_name added for message 2020-04-09 11:25:02 +05:30
marination
cdd589a58a fix: Status field in Serial No for filter and report builder 2020-04-08 16:08:09 +05:30
Mangesh-Khairnar
bf5c7fc4d3 fix(MWS): add new regions to marketplace (#21195)
* fix(MWS): add marketplace region for uae

* fix: rename the fields for mws integrations

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-04-08 12:56:22 +05:30
Saqib
27eba1fc61 fix: cannot find accounting module while rendering breadcrumb (#21191) 2020-04-08 11:49:34 +05:30
Nabin Hait
95b6e8afda fix: Replace newlines with spaces before evaluation of condition and formula (#21166) 2020-04-08 09:34:39 +05:30
Saqib
7c1f2ce4eb fix: [ux] enforce 'get references from' in payment order (#21176) 2020-04-08 09:20:41 +05:30
rohitwaghchaure
af64300c18 Merge pull request #21066 from marination/bin-requested-qty-hotfix
fix: Updated Bin Requested Qty logic
2020-04-07 18:06:07 +05:30
rohitwaghchaure
6668544b4c Merge pull request #21169 from rohitwaghchaure/get_serial_nos_based_on_posting_date_and_time
fix: get serial nos based on posting date and time
2020-04-07 18:02:34 +05:30
Deepesh Garg
5e841b40f3 Merge pull request #21189 from deepeshgarg007/dimension_filter_fix_v12
fix: Use separate condition for tree and normal doctype
2020-04-07 15:23:25 +05:30
Deepesh Garg
5e79f763b5 fix: Use separate condition for tree and normal doctype 2020-04-07 15:19:21 +05:30
Rohit Waghchaure
aebf0e47f3 fix: get serial nos based on posting date and time 2020-04-07 14:41:24 +05:30
rohitwaghchaure
645ef9db87 Merge pull request #21182 from marination/purchase-receipt-scan-barcode-hotfix
feat: Scan Barcode in Purchase Receipt
2020-04-07 14:37:17 +05:30
Marica
d76ecb960e fix: Validate Serial/Batch No naming series in Item itself (#21168)
* fix: Validate Serial/Batch No naming series in Item itself

* fix: Consider '#' too
2020-04-07 14:15:48 +05:30
Vishal Dhayagude
d2da8bd6e2 fix(shopping cart): UX Improvements (#21035)
* fix: nontype error for resolved and moved place order button at bottom left

* fix: removed inline style

* fix: Request for quotation move to lower right

* fix: move buttons

Co-authored-by: Naren <patilnarendra3@gmail.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2020-04-07 12:19:40 +05:30
Saqib
a5fb07e475 fix(shopping-cart): address is made mandatory to place order (#20922)
fix(shopping-cart): address is made mandatory to place order
2020-04-07 12:09:28 +05:30
rohitwaghchaure
bcf1897e60 Merge pull request #21173 from rohitwaghchaure/material_request_incorrect_filter_issue
fix: material request type manufacture shows items with Is Purchase I…
2020-04-07 12:06:04 +05:30
Vishal Dhayagude
044abbace8 fix: Make Sales Invoice paid when it create from shopping cart (#20878)
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2020-04-07 12:05:18 +05:30
Deepesh Garg
36a763bdc5 Merge pull request #21106 from nextchamp-saqib/payment-req-status-fix-v12
fix: payment request status fixes
2020-04-07 10:13:29 +05:30
marination
2dd488f878 feat: Scan Barcode in Purchase Receipt 2020-04-06 23:16:57 +05:30
Saqib Ansari
34288b0f38 feat: (minor) purchase register filters 2020-04-06 18:26:03 +05:30
Rohit Waghchaure
d7389b1920 fix: material request type manufacture shows items with Is Purchase Item enabled 2020-04-06 17:49:49 +05:30
Marica
42eddbf89b Merge branch 'version-12-hotfix' into bin-requested-qty-hotfix 2020-04-06 16:38:06 +05:30
Saqib
8e206f55be Merge branch 'version-12-hotfix' into cart-address-update-hotfix 2020-04-06 14:22:06 +05:30
Saqib Ansari
4ea7df69b4 fix: change request status on payment entry cancel 2020-04-06 12:35:54 +05:30
Marica
da6ef63bc4 Merge pull request #20865 from deepeshgarg007/po_supplier_skip_v12
feat: Allow PI creation without PO
2020-04-06 12:16:02 +05:30
Nabin Hait
5da9663ae4 Merge branch 'version-12-hotfix' into expense-claim-fix-v12 2020-04-06 12:14:27 +05:30
Nabin Hait
322660c644 fix: Merge conflict 2020-04-06 11:16:31 +05:30
Nabin Hait
2378572e1b fix: update attendace from leave application (#21154) 2020-04-06 10:15:50 +05:30
Deepesh Garg
ab436d4147 Merge pull request #21164 from deepeshgarg007/gst_3b_user_perm_v12
fix: User permissions in GSTR 3B report
2020-04-04 21:48:31 +05:30
Deepesh Garg
18cd3a029d fix: User permissions in GSTR 3B report 2020-04-04 20:07:44 +05:30
Saqib
dba4bd6f26 fix: [ux] credit to & debit to error message (#21133)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-04-03 19:36:00 +05:30
Marica
7bc70758fb Merge branch 'version-12-hotfix' into po_supplier_skip_v12 2020-04-03 18:35:29 +05:30
Deepesh Garg
69e0700101 Merge pull request #21158 from scmmishra/coa_importer
fix: TypeError for _ in coa importer
2020-04-03 18:34:44 +05:30
marination
dfe4d36e8d fix: Test Cases and block expense on outward entry
- Throw error if rate present against Customer Provided Item in DN and SI
- Added test cases for Sales Invoice and Delivery Note
- Allow SI and DN with 0 rate in Test
2020-04-03 18:29:30 +05:30
Shivam Mishra
55ded1379e Merge branch 'version-12-hotfix' into coa_importer 2020-04-03 17:21:42 +05:30
Shivam Mishra
64ed25abfb fix: TypeError for _ 2020-04-03 17:17:04 +05:30
marination
7b70679bf0 fix: Mapping Customer Provided Material Request to Stock Entry
- Fixed inability to map Material Request to Stock Entry
- Commonified Customer Provided Item validation
2020-04-03 15:57:32 +05:30
Deepesh Garg
31fbafe16f Merge pull request #21151 from scmmishra/fix-patch-dashboard-12
fix (tests): module import error for Dashboard Chart Field
2020-04-03 11:05:11 +05:30
Shivam Mishra
878e4cb3ce fix: lms quiz type error (#21153) 2020-04-03 10:07:44 +05:30
Marica
73bc29c011 fix: Update Received Qty in Material Request as per Stock UOM (#21055)
* fix: Update Received Qty in Material Request as per Stock UOM

* fix: Process each PR only once

* fix: minor suggested changes

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-04-03 10:06:39 +05:30
Saqib
44dbd98d90 fix: cannot set warehouse on deleting all so items and updating them (#21079)
* fix: cannot set warehouse on deleting all so items and updating them

* fix: travis

* fix: travis

* fix: docname is editable in update items dialog

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-04-03 10:01:14 +05:30
Marica
8b5693b77f Merge branch 'version-12-hotfix' into po_supplier_skip_v12 2020-04-02 21:14:19 +05:30
Deepesh Garg
76d2bd9633 Merge branch 'version-12-hotfix' into fix-patch-dashboard-12 2020-04-02 20:24:10 +05:30
Deepesh Garg
83c7561a84 Merge pull request #21149 from deepeshgarg007/travis_company_fixture_v12
fix: Travis(v12)
2020-04-02 20:22:53 +05:30
Shivam Mishra
f8cb81c9f9 fix (tests): reload doctype 2020-04-02 19:59:47 +05:30
marination
4a59b1d3b5 fix: Fixed Test Cases for Material Request
- Reduce quantity on Material Transfer/Issue
- No effect on Customer Provided Material Request
2020-04-02 19:38:38 +05:30
Deepesh Garg
763aab3301 fix: Travis 2020-04-02 19:12:36 +05:30
rohitwaghchaure
0bbc78cdbd Merge pull request #21145 from anupamvs/year-sum-hotfix
Sum of years not needed.
2020-04-02 12:00:55 +05:30
Anupam K
29fc063764 Sum of years not needed. 2020-04-02 11:34:42 +05:30
Anupam K
a66da0ddf4 Sum of years not needed. 2020-04-02 01:06:30 +05:30
Deepesh Garg
4fd447a31d Merge pull request #21136 from marination/stock-ledger-typo-hotfix
fix: Typo in stock level validation in Stock Ledger
2020-04-01 11:20:55 +05:30
marination
122049a9b4 fix: Typo in stock level validation in Stock Ledger 2020-04-01 11:07:46 +05:30
Marica
6a49ea5262 Merge pull request #21097 from rohitwaghchaure/item_code_showing_as_mandatory_issue_hotfix
fix: item code showing as mandatory even if the 'Item Naming By' is set as Naming Series in stock settings
2020-04-01 10:56:14 +05:30
Marica
9f709aa64c Merge branch 'version-12-hotfix' into item_code_showing_as_mandatory_issue_hotfix 2020-04-01 10:46:55 +05:30
Deepesh Garg
702e0ac29e Merge pull request #21117 from nextchamp-saqib/customer-group-price-list-in-pos-v12
fix: customer group price list not fetched in pos
2020-04-01 09:41:04 +05:30
Saqib Ansari
954276ff0e fix: check if selling price exists then set it 2020-03-31 18:49:28 +05:30
Saqib Ansari
0541b2ee27 fix: travis 2020-03-31 18:44:38 +05:30
Marica
dc6a3ae99c Merge pull request #21071 from pipech/v12_fix_pos-display-stock-item
fix(pos): fix pos not display only in-stock item
2020-03-31 18:13:44 +05:30
Marica
2512435a7b Merge branch 'version-12-hotfix' into v12_fix_pos-display-stock-item 2020-03-31 18:08:10 +05:30
Deepesh Garg
7d8d351668 Merge pull request #21064 from P-Froggy/fix-add-bank-account-reference-in-supplier-dashboard-hotfix
fix: Add missing bank accounts reference in supplier dashboard
2020-03-31 16:33:19 +05:30
Deepesh Garg
0126ef78c8 Merge pull request #21093 from scmmishra/multiple-option-fix-12
fix: use setup from Supplier Quotation Controller
2020-03-31 16:29:10 +05:30
rohitwaghchaure
489a5d203f Merge pull request #21016 from marination/so-mr-mapping-uom-hotfix
fix: UOM fixes in Sales Order,Material Request & Production Plan
2020-03-31 16:11:57 +05:30
Deepesh Garg
4716fc5eb8 Merge branch 'version-12-hotfix' into fix-add-bank-account-reference-in-supplier-dashboard-hotfix 2020-03-31 16:04:21 +05:30
rohitwaghchaure
437689371d Merge pull request #21002 from Alchez/v12-stock-entry-fg-validation
fix: allow target warehouses to be changed for work order stock entries (v12)
2020-03-31 15:43:28 +05:30
Saqib
798d532a11 fix: warehouse_account_map not getting reset for diff company transac… (#20997)
* fix: warehouse_account_map not getting reset for diff company transaction

* fix: potential key errors while fetching warehouse_account_map

* fix: travis

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-31 15:30:53 +05:30
rohitwaghchaure
c5a3bcca70 fix: make for quantity as non mandatory in job card (#21080) 2020-03-31 15:28:15 +05:30
rohitwaghchaure
e4cb523181 fix: serial no scan not adding the serial nos in stock entry (#21082) 2020-03-31 15:26:24 +05:30
Rucha Mahabal
b80213d65d fix: Healthcare Domain Issues (#21112)
* fix (Lab Test): None TypeError in Patient Medical Record

* fix: Lab Test Template data import failing in Lab Test Item creation

* fix: disabled Procedure Template shown as enabled in List View

* fix: change item_code from Link to Data to avoid item not found error

* fix: disabled patient shown as enabled

* fix: disabled practitioner schedule shown as enabled in list view

* fix: appointment reminders not working

* fix: Batch not getting fetched in Clinical Procedure Item
2020-03-31 10:52:51 +05:30
Anupam Kumar
d13e7d00b0 fix: email_to, party_type and party are not set in payment request (#21085)
* fix: email_to, party_type and party are not set in payment request when order made from portal

* fix: email_to, party_type and party are not set in payment request when order made from portal

Co-authored-by: Anupam K <anupam@Anupams-MacBook-Air.local>
2020-03-31 10:50:53 +05:30
Saqib
f492ba1e2d fix: auto created asset message (#21109)
* fix: auto created asset message

* Update erpnext/controllers/buying_controller.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-31 10:48:57 +05:30
Deepesh Garg
83111a4a2a fix: Expense account currency validation in Landed Cost voucher (#21074)
* fix: Expense account currency validation in Landed Cost voucher

* fix: Remove unused imports
2020-03-31 10:45:37 +05:30
Deepesh Garg
5a482a6685 Merge pull request #21068 from Alchez/v12-add-issue-status-filter
feat: add status filter in issue web form (v12)
2020-03-30 12:24:34 +05:30
Deepesh Garg
bda11e628b Merge pull request #21118 from rohitwaghchaure/fixed_parent_account_error_while_adding_equity_account
fix: not able to add equity account in the chart of accounts
2020-03-30 12:14:32 +05:30
Deepesh Garg
b8be73caea Merge pull request #21111 from nextchamp-saqib/cancel-error-hyperlink-v12
chore: hyperlinks in cannot cancel message
2020-03-29 21:54:09 +05:30
Deepesh Garg
df151ad6fa Merge pull request #21116 from nextchamp-saqib/course-report-perm-fix-v12
fix: cannot view report for course doctype - permission problem
2020-03-29 21:52:02 +05:30
Rohit Waghchaure
7e7787c298 fix: not able to add equity account in the chart of accounts 2020-03-29 16:33:30 +05:30
Saqib Ansari
1dd0c8f54c fix: customer group price list not fetched in pos 2020-03-29 12:58:30 +05:30
Saqib Ansari
dc04cbf9a9 fix: cannot view report for course doctype - permission problem 2020-03-29 12:52:43 +05:30
Deepesh Garg
77673f33db Merge pull request #21090 from scmmishra/print-format-fix-12
fix: total currency formatting in Acc Receivable and Payable
2020-03-28 21:28:20 +05:30
Deepesh Garg
f4e7de3cef Merge pull request #21104 from nextchamp-saqib/stock-ledger-warehouse-filter-v12
chore: [ux] filter warehouse based on company
2020-03-28 21:10:01 +05:30
Deepesh Garg
9b4ef1059c Merge pull request #21107 from nextchamp-saqib/gl-entry-currency-fix-v12
fix: currency formatting in gl entry dr cr field
2020-03-28 21:09:29 +05:30
Saqib Ansari
8ba661b8ed chore: hyperlinks in cannot cancel message 2020-03-28 20:11:59 +05:30
Saqib Ansari
1125ed8830 fix: currency formatting in gl entry dr cr field 2020-03-28 19:32:27 +05:30
Saqib Ansari
58351de797 fix: payment request status fixes 2020-03-28 19:30:03 +05:30
Saqib Ansari
f9ce7c2e18 chore: [ux] filter warehouse based on company 2020-03-28 19:16:00 +05:30
rohitwaghchaure
221189ab6e Merge pull request #21095 from anupamvs/item-wise-sales-history-billed-amount-bug-hotfix
bug: Item-wise Sales History - Billed amount
2020-03-28 15:00:46 +05:30
Rohit Waghchaure
8f854c7d93 fix: item code showing as mandatory even if the 'Item Naming By' is set as Naming Series in stock settings 2020-03-28 14:56:45 +05:30
Anupam K
728edacfd4 bug: Item-wise Sales History - Billed amount 2020-03-28 13:48:42 +05:30
Deepesh Garg
9aa8cabf93 Merge pull request #21088 from nabinhait/item_defaults_fix
fix: Add item defaults based on global settings only if default company and warehouse is mentioned
2020-03-27 21:50:19 +05:30
Shivam Mishra
cf2ab9b129 fix: use setup from Supplier Quotation Controller 2020-03-27 21:21:38 +05:30
Shivam Mishra
2313d2d80a fix: total currency formatting 2020-03-27 19:37:26 +05:30
Nabin Hait
b03d1327a5 fix: Add item defaults based on global settings only if default company and warehouse is mentioned 2020-03-27 19:24:17 +05:30
rohitwaghchaure
8110edbc62 Merge pull request #21076 from rohitwaghchaure/default_item_is_not_coming_while_making_new_bom
fix: item not showing in popup while making batch
2020-03-27 13:49:07 +05:30
Rohit Waghchaure
d90f658163 fix: item not showing in popup while making batch 2020-03-27 12:54:01 +05:30
Poranut Chollavorn
0b8191d566 fix(pos): fix pos display item instock 2020-03-26 13:46:36 +00:00
Rohan Bansal
27f0d13bdd feat: add status filter in issue web form 2020-03-26 16:06:07 +05:30
marination
c944676bb5 fix: Updated Bin Requested Qty logic 2020-03-26 15:44:52 +05:30
Nabin Hait
ff49a2f0b6 fix: Ignored user permission for parent_company and existing_company field in Company (#21010) 2020-03-26 13:36:21 +05:30
Deepesh Garg
8a5587749b fix: Added hidden GL column in general ledger (#21022)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-26 13:29:36 +05:30
Marica
3c378aaac7 fix: Make shelf life mandatory in Batched Item if it has expiry date (#21045) 2020-03-26 13:28:42 +05:30
Raffael Meyer
72430e91b2 fix: account groups (#21046) 2020-03-26 13:25:14 +05:30
Marica
6b038bda0d fix: Project field in Stock Entry Detail should be editable (#21000) 2020-03-26 13:23:54 +05:30
Saqib
01f80b239d fix: wrong calculation of depreciation eliminated for a period (#21032) 2020-03-26 13:23:06 +05:30
Saqib
b9f81d913b fix: currency not fetched on quotation creation (#20998) 2020-03-26 13:20:27 +05:30
Saqib
750985dc23 feat: auto set batch no on serial no selection (#20758)
* feat: auto set batch no on serial no selection

* fix: dialog not shown if set warehouse selected

* fix: typo

* fix: merge conflict

* fix: callback no getting called after serial no selected

* fix: callback no getting called after serial no selected

* fix: available batch qty not fetched without set_warehouse selected

* fix: item batch not synced with dialog batch table
2020-03-26 13:18:36 +05:30
P-Froggy
bcb9c28597 Fix: Add missing bank accounts reference in supplier dashboard 2020-03-26 02:35:09 +01:00
Deepesh Garg
23891a918d Merge pull request #21058 from deepeshgarg007/gstr_1_pos_validation_v12
fix: Place of supply validation in GSTR-1 report
2020-03-25 17:02:19 +05:30
Deepesh Garg
4f1a3876ec fix: Remove debug 2020-03-25 16:56:09 +05:30
Deepesh Garg
43806f3e68 fix: Place of supply validation in GSTR-1 report 2020-03-25 16:55:59 +05:30
Deepesh Garg
f4405246ed Merge pull request #21012 from Thunderbottom/log_error-fix-v12
chore: pass traceback and error message as kwargs
2020-03-24 20:19:42 +05:30
rohitwaghchaure
8cc507af53 Merge pull request #21039 from rohitwaghchaure/manufacturing_ux_fixes_hotfix
fix: Manufacturing UX, added calendar view for job card
2020-03-24 16:33:34 +05:30
rohitwaghchaure
6c8bbf9a1c Merge pull request #21029 from rohitwaghchaure/import_supplier_invoices
feat: import supplier invoices
2020-03-24 16:33:00 +05:30
rohitwaghchaure
ea470609fd Merge pull request #21036 from rohitwaghchaure/fixed_batch_selector_popup
fix: batch selection popup not coming for stock entry
2020-03-24 16:31:56 +05:30
Deepesh Garg
ad44f52a26 Merge pull request #21042 from deepeshgarg007/default_dimension_clean_up_v12
fix: Default dimension set code cleanup
2020-03-24 15:48:01 +05:30
Deepesh Garg
1e7cba9dd3 fix: Default dimension set code cleanup 2020-03-24 15:45:22 +05:30
Rohit Waghchaure
87b3dbb214 fix: Manufacturing UX, added calendar view for job card 2020-03-24 14:06:56 +05:30
Rohit Waghchaure
243283eec8 fix: batch selection popup not coming for stock entry 2020-03-24 11:34:44 +05:30
Rohit Waghchaure
b05922026d feat: import supplier invoices 2020-03-23 16:31:39 +05:30
Rohan
ed8e44b467 Merge branch 'version-12-hotfix' into v12-stock-entry-fg-validation 2020-03-23 14:49:59 +05:30
Deepesh Garg
76e163a889 Merge pull request #21026 from deepeshgarg007/dimension_perm_v12
fix: Remove quick entry from accounting dimensions
2020-03-22 21:56:47 +05:30
Deepesh Garg
20ab2c1e20 fix: Remove quick entry from accouting dimensions 2020-03-22 21:53:50 +05:30
Deepesh Garg
3f7ea072c3 Merge pull request #21004 from rohitwaghchaure/qty_must_be_positive_for_stock_entry
fix: stock entry qty must be positive
2020-03-21 20:45:50 +05:30
Deepesh Garg
601db77801 Merge pull request #21014 from surajshetty3416/fix-opportunity-listview-version-12-hotfix
fix: Add currency in options of Opportunity Amount
2020-03-20 20:22:46 +05:30
marination
93e72fdd21 fix: UOM fixes in Sales Order,Material Request & Production Plan 2020-03-20 18:06:25 +05:30
Suraj Shetty
e2bb2593db fix: Add currency in options of Opportunity Amount - To show currect symbol in list view 2020-03-20 15:13:07 +05:30
Chinmay D. Pai
e53e96f01b chore: pass traceback and error message as kwargs
fixes issue where the system tries to generate an error log but fails
with the following error:

Traceback (most recent call last):
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 421, in install_country_fixtures
    frappe.get_attr(module_name)(company_doc, False)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 17, in setup
    make_fixtures(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 523, in make_fixtures
    set_tax_withholding_category(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 543, in set_tax_withholding_category
    fiscal_year = get_fiscal_year(today(), company=company)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 24, in get_fiscal_year
    return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 80, in get_fiscal_years
    raise FiscalYearError(error_msg)
erpnext.accounts.utils.FiscalYearError: Date 20-03-2020 not in any active Fiscal Year.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/app.py", line 62, in application
    response = frappe.api.handle()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/handler.py", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/handler.py", line 61, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 1054, in call
    return fn(*args, **newargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.save()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 273, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 296, in _save
    self.insert()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 260, in insert
    self.run_post_save_methods()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 926, in run_post_save_methods
    self.run_method("on_update")
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 794, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 1065, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 1048, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 788, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 107, in on_update
    install_country_fixtures(self.name)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 423, in install_country_fixtures
    frappe.log_error(str(e), frappe.get_traceback())
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 1524, in log_error
    method=title)).insert(ignore_permissions=True)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 231, in insert
    self._validate()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 463, in _validate
    self._validate_length()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/base_document.py", line 583, in _validate_length
    self.throw_length_exceeded_error(df, max_length, value)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/base_document.py", line 599, in throw_length_exceeded_error
    .format(reference, _(df.label), max_length, value), frappe.CharacterLengthExceededError, title=_('Value too big'))
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 377, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 356, in msgprint
    _raise_exception()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 316, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.CharacterLengthExceededError: Error Log f2cbb8c0f2: 'Title' (Traceback (most recent call last):
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 421, in install_country_fixtures
    frappe.get_attr(module_name)(company_doc, False)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 17, in setup
    make_fixtures(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 523, in make_fixtures
    set_tax_withholding_category(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 543, in set_tax_withholding_category
    fiscal_year = get_fiscal_year(today(), company=company)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 24, in get_fiscal_year
    return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 80, in get_fiscal_years
    raise FiscalYearError(error_msg)
erpnext.accounts.utils.FiscalYearError: Date 20-03-2020 not in any active Fiscal Year.
) will get truncated, as max characters allowed is 140

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-20 13:57:30 +05:30
Rohit Waghchaure
794064db9f fix: stock entry qty must be positive 2020-03-19 14:44:16 +05:30
Rohan
4c4a1aa56d fix: allow target warehouses to be changed for work order stock entries 2020-03-19 13:19:08 +05:30
Sahil Khan
84a5e34319 Merge branch 'v12-pre-release' into version-12 2020-03-19 12:44:10 +05:30
Sahil Khan
d1bbda6d71 bumped to version 12.6.0 2020-03-19 13:04:10 +05:50
Deepesh Garg
8c56f8595e fix: Unable to submit landed cost voucher (#20978) 2020-03-19 11:03:14 +05:30
Deepesh Garg
c2f6782658 fix: Unable to submit landed cost voucher (#20979) 2020-03-19 11:02:34 +05:30
Deepesh Garg
7c0398c8e3 fix: Update is_tree field in Tree doctypes (#20983) 2020-03-19 11:01:40 +05:30
Deepesh Garg
71e9f23d77 fix: Update is_tree field in Tree doctypes (#20982) 2020-03-19 11:00:55 +05:30
Nabin Hait
7b45ae1f2d fix: Multiple fixes during pre-release testing (#20985) 2020-03-19 10:58:41 +05:30
Nabin Hait
bf0f9c5cb4 fix: Multiple fixes during pre-release testing (#20986) 2020-03-19 10:58:07 +05:30
Deepesh Garg
3f1682a4f3 Merge pull request #20993 from rohitwaghchaure/fixed_bom_comparision_issue_pre_release
fix: bom comparison issue
2020-03-19 10:54:51 +05:30
Deepesh Garg
4dd8f390e2 Merge pull request #20992 from rohitwaghchaure/fixed_bom_comparision_issue_hotfix
fix: bom comparison issue
2020-03-19 10:54:29 +05:30
Rohit Waghchaure
82661aa042 fix: bom comparison issue 2020-03-19 10:06:55 +05:30
Rohit Waghchaure
210a718a04 fix: bom comparison issue 2020-03-19 10:03:06 +05:30
Deepesh Garg
1d94f6c848 Merge pull request #20989 from rohitwaghchaure/fixed_shortage_qty_in_stock_projected_qty_report_pre_release
fix: shortage qty in stock projected qty report
2020-03-19 09:32:50 +05:30
Rohit Waghchaure
d21a9fa917 fix: shortage qty in stock projected qty report 2020-03-19 09:25:15 +05:30
Deepesh Garg
51cbfa6aa6 Merge pull request #20972 from rohitwaghchaure/fixed_shortage_qty_in_stock_projected_qty_report
fix: shortage qty in stock projected qty report
2020-03-19 09:04:30 +05:30
Rohit Waghchaure
1ed5993ff6 fix: shortage qty in stock projected qty report 2020-03-18 13:33:55 +05:30
Marica
e655648b18 fix: Missing if condition in Customer Default Bank Account Validation. (#20971) 2020-03-18 11:35:43 +05:30
Marica
da7c6b0d99 fix: Missing if condition in Customer Default Bank Account Validation. (#20970) 2020-03-18 11:29:02 +05:30
Nabin Hait
a5b836d3d4 core: Added change log 2020-03-17 21:02:22 +05:30
Nabin Hait
8a7ecebc03 fix: merge conflict 2020-03-17 19:49:25 +05:30
Anurag Mishra
7cf245895e refactor: Report BOM Sock Calculated (#19431) 2020-03-17 19:45:33 +05:30
Priyanka Gangar
738517c6e8 Label changes in account settings hotfix (#20964)
* fix: Account setting words switches to US Terminology

* created united_states.js

* Remove Unwanted Spaces

* Remove all changes

* Add spaces between arguments

Co-authored-by: PriyankaGangar <pinka0925@gmail.com>
2020-03-17 19:39:06 +05:30
rohitwaghchaure
a6cd666b10 fix: reserved qty for production issue for partial completion of work order (#20900) 2020-03-17 17:00:41 +05:30
Saqib
bc8a881e64 fix: purchase return are allowed even when assets are not cancelled (#20798)
* fix: purchase return are allowed even when assets are not cancelled

* chore: test case

* fix: error message

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-17 17:00:24 +05:30
Deepesh Garg
224059e7ba fix: Party Name not visible in statement of accounts (#20914)
* fix: Party name in Statement Of Accounts

* Update general_ledger.html

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-17 16:59:09 +05:30
Sun Howwrongbum
6f454dce20 fix: null fields being set in Integration Request (#20894)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-17 12:13:01 +05:30
Deepesh Garg
3528149329 fix: Add check to skip PR in supplier master 2020-03-17 11:48:11 +05:30
Deepesh Garg
6c148ef314 fix: Add check to skip SO and DN in customer master 2020-03-17 11:47:23 +05:30
Anurag Mishra
7f58f6af39 fix: leave based on multiple holiday list (#20849)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-17 10:58:17 +05:30
Marica
3ddcc2e5c7 fix: Item alternative must have similar fields as orignal item (#20799)
* fix: Item alternative must have similar fields as orignal item

* fix: Using db.get_values and meta instead of get_value and get_doc

* fix: Made code more DRY

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-17 10:56:13 +05:30
Deepesh Garg
756f47af04 feat: Nested set filtering for accounting dimension (#20866)
* feat: Nested set filtering for accounting dimension

* fix: Remove print statement
2020-03-17 10:52:56 +05:30
Anurag Mishra
b9e1d9ad7d Deduction based on earnins/gross pay (#20935)
* fix: deductions calculation based on gross pay

* test: salary structure deduction based on gross pay

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-16 22:44:17 +05:30
Deepesh Garg
169ba6f9b2 Merge pull request #20959 from deepeshgarg007/mode_of_payment_fix_v12
fix: Mode of payment not fetcched in Item wise purchase register
2020-03-16 22:43:24 +05:30
nmimsnikhil
7c0e89d785 fix: added a Reason for Rejection field for each items (#20828)
* fix: added a Reason for Rejection field for each items

* Update delivery_note_item.json

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-16 22:41:23 +05:30
Deepesh Garg
dd8059a3aa fix: Mode of payment not fetcched in Item wise purchase register 2020-03-16 22:39:32 +05:30
Don-Leopardo
0dcd5a0f34 fix: sql injection (#20817) 2020-03-16 22:35:01 +05:30
rohitwaghchaure
d2a2837034 fix: bom replace tool issue (#20841)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-16 21:42:51 +05:30
Anurag Mishra
22a069d4b0 fix: Wrong status 2020-03-16 19:15:33 +05:30
Rohan
281a9fdf07 fix: handle error handling (#20814) 2020-03-16 17:57:15 +05:30
Saqib
e7a6a4b009 fix: is_pos gets reset on making s_inv from s_ord (#20887)
* s_inv has is_pos default set as 1
2020-03-16 17:48:21 +05:30
Nabin Hait
5c760175d1 fix: deletion of auto-created batch (#20953) 2020-03-16 17:26:02 +05:30
Deepesh Garg
11fb93d022 fix: Add bank transaction in module view (#20823) 2020-03-16 16:54:34 +05:30
Saqib
43a0011987 fix: serial_no_selector showing for non serialized batched item (#20852) 2020-03-16 16:28:54 +05:30
Vishal Dhayagude
37886a72ef fix(HR): Leave application company field made read-only and filter in Monthly attendance sheet (#20911)
* fix(HR): Leave application company field made Readonly

* fix: in monthly report attandance employee filter based on company

* fix: minor typo
2020-03-16 15:57:42 +05:30
Deepesh Garg
98573fb868 Merge pull request #20921 from deepeshgarg007/c_from_fix_v12
fix: Get invoice details only if invoice is selected
2020-03-16 15:56:19 +05:30
Deepesh Garg
4d954f1a5f Merge pull request #20836 from Thunderbottom/welcome-email-fix-v12
fix: use ERPNext in welcome email when default company is not set
2020-03-16 15:54:09 +05:30
Prssanna Desai
46053f6c8f fix: fix options of currency fieldtype in Expense Taxes and Charges (#20910) 2020-03-16 15:52:00 +05:30
Chinmay Pai
6f3941c9cc fix: remove make_purchase_invoice from demo script (#20906)
currently demo fails with the following error:

frappe@bf54a9834cfe:/workspace/development/frappe-bench$ bench --site test1.localhost execute erpnext.demo.demo.make
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/utils.py", line 145, in execute
    ret = frappe.get_attr(method)(*args, **kwargs)
  File "/workspace/development/frappe-bench/apps/frappe/frappe/__init__.py", line 1042, in get_attr
    return getattr(get_module(modulename), methodname)
  File "/workspace/development/frappe-bench/apps/frappe/frappe/__init__.py", line 823, in get_module
    return importlib.import_module(modulename)
  File "/workspace/development/frappe-bench/env/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/workspace/development/frappe-bench/apps/erpnext/erpnext/demo/demo.py", line 6, in <module>
    from erpnext.demo.user import hr, sales, purchase, manufacturing, stock, accounts, projects, fixed_asset
  File "/workspace/development/frappe-bench/apps/erpnext/erpnext/demo/user/fixed_asset.py", line 9, in <module>
    from erpnext.assets.doctype.asset.asset import make_purchase_invoice, make_sales_invoice
ImportError: cannot import name 'make_purchase_invoice' from 'erpnext.assets.doctype.asset.asset' (/workspace/development/frappe-bench/apps/erpnext/erpnext/assets/doctype/asset/asset.py)

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-16 15:49:50 +05:30
Raffael Meyer
cd71114c15 fix(accounts): add account_type and tax_rate to some VAT accounts (#20941)
* Add account_type and tax rate to some VAT accounts

* fix indentation
2020-03-16 15:44:32 +05:30
Nabin Hait
e2a31f221a fix: Multiple fixes for travis (#20950) 2020-03-16 15:36:10 +05:30
Anurag Mishra
97dfe2ac32 fix: local variable 'benefit_amount' referenced before assignment (#20948) 2020-03-16 13:47:47 +05:30
Myuddin khatri
9c63b1d2c9 fix(shopping-cart): setting billing and shipping address
setting billing and shipping address
2020-03-12 16:15:05 +05:30
Myuddin khatri
0f807bf7ee fix(shopping-cart): address is made mandatory to place order 2020-03-12 14:40:34 +05:30
Deepesh Garg
ee003495f6 fix: Get invoice details only if invoice is selected 2020-03-12 13:25:06 +05:30
Deepesh Garg
08f0e9d6f3 Merge pull request #20891 from deepeshgarg007/itemised_purchase_register_v12
fix: HSN code not visible in GST Itemised Purchase register
2020-03-10 10:05:21 +05:30
Deepesh Garg
4d6fb59bfb Merge pull request #20885 from deepeshgarg007/first_row_dimension_v12
fix: Acccounting Dimension disappearing in first row after refresh
2020-03-09 22:47:46 +05:30
Deepesh Garg
0317576434 fix: HSN code not visible in GST Itemised Purchase register 2020-03-09 22:42:21 +05:30
Saqib
b607963fba fix: [pos] customer group filter resets on syncing offline invoices (#20874) 2020-03-09 18:30:42 +05:30
Marica
d08cff9efc fix: Validate Serial No/Batch No against unserialized Item in Stock Reconciliation (#20859) 2020-03-09 18:13:38 +05:30
Marica
2f2cef6c5f fix: ModuleNotFoundError on Turkey Company setup (#20854) 2020-03-09 18:07:55 +05:30
Deepesh Garg
875e0f5fb2 fix: Acccounting Dimension disappearing in first row after refresh 2020-03-09 18:05:35 +05:30
Deepesh Garg
d9ab412032 feat: Allow PI creation without PO 2020-03-06 19:04:41 +05:30
Saqib
6c4cddccf6 fix: show uom in print formats instead of stock uom (#20844)
Co-authored-by: Saqib Ansari <saqibansari@Saqibs-MacBook-Pro.local>
2020-03-06 11:06:41 +05:30
Marica
69d3c4ff25 fix: update_child_qty_rate() missing argument (#20839) 2020-03-06 10:57:43 +05:30
Nabin Hait
1f80c8dffe perf: improve gl entry submission (#20802)
* perf: improve gl entry submission

* perf: add indexes

* fix: replace **kwargs with *args

* fix: syntax error

* fix: travis

* chore: remove purchase invoice from status updater

* fix: set_staus args

Co-Authored-By: Nabin Hait <nabinhait@gmail.com>

* fix: only update status for invoices & fees

* [bug][fix]: set status to object instead of variable (#20790)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Saurabh <saurabh6790@gmail.com>
2020-03-05 13:04:53 +05:30
Chinmay D. Pai
12cdf0fb52 fix: use ERPNext in welcome email when default company is not set
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-05 10:11:55 +05:30
Deepesh Garg
b6a3a06c4b Merge pull request #20821 from deepeshgarg007/gst_itemised_v12
fix: HSN code no visible in GST itemised sales register
2020-03-04 10:41:55 +05:30
Deepesh Garg
2728590471 fix: HSN code no visible in GST itemised sales register 2020-03-04 10:26:25 +05:30
Priyanka Gangar
7766530afc fix: fetch sales person name (#20801)
* fix: fetch sales person name

* Update sales_person.js

Co-authored-by: pinka0925 <44537026+pinka0925@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-02 19:24:14 +05:30
Deepesh Garg
d7839eb8ac fix: Total amount not displayed in Journal Entry (#20795)
* fix: Total amount not displayed in Journal Entry

* fix: Update paid_to_received field

* fix: set total amount

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-02 18:09:24 +05:30
Prssanna Desai
6a734ecd34 fix: use get all instead of get list to fetch item attributes (#20793) 2020-03-02 18:06:21 +05:30
Mangesh-Khairnar
acd93b3bd1 fix: use system language to translate strings (#20792) 2020-03-02 18:05:59 +05:30
Marica
94200b1179 chore: Item Price and Product Bundle Form cleanup (#20773)
* chore: Item Price and Product Bundle Form cleanup

* fix: Trailing comma
2020-03-02 15:51:22 +05:30
Saqib
a6bf96322b chore: control reposting of future gl entries with flags (#20775) 2020-03-02 15:19:28 +05:30
Saqib
27163e60bb feat: link serial no to batch no (#20779)
* feat: link serial no to batch no

* fix: test cases
2020-03-02 15:03:18 +05:30
Saqib
1041516e8e fix: reconciled entries showing in bank reco (#20788) 2020-03-02 15:00:42 +05:30
Deepesh Garg
b7bbd827fd Merge pull request #20769 from marination/buying-dashboard-hotfix
chore: Rearranged Buying Module Dashboard
2020-02-29 17:34:35 +05:30
Sahil Khan
fda7cbeca4 Merge branch 'v12-pre-release' into version-12 2020-02-28 15:06:03 +05:30
Sahil Khan
2fc58b3327 bumped to version 12.5.2 2020-02-28 15:26:03 +05:50
marination
3fcd575f53 chore: Rearranged Buying Module Dashboard 2020-02-28 13:08:38 +05:30
Deepesh Garg
0cee807dfb Merge pull request #20766 from deepeshgarg007/bank_reco_release
fix: Journal Entry not being fetched in Bank Reconciliation
2020-02-28 12:35:06 +05:30
Deepesh Garg
a51c56c4b3 fix: Remove debug statement 2020-02-28 12:32:18 +05:30
Deepesh Garg
d2f26e57d2 fix: Journal Entry not being fetched in Bank Reconciliation 2020-02-28 12:32:05 +05:30
Deepesh Garg
b7790c0394 fix: Item Wise report query fix (#20765) 2020-02-28 12:30:29 +05:30
Deepesh Garg
d17e0b5aca fix: Item Wise report query fix (#20761) 2020-02-28 12:29:11 +05:30
Shivam Mishra
f08b5e4866 feat: ignore permission when deleting linked emails (#20753) 2020-02-27 19:07:39 +05:30
Deepesh Garg
78ae5e7721 Merge pull request #20749 from deepeshgarg007/bank_reco_jv_v12
fix: Journal Entry not being fetched in Bank Reconciliation
2020-02-27 16:19:01 +05:30
Deepesh Garg
5fb66a3953 fix: Remove debug statement 2020-02-27 16:15:43 +05:30
Deepesh Garg
d952e71d97 fix: Journal Entry not being fetched in Bank Reconciliation 2020-02-27 16:15:16 +05:30
rohitwaghchaure
fe337dfb66 fix: serial no material transfer performance issue (#20722) 2020-02-27 14:27:43 +05:30
Saqib
45329232b3 fix: only update items if rate or qty changed (#20743) 2020-02-27 12:51:23 +05:30
Rohan
30ad21b7d8 fix: sort Issues chronologically (#20740) 2020-02-26 18:53:48 +05:30
Marica
4e3ad9c3f2 fix: Lock stock ledger entries that are being reposted. (#20739)
- If stock ledger entries are being reposted, don't let any other transaction apply itself on the same.
2020-02-26 18:51:35 +05:30
Sahil Khan
2a1e9b542e Merge branch 'v12-pre-release' into version-12 2020-02-26 18:20:16 +05:30
Sahil Khan
8f458feafc bumped to version 12.5.1 2020-02-26 18:40:16 +05:50
Deepesh Garg
e116d8f819 Merge pull request #20738 from deepeshgarg007/bank_reco_fix_v12_pre
fix: Mandatory bank account error fix
2020-02-26 17:42:14 +05:30
Deepesh Garg
f3674ccc6c fix: SQL condition 2020-02-26 17:40:13 +05:30
Deepesh Garg
6f35a63f2d fix: Mandatory bank account error fix 2020-02-26 17:40:04 +05:30
Deepesh Garg
acbc4f648d fix: Mandatory bank account error fix (#20734)
* fix: Mandatory bank account error fix

* fix: SQL condition
2020-02-26 17:17:06 +05:30
Anurag Mishra
5475b5f562 fix: validated leave allocation (#20635)
* fix: validated leave allocation

* fix: changes requested

* Update erpnext/hr/doctype/leave_encashment/leave_encashment.py

Co-Authored-By: Nabin Hait <nabinhait@gmail.com>

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-02-26 14:50:52 +05:30
rohitwaghchaure
39861c270c fix: same free item not working for pricing rule (#20713) 2020-02-26 12:51:53 +05:30
RJPvT
6eaa542709 fix: smaller then instead of bigger then :-( dumb mistake v12 #20693 (#20701) 2020-02-26 11:59:06 +05:30
Saqib
2a8981929a perf: search for customer's return invoices then filter out gl_entries (#20710) 2020-02-26 11:36:38 +05:30
rohitwaghchaure
0aa7aa5996 fix: rate and amount in material request copying from sales order (#20718) 2020-02-26 11:27:49 +05:30
rohitwaghchaure
a20bd89c20 fix: reorder material request not created if doctype has custom mandatory field (#20720) 2020-02-26 11:25:30 +05:30
Deepesh Garg
aa7af30382 Merge pull request #20715 from rohitwaghchaure/account_dashboard_not_working_hotfix
fix: account dashboard not working
2020-02-26 10:18:27 +05:30
Rohit Waghchaure
9921d28ea7 fix: account dashboard not working 2020-02-25 12:17:25 +05:30
Sahil Khan
b26fd04843 Merge branch 'v12-pre-release' into version-12 2020-02-20 18:26:58 +05:30
Sahil Khan
1b78d20d3c bumped to version 12.5.0 2020-02-20 18:46:57 +05:50
sahil28297
b203406d4c fix: proper release note version 2020-02-20 18:20:33 +05:30
Mangesh-Khairnar
5a0017c61a Merge pull request #20686 from Anurag810/additional_salary_fixes
fix: Additional salary can be created only for active employee
2020-02-20 16:21:55 +05:30
Anurag Mishra
df15c758f6 fix: Additional salary can be created only for active employee 2020-02-20 15:29:09 +05:30
Mangesh-Khairnar
588a89f957 fix: return null for attribute (#20684) 2020-02-20 13:41:00 +05:30
Mangesh-Khairnar
c74343531f fix: skip earned leaves check for max leaves set to zero or less (#20536)
* fix: skip earned leaves check for max leaves set to zero or less

* test: earned leaves creation
2020-02-20 13:25:45 +05:30
Deepesh Garg
a257189c77 Merge pull request #20451 from Anurag810/fleet-management_v12
fix: odometer value was not syncing properly
2020-02-20 13:20:21 +05:30
Rohan
355051bf75 fix: apply url encoding to project names (#20641) 2020-02-20 12:59:21 +05:30
Anurag Mishra
ab8aa43ffb fix: changed field type which was affecting filters (#20670) 2020-02-20 12:52:37 +05:30
Mathieu Brunot
a6f56bbc3e chore(ci-coverage): Pin coverage 4.5.4 #20646 (#20648)
* chore(ci-coverage): Pin coveralls 4.5.4 #20646

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

* chore: Pin coverage

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2020-02-20 12:50:09 +05:30
gavin
4e2b9395b9 chore: drop cypress requirement (#20675) 2020-02-20 12:48:32 +05:30
Saqib
ae9159fbd8 fix: mandatory on hold comment for purchase invoice (#20667) 2020-02-20 12:33:07 +05:30
Saqib
8e80c17602 chore: SINV set_status remove redundant function calls (#20661) 2020-02-20 12:32:09 +05:30
Saqib
8903258362 fix: mandatory on hold comment for purchase invoice (#20668)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-02-20 12:30:35 +05:30
Saqib
1beeb28908 fix: check for available stock in product bundle's website warehouse (#20680) 2020-02-20 12:22:33 +05:30
Saqib
2d2aa7d664 fix: check for available stock in product bundle's website warehouse (#20679)
* fix: check for available stock in product bundle's website warehouse

* test: earned leaves creation

* fix: minor change

Co-authored-by: Mangesh-Khairnar <mkhairnar10@gmail.com>
2020-02-20 12:22:01 +05:30
Nabin Hait
cd6b60df70 core: Added change log 2020-02-20 12:18:21 +05:30
Nabin Hait
b18790f5c2 Merge branch 'version-12-hotfix' into v12-pre-release 2020-02-19 19:19:36 +05:30
Mangesh-Khairnar
f6d7090f07 fix: earned leaves creation for zero maximum leaves (#20677) 2020-02-19 19:16:40 +05:30
Deepesh Garg
017d280877 Merge pull request #20664 from marination/stock-settings-query-v12-hotfix
fix: Set Query on warehouse fields in Stock Settings
2020-02-19 18:58:46 +05:30
Anurag Mishra
031d4092d0 test: syncing of odometer value 2020-02-19 16:49:13 +05:30
marination
0119d15adb fix: Server side validation for Warehouses 2020-02-19 11:21:55 +05:30
Deepesh Garg
df6cb3c43b Merge pull request #20633 from scmmishra/tree-fix-qms
fix: filters for quality_procedure tree
2020-02-19 09:40:52 +05:30
marination
1ed737cf64 fix: Set Query on warehouse fields in Stock Settings 2020-02-18 21:45:52 +05:30
Deepesh Garg
c64e46fe67 Merge pull request #20483 from racitup/plaid-20343-fix
fix: Plaid fixes and enhancements
2020-02-18 18:03:16 +05:30
Nabin Hait
f579b0e3de fix: merge conflict 2020-02-18 17:49:20 +05:30
Deepesh Garg
b63c041aa4 feat: Group by AR/AP report (#20574)
* feat: Group by AR/AP report

* fix: Do not consider total row in charts

* fix: Subtotal row for last party
2020-02-18 16:09:37 +05:30
rohitwaghchaure
22f9a5f09f Merge pull request #20639 from nextchamp-saqib/pos-mode-of-pay-fix-v12
fix: disabled mode of payments fetches in sales invoices
2020-02-18 12:38:14 +05:30
rohitwaghchaure
e47875340e Merge pull request #20655 from marination/precision-mr-item-hotfix
fix: Stock Quantity not calculated on client side in Material Request…
2020-02-18 12:34:27 +05:30
marination
6f28383531 fix: Stock Quantity not calculated on client side in Material Request Items. 2020-02-18 11:08:16 +05:30
Deepesh Garg
95050702f1 Merge branch veersion-12-hotfix into plaid-20343-fix 2020-02-17 22:11:14 +05:30
Deepesh Garg
ae8f717fe5 Merge pull request #20640 from gavindsouza/updated-requirements
chore(requirements): Pin requirements
2020-02-17 22:05:26 +05:30
Gavin D'souza
f95ac99baa fix(travis): add lib cups for updated frappe requirements 2020-02-17 16:52:27 +05:30
Shivam Mishra
660b4d1e2f feat: show numeric values in item configurator (#20430) 2020-02-17 15:58:31 +05:30
thefalconx33
5bfebaf1c0 fix: disabled mode of payments fetches in sales invoices 2020-02-17 14:16:49 +05:30
Deepesh Garg
980e54c5f4 Merge pull request #20570 from Er-Naren719/hotfix-user-table-columns-updated
feat: columns under user table updated
2020-02-17 11:19:23 +05:30
Shivam Mishra
efbfeb2d89 fix: filters for quality_procedure tree 2020-02-17 10:50:05 +05:30
rohitwaghchaure
0676ed08b1 Merge pull request #20540 from rohitwaghchaure/fixed_purchase_receipt_time_out_error
fix: time out error while submitting the purchase receipt
2020-02-11 19:55:04 +05:30
rohitwaghchaure
e9946672e0 Merge branch 'version-12-hotfix' into fixed_purchase_receipt_time_out_error 2020-02-11 19:54:54 +05:30
rohitwaghchaure
6124f83e6e Merge pull request #20556 from ashish-greycube/patch-3
fix: backflush raw material based on - Material Transferred for Manufacture
2020-02-11 19:50:09 +05:30
Deepesh Garg
2b83debc72 Merge pull request #20564 from govindsmenokee/patch-4
fix: get_students not respecting the program
2020-02-11 17:03:24 +05:30
Er-Naren719
fc4cc9ab42 feat: column width increased for view attachments field (#314) 2020-02-11 10:17:34 +00:00
Deepesh Garg
cd19974d7a Merge pull request #20566 from vishdha/filter_serial_based_on_batch_v12
fix: filter serial no based on batch no
2020-02-11 13:44:54 +05:30
vishal
cde48a44cf fix: filter serial no based on batch no 2020-02-11 12:39:49 +05:30
Govind S Menokee
57d33f9ce6 fix: get_students not respecting the program
The get_students function is not taking into account the program for which the fee needs to be created. If a student is enrolled for multiple programs then the fee schedule pull up the wrong count of students.
2020-02-11 11:23:16 +05:30
Deepesh Garg
90a46acc0d Merge pull request #20557 from rohitwaghchaure/added_indexing_on_columns_to_fix_performance_issue
fix: added indexing on columns to fix performace issue
2020-02-11 10:13:24 +05:30
Deepesh Garg
60634cc829 Merge pull request #20252 from deepeshgarg007/group_by_sales_v12
feat: Group by item wise sales register
2020-02-10 22:20:21 +05:30
Rohit Waghchaure
a7c27596bb fix: added indexing on columns to fix performace issue 2020-02-10 15:30:22 +05:30
Deepesh Garg
b4e3146665 Merge pull request #20550 from nextchamp-saqib/so-update-items-warehouse-fix-v12
fix: mandatory warehouse wrror while updating items after submission
2020-02-10 12:09:38 +05:30
Ashish Shah
495ab6c7f2 fix: backflush raw material based on - Material Transferred for Manufacture
Hi @nabinhait ,
 
Issue : Manufacturing setting > Backflush Raw Material Based on “Material Transferred for Manufacture” doesn't fetch the actual raw material transferred qty. It fetches qty based on "BOM"

The issue is because @creamdory in PR #https://github.com/frappe/erpnext/pull/13384
commit : https://github.com/frappe/erpnext/pull/13384/files#diff-91f0ed661ef4b6e1f167fc7961b1a79b

```
changed from: if trans_qty and manufacturing_qty >= (produced_qty + flt(self.fg_completed_qty)):
to : if trans_qty and manufacturing_qty > (produced_qty + flt(self.fg_completed_qty)):
```
**'='** was added by her in the condition, which was not there before her commit.
Kindly except the fix for the issue.


https://github.com/frappe/erpnext/blob/develop/erpnext/stock/doctype/stock_entry/stock_entry.py#L1057

https://github.com/frappe/erpnext/pull/13384

https://github.com/frappe/erpnext/pull/13384/files#diff-91f0ed661ef4b6e1f167fc7961b1a79b

**before fix gif** :  Stock Entry = Manufacture shows raw material quantity as per BOM.

![FetchTransQtyError](https://user-images.githubusercontent.com/29812965/74123824-ffdd8600-4bf5-11ea-8873-95de24a7ef09.gif)

**after fix gi**f :  Stock Entry = "Manufacture" shows raw material quantity as per "Material Transfer for Manufacture".

![FetchTransQtyFix](https://user-images.githubusercontent.com/29812965/74123836-0c61de80-4bf6-11ea-86fb-d9619fd9b02b.gif)
2020-02-10 11:13:27 +05:30
Deepesh Garg
0e396a62b1 Merge pull request #20554 from ruchamahabal/fix_regional_data_v12
fix: patch for creating irs_1099 custom field (United States)
2020-02-10 09:08:55 +05:30
Rucha Mahabal
1343a4b755 fix: patch for creating irs_1099 custom field (United States) 2020-02-10 00:31:44 +05:30
rohitwaghchaure
ec45c096a0 fix: pricing rule not working on item groups (#20546) 2020-02-09 19:45:42 +05:30
thefalconx33
c7e523cee4 fix: mandatory warehouse wrror while updating items after submission 2020-02-09 12:21:01 +05:30
rohitwaghchaure
9e436336e2 Merge pull request #20542 from rohitwaghchaure/fixed_incorrect_material_request_warehouse_in_production_plan
fix: incorrect warehouse for material request in production plan
2020-02-07 17:43:32 +05:30
Rohit Waghchaure
a9205adfbd fix: test cases 2020-02-07 15:38:56 +05:30
Deepesh Garg
f5bff5f15d fix: Styling and minor fixes 2020-02-07 15:25:43 +05:30
Rohit Waghchaure
bbeacb9acf fix: incorrect warehouse for material request in production plan 2020-02-07 15:04:37 +05:30
Rohit Waghchaure
7027584391 fix: time out error while submitting the purchase receipt which has more than 100 serial nos 2020-02-07 14:41:00 +05:30
Deepesh Garg
372d4e2e05 Merge branch 'group_by_sales_v12' of github.com:deepeshgarg007/erpnext into group_by_sales_v12 2020-02-07 11:10:10 +05:30
Deepesh Garg
bdfa2ff33a fix: Do not calculate total for rate 2020-02-07 11:09:43 +05:30
Deepesh Garg
787b31674a Merge pull request #20534 from rohitwaghchaure/procurement_tracker_not_working_for_special_char_company_name_v12_hotfix
fix: Procurement Tracker report not working
2020-02-07 10:44:13 +05:30
Rohit Waghchaure
0eb9f7408e fix: Procurement Tracker report not working 2020-02-06 14:38:51 +05:30
Deepesh Garg
5c96415eb5 Merge pull request #20530 from nextchamp-saqib/mv-fix-v12
fix: typo; serial no doesn't have amc start date
2020-02-06 13:58:29 +05:30
thefalconx33
d9f8347fc8 fix: typo; serial no doesn't have amc start date 2020-02-06 12:58:48 +05:30
Deepesh Garg
2a48fe6ce6 Merge pull request #20524 from deepeshgarg007/bank_account_label__v12
Bank account label  v12
2020-02-05 18:04:12 +05:30
deepeshgarg007
3ed574532d fix: filter 2020-02-05 18:02:31 +05:30
deepeshgarg007
9f58e59a2c fix: Label and UX fixes while creating payment entry against customer 2020-02-05 18:02:19 +05:30
Deepesh Garg
23c6d6cf16 Merge pull request #20522 from rohitwaghchaure/picklist_nonetype_error
fix: unsupported operand type(s) for += 'int' and 'NoneType'
2020-02-05 17:44:46 +05:30
Rohit Waghchaure
8e0a9e8748 fix: unsupported operand type(s) for += 'int' and 'NoneType' 2020-02-05 16:17:16 +05:30
Deepesh Garg
67dbeee7b2 fix: Add total row 2020-02-05 15:34:08 +05:30
Parth J. Kharwar
b4a0c773ae fix: half day leave date value reset (#20488)
* fix: full day leaves not tagged as half day in attendance

* chore: code cleanup for half day date value set
2020-02-05 15:00:58 +05:30
Anurag Mishra
ce598530db fix: requested changes 2020-02-05 12:49:11 +05:30
Deepesh Garg
694f57fbb4 Merge pull request #20521 from deepeshgarg007/fixnancial_query_fix_v12
fix: SQL query in financial statements
2020-02-05 12:33:06 +05:30
Deepesh Garg
0f90b870fb fix: SQL query in financial statements 2020-02-05 12:30:15 +05:30
Nabin Hait
bd5b37dbb7 Merge branch 'v12-pre-release' into version-12 2020-02-03 19:00:36 +05:30
Nabin Hait
7e93e87244 bumped to version 12.4.3 2020-02-03 19:20:36 +05:50
Deepesh Garg
02f4aa6db6 fix: Unable to submit landed cost voucher (#20494)
* fix: Unable to submit landed cost voucher

* fix: Test case for multiple landed cost voucher against a Purchase receipt

* fix: Test Case
2020-02-03 18:56:43 +05:30
Deepesh Garg
ade2c36123 fix: Unable to submit landed cost voucher (#20494)
* fix: Unable to submit landed cost voucher

* fix: Test case for multiple landed cost voucher against a Purchase receipt

* fix: Test Case
2020-02-03 18:54:35 +05:30
Pranav Nachnekar
3ef80f2d2e fix: disallow quick entry for doctypes with tree view (#20453)
* fix: imporer escaping

* fix: disallow quick entry for doctypes with tree view
2020-02-03 17:05:30 +05:30
Himanshu
85c6480b41 fix(Report): Quality Review report sql fix (#20425)
* fix: report fix

* fix: add QM permission

* fix: add QM permission
2020-02-03 16:16:42 +05:30
Saqib
f3c94315c3 feat: add tax category in pos profile (#20414)
* feat: add tax category in pos profile

* fix: review fixes
2020-02-03 15:53:22 +05:30
Saqib
a4219f1cfe fix: gst permission for gst settings & hsn code (#20501)
* fix: gst permission for gst settings & hsn code

* Fix: Typo

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2020-02-03 15:40:53 +05:30
Deepesh Garg
831a7ddd6f fix: Minor fixes 2020-02-01 23:15:21 +05:30
Parth J. Kharwar
43886ca016 fix: employee checkin doctype time permissions (#20473) 2020-01-31 14:37:56 +05:30
rohitwaghchaure
61b4244837 Merge pull request #20479 from deepeshgarg007/finance-book-filter-new-v12
fix: Do not show any finance book record if no finance book filter is applied
2020-01-31 13:19:49 +05:30
Deepesh Garg
6871979acc Merge pull request #20470 from alyf-de/version-12-hotfix
fix(regional): byte strings in DATEV Report
2020-01-31 11:20:51 +05:30
Deepesh Garg
bb7cf81d52 fix: Cash flow filter fix 2020-01-31 11:18:26 +05:30
Deepesh Garg
9826291c52 fix: Filtering fixes in financial statement 2020-01-31 11:18:13 +05:30
racitup
08661250d2 Ignore codacy SQL injection warning (internal code only) and add copyright notice 2020-01-30 15:22:34 +00:00
racitup
814001a90f fix: attempt at pymysql InternalError 1054 about clearance_date in field list when removing payments from bank transactions 2020-01-30 15:22:34 +00:00
racitup
eef73a0d92 manually added patch for bank reconciliation fields since develop branch was in a different place #20380 2020-01-30 15:22:34 +00:00
racitup
a1e3202054 fix: Bank Reconciliation Bank Account and Bank Account No field names 2020-01-30 15:22:34 +00:00
racitup
bee017e17c fix: Plaid transaction import order, transaction_id duplicate check, added transaction category tags 2020-01-30 15:22:34 +00:00
racitup
a054508211 fix: Plaid automatic_synchronization TypeError on filter & add info log message #20343 2020-01-30 15:22:34 +00:00
racitup
feaa82a8ea fix: KeyError about bank_account_no due to non-existent field: #20343 2020-01-30 15:22:34 +00:00
racitup
a175e06149 fix: pymysql.err.InternalError about t2.bank_account_no due to removal of field from Journal Entry Account table: #20343 2020-01-30 15:22:34 +00:00
Deepesh Garg
ba4d9469ff fix: Do not show any finance book record if no finance book filter is applied 2020-01-30 15:41:44 +05:30
Deepesh Garg
54c6f91dde Merge pull request #20474 from ParthKharwar/hotfix-brand-breadcrumb
fix: rename breadcrumb for Brand DocType from Selling to Stock
2020-01-30 13:14:21 +05:30
Parth Kharwar
e552e958de fix: rename breadcrumb for Brand DocType from Selling to Stock 2020-01-30 12:35:02 +05:30
Raffael Meyer
7524ecbc59 fix #20469 2020-01-30 00:08:25 +01:00
Deepesh Garg
be2ca5f8cc Merge pull request #20460 from 0Pranav/fix-supplier-quotation-button-v12
fix: missing plus button in request for quotaion for supplier quotation
2020-01-29 10:45:32 +05:30
0Pranav
d4d641a07e fix: missing plus button in request for quotaion for supplier quotation 2020-01-29 09:36:48 +05:30
rohitwaghchaure
8e5b812a97 fix: incorrect work order qty for sub assembly items (#20448) 2020-01-28 14:34:54 +05:30
Nabin Hait
df94f0565e fix: cannot complete task if dependent task are not completed / cancelled (#20434) 2020-01-28 14:08:48 +05:30
Anurag Mishra
637915f295 fix: odometer value was not syncing properly 2020-01-28 13:15:26 +05:30
Pranav Nachnekar
f2838c4a13 fix: discounting not applied on sales invoice created by subscriptions (#20432)
* fix: imporer escaping

* fix: discounting not applied on sales invoice created by subscriptions
2020-01-28 12:52:42 +05:30
Marica
fe56c7ce39 fix: Column 'project' in where clause is ambiguous (#20439)
* fix: Column 'project' in where clause is ambiguous

* fix: Fixed alias in query
2020-01-28 12:44:03 +05:30
Deepesh Garg
29ecbde445 Merge pull request #20446 from Alchez/v12-driver-address-fetch
fix: only fetch driver address if not set (v12)
2020-01-28 09:20:53 +05:30
Deepesh Garg
611f212aa4 Merge pull request #20443 from fproldan/fix_sqlinjection_hotfix_v12
fix: SQL Injection in get_product_list_for_group method
2020-01-28 09:18:11 +05:30
Rohan Bansal
6fbafa1924 fix: only fetch driver address if not set 2020-01-27 18:04:33 +05:30
NahuelOperto
875bac8bb9 Fix sql injection 2020-01-27 08:58:01 -03:00
Saqib
b4b410f1d2 refac: filters and columns of fixed asset register report (#20420) 2020-01-27 16:06:15 +05:30
deepeshgarg007
eec0ee83e2 fix: Changes in total row display 2020-01-27 15:51:20 +05:30
Deepesh Garg
148951e6f3 fix: Finance book filtering in financial statements (#20411)
* fix: Finance book filtering in financial statements

* fix: Use IS NULL instead of ifnull
2020-01-27 15:18:45 +05:30
Saqib
612e3b77fd fix: incorrect status for fraction of outstanding amount (#20370) 2020-01-27 14:23:05 +05:30
Deepesh Garg
a60849f6ab Merge pull request #20415 from hrwX/customer_primary_addr_v12
fix(Customer): Change `primary_address` fieldtype to Text
2020-01-27 12:33:38 +05:30
deepeshgarg007
6f27e97980 fix: Add group by functionality to purchase register 2020-01-27 08:49:52 +05:30
deepeshgarg007
8d9145aaac fix: Code cleanup and commonification 2020-01-27 08:49:42 +05:30
Himanshu Warekar
25a7330db0 fix: change primary addr fieldtype to Text 2020-01-24 17:36:59 +05:30
Saqib
92c999afcb fix: wrong outstanding invoices fetched against employee (#20374) 2020-01-24 16:23:05 +05:30
Anurag Mishra
9e3dc25b1c fix: Duplicate Attendance Due Wrong Date format (#20389) 2020-01-24 16:14:38 +05:30
Rucha Mahabal
2a3cd7d601 fix(Healthcare): disabled Lab Test Template shown as Enabled in List View (#20379)
* fix (Healthcare): disabled Lab Test Template shown as enabled in List View

* fix: remove custom disabled button and unhide disabled field
2020-01-24 16:11:16 +05:30
Marica
3ca67ceebb fix: Product Page non-stock item status (#20384) 2020-01-24 15:52:12 +05:30
Rucha Mahabal
245fc49089 fix: healthcare settings registration fee NoneType error (#20396) 2020-01-24 15:50:40 +05:30
rohitwaghchaure
78199dbf0a Merge pull request #20399 from rohitwaghchaure/fixed_serial_no_button_not_working_v12_hotfix
fix: add serial no button not working
2020-01-24 13:49:25 +05:30
Deepesh Garg
2ac33c9ce9 Merge pull request #20402 from deepeshgarg007/general_ledger_sort_v12
fix: Order GL entries by creation time in General ledger
2020-01-24 13:19:56 +05:30
Deepesh Garg
34cd035d8c Merge pull request #20392 from rohitwaghchaure/unlink_reference_name_from_batch_on_cancel_of_stock_transactions
fix: unlink references from batch on cancellation of stock transactions
2020-01-23 22:41:21 +05:30
deepeshgarg007
ba4f565ca3 fix: Order GL entries by creation time in General ledger 2020-01-23 17:48:41 +05:30
Rohit Waghchaure
5860427bc5 delete the auto created batch 2020-01-23 17:43:30 +05:30
Rohit Waghchaure
89f42eef49 fix: add serial no button not working 2020-01-23 15:53:45 +05:30
Deepesh Garg
eacbfa15c0 Merge pull request #20385 from rohitwaghchaure/fixed_lead_date_comparision_issue
fix: lead date comparison issue
2020-01-23 15:23:28 +05:30
Deepesh Garg
5d45c2c184 Merge pull request #20387 from rohitwaghchaure/lead_showing_two_times_in_the_report
fix: lead details duplicate entries
2020-01-23 15:21:11 +05:30
Deepesh Garg
b24b0378ea Merge pull request #20382 from nextchamp-saqib/small-fix-asset-v12
fix: tuple index out of range error
2020-01-23 15:02:29 +05:30
Rohit Waghchaure
144012a5de fix: unlink references from batch on cacnellation of stock transactions 2020-01-23 12:42:42 +05:30
rohitwaghchaure
5fb4027375 Merge pull request #20376 from rohitwaghchaure/zero_division_qty_error_while_completing_fg_entry_v12_pre_release
fix: Zero division error while making finished good entry against the…
2020-01-22 17:01:21 +05:30
rohitwaghchaure
3fa65f1363 Merge pull request #20375 from rohitwaghchaure/zero_division_qty_error_while_completing_fg_entry
fix: Zero division error while making finished good entry against the…
2020-01-22 17:00:44 +05:30
Rohit Waghchaure
79f630661a fix: lead details duplicate entries 2020-01-22 16:53:30 +05:30
Rohit Waghchaure
61b9fe6a81 fix: lead date comparison issue 2020-01-22 14:43:37 +05:30
thefalconx33
f38d9d8f0d fix: tuple index out of range error 2020-01-22 12:24:03 +05:30
Rohit Waghchaure
3a67daa1fd fix: Zero division error while making finished good entry against the work order 2020-01-21 19:25:27 +05:30
Rohit Waghchaure
813726b415 fix: Zero division error while making finished good entry against the work order 2020-01-21 19:22:27 +05:30
rohitwaghchaure
87fe2143be fix: not able to import chart of account if parent account is missing (#20367) 2020-01-21 15:32:12 +05:30
Saqib
c759b06f16 fix: account not added to child company (#20364)
* fix: account not added to child company

* fix: removed print

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-01-21 15:26:46 +05:30
Chinmay Pai
c32249a72f fix: Set Quotation expired if not Ordered or Lost (#20365)
Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>

Co-authored-by: KanchanChauhan <angel143.dr@gmail.com>
2020-01-21 14:12:49 +05:30
Nabin Hait
7cd6022a0b Merge branch 'v12-pre-release' into version-12 2020-01-21 13:07:27 +05:30
Nabin Hait
67274d01e8 bumped to version 12.4.2 2020-01-21 13:27:26 +05:50
Nabin Hait
19d7e43b90 fix: Don't fetch price list rate on change of qty (#20360) 2020-01-21 13:04:30 +05:30
Nabin Hait
05f4be69f4 fix: Don't fetch price list rate on change of qty (#20362) 2020-01-21 13:04:26 +05:30
Mangesh-Khairnar
541881162a fix: calculate remaining leave balance (#20342)
* fix: calculate remaining leave balance

* fix: nonetype issue in the total leaves calculation
2020-01-20 19:42:49 +05:30
Sahil Khan
c8884257b9 Merge branch 'v12-pre-release' into version-12 2020-01-20 18:02:31 +05:30
Sahil Khan
4674fec320 bumped to version 12.4.1 2020-01-20 18:22:31 +05:50
rohitwaghchaure
c7f0ab8ed6 fix: incorrect number of gl entries issue (#20351) 2020-01-20 17:53:44 +05:30
rohitwaghchaure
19c5e031a9 fix: incorrect number of gl entries issue (#20350) 2020-01-20 17:52:53 +05:30
Marica
8b943af911 fix: 'get_additonal_costs' is not defined (#20349)
* fix: 'get_additonal_costs' is not defined

* fix: Re-added get_items on Work order change.
2020-01-20 15:47:47 +05:30
Marica
863eb86a1d fix: 'get_additonal_costs' is not defined (#20345)
* fix: 'get_additonal_costs' is not defined

* fix: Re-added get_items on Work order change.
2020-01-20 15:46:50 +05:30
Nabin Hait
e5fbebe126 fix: deprecated fetching item price based on min_qty (#20348) 2020-01-20 15:45:09 +05:30
Nabin Hait
45be9fe416 fix: deprecated fetching item price based on min_qty (#20346) 2020-01-20 15:44:48 +05:30
Nabin Hait
1596352585 fix: close_opportunity_after_days field is in selling settings (#20334) 2020-01-17 15:59:02 +05:30
Nabin Hait
4b893b1d51 fix: Plaid TypeError in add_bank_accounts (#20336) 2020-01-17 15:57:43 +05:30
Parth J. Kharwar
d85e144944 chore: changed employee contact field name (#20227) 2020-01-17 11:47:49 +05:30
Rohan
4dfff5a271 fix: handle default value for batch size in BOM operation (#20327) 2020-01-17 11:46:00 +05:30
Pranav Nachnekar
c2b9598966 fix: imporer escaping (#20329) 2020-01-17 11:45:03 +05:30
Vishal Dhayagude
d16e7c096b fix: salary structure assignment filter employee based on company (#20319)
* fix: pick company from employee salary structure

* fix: Salary structure assignment fetch company from enmployee

* Revert "fix: Salary structure assignment fetch company from enmployee"

This reverts commit ab2da691c79646d6d095f347ea3e273f466ee34f.

* fix: Salary structure assignment fetch company from enmployee

* fix: filter on company for salary structure assignment

* fix: minor changes

* fix: minor changes

* fix: added company to salary strucutre assignment
2020-01-17 11:44:20 +05:30
sahil28297
d5676a87a8 Merge pull request #20331 from 0Pranav/version-12
fix: imporer escaping
2020-01-16 17:51:32 +05:30
0Pranav
73dff8993a fix: imporer escaping 2020-01-16 17:38:11 +05:30
Sahil Khan
0ef799dff8 Merge branch 'v12-pre-release' into version-12 2020-01-16 14:30:35 +05:30
Sahil Khan
e8476ef42a bumped to version 12.4.0 2020-01-16 14:50:35 +05:50
Himanshu
5511912251 fix: don't hide primary_address_and_contact_detail (#20321) 2020-01-16 13:39:03 +05:30
Saqib
514d3c37b9 fix: hide total amount field from journal entry PF (#20325) 2020-01-16 13:38:21 +05:30
Nabin Hait
9fef6e1b68 docs: Added change log for v12.4.0 (#20326) 2020-01-16 13:37:46 +05:30
Nabin Hait
37c51f5913 fix: Multiple fixes based on testing on pre-release branch (#20300)
* fix: Multiple fixes based on testing on pre-release branch

* fix: reload hr settings
2020-01-16 13:37:30 +05:30
Nabin Hait
7721954bbb fix: Multiple fixes based on testing on pre-release branch (#20303)
* fix: Multiple fixes based on testing on pre-release branch

* fix: reload hr settings
2020-01-16 13:37:20 +05:30
Nabin Hait
7e33d875e0 Revert "fix: incorrect required qty for subcontracting purchase receipt (#20288)" (#20323)
This reverts commit b65b525c44.
2020-01-16 13:02:40 +05:30
Marica
0a50088a0e fix: Applied query on PO Supplier popup field in Material Request. (#20232) 2020-01-15 19:24:10 +05:30
Marica
6ba6ba27bd fix: Missing argument in status updater (#20284) 2020-01-15 19:22:21 +05:30
Saqib
611e23c149 fix: make jv depreciations only if calculate depr is checked (#20283) 2020-01-15 19:05:42 +05:30
sahil28297
89affd8d09 fix(patch): reload tax category (#20307) 2020-01-15 18:58:09 +05:30
sahil28297
ab2e52ca07 fix(patch): reload tax category (#20309) 2020-01-15 18:57:40 +05:30
sahil28297
8dfd5535f1 fix(patch): do not append taxes to template if account name is not set (#20311) 2020-01-15 18:57:20 +05:30
sahil28297
dc0ea3fdb0 fix(patch): do not append taxes to template if account name is not set (#20310) 2020-01-15 18:57:08 +05:30
rohitwaghchaure
b65b525c44 fix: incorrect required qty for subcontracting purchase receipt (#20288) 2020-01-15 16:37:10 +05:30
Saqib
8c45ae73b3 fix: get existing payment req amount only from unpaid req (#20290) 2020-01-15 16:36:19 +05:30
rohitwaghchaure
4872417f86 fix: incorrect number of GL Entries error in stock entry (#20298) 2020-01-15 16:35:15 +05:30
rohitwaghchaure
fed9e2861c fix: incorrect number of GL Entries error in stock entry (#20297) 2020-01-15 16:35:02 +05:30
Pranav Nachnekar
c50f08a23a fix: remove debugger statement (#20294)
introduced in https://github.com/frappe/erpnext/pull/20222
2020-01-15 14:49:42 +05:30
Pranav Nachnekar
6e115638a1 fix: remove debugger statement (#20295)
backport of https://github.com/frappe/erpnext/pull/20294
2020-01-15 14:49:28 +05:30
Saqib
2d37bbedaa fix: auto cancel if movement exists (#20268)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-01-14 12:42:43 +05:30
rohitwaghchaure
00f6f114e7 Merge pull request #20278 from rohitwaghchaure/fixed_report_stock_and_account_value_comparison_v12_pre_release
fix: filter issue for the stock and account value comparision report
2020-01-14 12:19:04 +05:30
rohitwaghchaure
437be1162e Merge pull request #20277 from rohitwaghchaure/fixed_report_stock_and_account_value_comparison_v12_hotfix
fix: filter issue for the stock and account value comparision report
2020-01-14 12:18:50 +05:30
Rohit Waghchaure
ca4789c9f7 fix: filter issue for the stock and account value comparision report 2020-01-14 12:17:27 +05:30
Rohit Waghchaure
e3b6a14ab1 fix: filter issue for the stock and account value comparision report 2020-01-14 12:15:06 +05:30
Saqib
eb7893768b fix: payment entry can be created against on hold PI (#20271) 2020-01-14 12:07:30 +05:30
Saqib
6e1ef4f5c2 fix: gl not generated on manual asset creation (#20266) 2020-01-14 11:38:00 +05:30
Saqib
d56bc81daf fix: gl not generated on manual asset creation (#20267) 2020-01-14 11:36:47 +05:30
Deepesh Garg
7d7027f47c fix: Remove patch to set automatic tax fetching from item tax template (#20235)
* fix: Remove patch to set automatic tax fetching from item tax template

* fix: Remove duplicate patch
2020-01-13 15:09:21 +05:30
Deepesh Garg
a14f72590d fix: Remove patch to set automatic tax fetching from item tax template (#20236)
* fix: Remove patch to set automatic tax fetching from item tax template

* fix: Remove duplicate patch
2020-01-13 15:09:16 +05:30
Deepesh Garg
7086ecb3b0 Merge pull request #20246 from nextchamp-saqib/asset-cancel-fix-v12
fix: auto cancel if movement exists
2020-01-13 15:07:57 +05:30
Saqib
4b401f0573 Merge pull request #20263 from nextchamp-saqib/customer-jv-fix-v12-pre
fix: remove default customer as party type
2020-01-13 14:12:22 +05:30
thefalconx33
5beee8af58 fix: remove default customer as party type 2020-01-13 13:51:17 +05:30
Deepesh Garg
8508ace50e Merge pull request #20258 from nextchamp-saqib/revery-hv-v12
fix: remove default customer as party type
2020-01-13 13:49:20 +05:30
thefalconx33
c52ef56875 fix: remove default customer as party type 2020-01-13 12:45:08 +05:30
deepeshgarg007
4dfe8ab483 fix: Remove debug param 2020-01-12 22:15:25 +05:30
deepeshgarg007
ea5e0a9d5b fix: Grand total query fix 2020-01-12 21:56:31 +05:30
deepeshgarg007
30111e6403 fix: Remove group-by item 2020-01-12 21:56:22 +05:30
deepeshgarg007
e5a572a4a8 fix: Group by sales register report 2020-01-12 21:56:12 +05:30
thefalconx33
83ed7df8cd fix: auto cancel if movement exists 2020-01-11 14:20:18 +05:30
Deepesh Garg
97e93c6257 Merge pull request #20238 from deepeshgarg007/hsn_template_v12
fix: Item tax template fetching from HSN Code
2020-01-10 21:45:22 +05:30
Deepesh Garg
f7cd8c2702 Merge pull request #20239 from deepeshgarg007/hsn_template_v12
fix: Item tax template fetching from HSN Code
2020-01-10 21:43:26 +05:30
deepeshgarg007
f67b3f8a79 fix: Item tax template fetching from HSN Code 2020-01-10 15:04:34 +05:30
Nabin Hait
8356d214e1 Merge branch 'version-12-hotfix' into v12-pre-release 2020-01-09 15:09:20 +05:30
rohitwaghchaure
64f3577148 feat: report to show difference between stock and account value (#20226) 2020-01-09 15:05:26 +05:30
Marica
ff3ff9a3c2 fix: Employee name in Report trial balance for party (#20224)
* fix: Employee name in Report trial balance for party

* fix: Add account filter in trial balance for party report

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2020-01-09 13:34:30 +05:30
Pranav Nachnekar
03c1396fc7 fix: Parent Item of Product Bundle should not appear in dialog (#20222)
* fix: add new delivery note button in Sales Order

* fix: parent item should not appear in raw material request dialog
2020-01-09 13:31:53 +05:30
Pranav Nachnekar
4479b93c1a fix: escape % in customer name (#20203)
* fix: add new delivery note button in Sales Order

* fix: escape % in customer name

* Update sales_order.js

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-01-09 12:22:11 +05:30
Anurag Mishra
da82edf711 fix: submit salary is not showing after creating slary slip in payroll (#20225) 2020-01-09 12:06:14 +05:30
Saqib
7b8bf4f4d4 Merge pull request #20213 from nextchamp-saqib/pay-entry-v12
fix: paid amount gets overwritten by get_outstanding_invoices
2020-01-07 13:33:16 +05:30
thefalconx33
07c915d00b fix: paid amount gets overwritten by get_outstanding_invoices 2020-01-07 13:14:01 +05:30
Marica
75b62cdd9f fix: Added description and title to supplier selection popup in Material Request. (#20180) 2020-01-07 13:06:13 +05:30
Don-Leopardo
54f2d53522 fix: get_item_price not working properly (#20206)
* fix: min_qty not working without party and valid_from not being used to order results

* fix: fetch price on item qty change
2020-01-07 11:35:56 +05:30
Deepesh Garg
55bdaae3ee feat: Validity for Item taxes (#20136)
* feat: Validity for Item taxes

* fix: Add HSN wise taxes

* fix: Sort taxes based on validity

* fix: Validation for item tax template and filters based on validity

* fix: Add missing semicolon

* fix: Validate tax template only if item code available

* fix: Do not validate or filter item tax template if no item taxes applied

* fix: Consider item group for validating taxes

* fix: Test cases for item tax  validation

* fix: Item tax template filtering fixes

* fix: Add missing semicolon

* fix: Remove unnecessary query
2020-01-07 11:31:19 +05:30
sahil28297
6bbfce13fe fix(item_tax_template): fetch parent account if not set (#20197) 2020-01-07 11:30:18 +05:30
Pranav Nachnekar
0980ebe93e fix: add new delivery note button in Sales Order (#20200)
* fix: add new delivery note button in Sales Order

* fix: removed debugger

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-01-07 11:29:45 +05:30
Rohan
ded5a255af fix: integer UOM check in transactions (#20177) 2020-01-07 11:24:02 +05:30
Anurag Mishra
13c29aeec4 fix: loan deduction during creation of bank entry in payroll (#20194) 2020-01-07 11:13:58 +05:30
rohitwaghchaure
cf261d0788 Merge pull request #20196 from rohitwaghchaure/fixed_party_type_in_payment_request_hotfix
fix: incorrect party type in payment request
2020-01-06 15:16:30 +05:30
Rohit Waghchaure
3074679d7e fix: party type in payment request 2020-01-06 15:09:09 +05:30
rohitwaghchaure
a037f9d55e Merge pull request #20171 from nabinhait/inter-company-serial-no-outgoing-rate-v12
fix: Get outgoing rate of serial no from SLE if serial no already transferred to another company
2020-01-06 12:06:08 +05:30
rohitwaghchaure
3530d0d7c9 fix: incorrect valuation rate for finished good entry (#20166) 2020-01-06 11:51:36 +05:30
Deepesh Garg
3da9967fa8 Merge pull request #20178 from Alchez/fix-v12-item-price-list-view
feat: show item name in Item Price list view (v12)
2020-01-06 08:06:07 +05:30
Himanshu
f276e8d6a1 fix(plaid): change json structure (#20190) 2020-01-06 01:01:37 +05:30
Rohan
9e0d9aa947 feat: show item name in Item Price list view (#20156) 2020-01-03 15:21:58 +05:30
Marica
df363d7dd6 Merge pull request #20173 from nextchamp-saqib/item-min-qty-v12
ux: add description for minimum purchase qty
2020-01-03 12:54:45 +05:30
thefalconx33
81e2f2a45f ux: add description for minimum purchase qty 2020-01-02 19:16:36 +05:30
Nabin Hait
255361ba92 fix: Get outgoing rate of serial no from SLE if serial no already transferred to another company 2020-01-02 19:01:48 +05:30
rohitwaghchaure
67bcfde3de Merge pull request #20168 from rohitwaghchaure/fix_pricing_rule_issue_for_ignore_pricing_rule
fix: ignore pricing rule for other item group
2020-01-02 17:32:43 +05:30
Rohit Waghchaure
b6351b4ca0 fix: ignore pricing rule for other item group 2020-01-02 17:29:50 +05:30
Deepesh Garg
c5a8d33374 Merge pull request #20162 from deepeshgarg007/general_ledger_print_v12
fix: Show closing row in general ledger print
2020-01-02 17:06:05 +05:30
deepeshgarg007
f4589da806 fix: Show closing row in general ledger print 2020-01-02 12:26:12 +05:30
Rucha Mahabal
c5cd7cd65d fix(Subscription): pass start_date while computing next_schedu… (#20160) 2019-12-31 19:15:48 +05:30
Anurag Mishra
a5e56dfb6f fix: set currency to company default currency (#20158) 2019-12-31 17:23:25 +05:30
Saqib
adb35d8703 fix: don't show transfer button if already items are supplied (#20155) 2019-12-31 17:20:07 +05:30
Deepesh Garg
db4f3d98ab Merge pull request #20150 from nextchamp-saqib/rounded-total-ss-v12
feat: added provision to disable rounded total for salary slips
2019-12-31 17:03:11 +05:30
thefalconx33
cd2899f429 feat: added provision to disable rounded total for salary slips 2019-12-31 15:29:36 +05:30
thefalconx33
8f6a6e8d2a feat: added provision to disable rounded total for salary slips 2019-12-31 14:35:03 +05:30
Anurag Mishra
fd68a682ca fix(refactor): loan in HRMS (#20023)
* fix: update laon on salary slip submission and Cancelation

* fix(refactor): Loan in HRMS

* fix: Changes requested

* Update loan.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2019-12-31 14:01:22 +05:30
Saqib
25fd2743a8 fix: party account currency not fetched from account for SO (#20147) 2019-12-31 13:55:34 +05:30
Saqib
826989afda fix: none type object updates AR report row (#20148) 2019-12-31 13:46:39 +05:30
Marica
10622aee7f fix: Field 'other_charges_calculation' column type changed. (#20142) 2019-12-30 22:20:27 +05:30
Anurag Mishra
26e86e7576 fix: added extra condition (#20139) 2019-12-30 16:17:10 +05:30
Rucha Mahabal
efa7d5c831 fix: format currency field in bank and cash payment voucher print format (#20138) 2019-12-30 15:18:02 +05:30
rohitwaghchaure
55cf2477cd fix: incorrect batch fetched for the serialized items (#20118) 2019-12-30 13:27:10 +05:30
ci2014
5c144c992e Skip validate_duplicate_apply_on if not necessary (#20128)
Skip the validation of duplicate fields if the type is transaction, for example.
2019-12-30 11:50:43 +05:30
rohitwaghchaure
2fcc51dece fix: service item's cost showing incorrect amount in stock entry (#20105) 2019-12-30 11:42:01 +05:30
Deepesh Garg
e76670562c Merge pull request #20124 from nextchamp-saqib/so-update-items-hfix
fix: don't allow deletion of items which has work order assigned to it
2019-12-28 21:01:47 +05:30
Deepesh Garg
e1aa48968e Merge pull request #20126 from marination/stock-module-desk-hotfix
chore: Added Reports to Stock Module Desk
2019-12-28 17:45:31 +05:30
marination
2faa8f92be chore: Added Reports to Stock Module Desk 2019-12-27 17:21:08 +05:30
thefalconx33
82c5a2bf45 fix: don't allow deletion of items which has work order assigned to it 2019-12-27 17:08:57 +05:30
Marica
ed386376dc fix: Removed unneccesary Duplicate Entry Error. (#20121) 2019-12-27 16:53:09 +05:30
Marica
65353e5590 fix: Show both warehouse columns in Stock Entry Grid view. (#20114) 2019-12-27 15:30:47 +05:30
Saqib
aab1fb0d6a fix: unpaid invoices are created even if current invoice is paid (#20082) 2019-12-27 13:02:33 +05:30
Deepesh Garg
2dec923740 fix: Patch incorrect GST category in invoices (#20085)
* fix: Patch to set GST category for unregistered invoice

* fix: Move patch up in line

* fix: Remove unwanted patch statements
2019-12-27 12:58:38 +05:30
Saqib
6ea509f7f4 feat: allow adding and deleting of items in submitted SO & PO (#19912)
* feat: allow adding of items after quotation submission

* feat: allow deletion of items from submitted SO & PO

* fix: case when items are added and deleted at once

* fix: add test cases
* For deletion of items while Updating Items after submitting PO & SO
2019-12-27 12:56:17 +05:30
Sammish Thundiyil
dfdd684fbf modified: erpnext/hr/doctype/repayment_schedule/repayment_schedule.json (#20112) 2019-12-27 12:52:40 +05:30
rohitwaghchaure
b299026280 fix: incorrect reorder level in stock balance report (#20110) 2019-12-27 12:36:14 +05:30
Rohan
3d2e61eef3 fix: Add Serial No button prompt (#20098) 2019-12-27 12:34:43 +05:30
rohitwaghchaure
47eda0fa6d fix: incorrect validation for scrap items (#20108) 2019-12-27 12:21:10 +05:30
Mangesh-Khairnar
8ec1d8d5da fix: fetch opening accumulated depreciation (#20096) 2019-12-27 12:14:27 +05:30
rohitwaghchaure
6adf617a72 Merge pull request #20078 from nabinhait/rounding-adjustment-v12
fix: rounding adjustment while both inclusive tax and discount amount present
2019-12-27 11:52:10 +05:30
Deepesh Garg
7c7291ed4f Merge pull request #20088 from nextchamp-saqib/pay-reco-hfix
fix: undefined dr_or_cr_notes in case of party type Employee
2019-12-27 08:12:33 +05:30
rohitwaghchaure
a169292f6e Merge pull request #20103 from deepeshgarg007/travis-fix-v12
fix: Travis(v12)
2019-12-26 22:51:13 +05:30
thefalconx33
5869757860 fix: travis failing for leave application test 2019-12-26 21:52:54 +05:30
Deepesh Garg
6fefdb5b18 Merge pull request #20092 from nextchamp-saqib/account-period-hfix
fix: only show doctypes which impact accounting in accounting period
2019-12-26 15:23:54 +05:30
Saqib
8c08db33d7 Merge pull request #20094 from prssanna/grid-fix-v12
fix: wrong items in table being deleted
2019-12-26 14:54:16 +05:30
prssanna
bc15ea68b8 fix: wrong items in table being deleted 2019-12-26 14:44:47 +05:30
thefalconx33
ee28663836 fix: undefined dr_or_cr_notes in case of party type Employee 2019-12-26 14:43:03 +05:30
thefalconx33
c522df8f9d fix: only show doctypes which impact accounting in accounting period 2019-12-26 13:56:36 +05:30
Himanshu
d0e39e6fac fix: remove quote (#20077) 2019-12-25 15:16:35 +05:30
Nabin Hait
4c4da06a71 fix: rounding adjustment while both inclusive tax and discount amount present 2019-12-25 14:00:51 +05:30
rohitwaghchaure
827ac91e7f fix: supplier email id field not showing in the notification for purchase cycle doctypes (#20070) 2019-12-24 13:03:41 +05:30
Deepesh Garg
379b6df361 Merge pull request #20008 from deepeshgarg007/budget_variance_dimension_v12
feat: Dynamic filters for dimensions in budget variance report
2019-12-24 12:58:22 +05:30
Deepesh Garg
2e461551d6 fix: Allow creation of multiple landed cost voucher against a Purchase Document (#20059) 2019-12-24 12:55:18 +05:30
Himanshu
2d30dc583c fix: resolve ambigious error (#20067) 2019-12-24 12:31:34 +05:30
Sun Howwrongbum
9de6083dbf feat: consider expiry_date during Batch queries (#20064) 2019-12-24 12:29:05 +05:30
RJPvT
9512e55704 Update supplier_scorecard.py (#20060) 2019-12-24 12:25:05 +05:30
rohitwaghchaure
9635df4f26 Merge pull request #20066 from rohitwaghchaure/job_card_operation_id_showing_blank
fix: Map custom job card create button with dashboard
2019-12-24 12:11:16 +05:30
Rohit Waghchaure
7bbeb31015 fix: Map custom job card create button with dashboard 2019-12-24 12:08:58 +05:30
Deepesh Garg
1f4b251f53 Merge pull request #20045 from deepeshgarg007/employee_advance_return_v12
feat: Capture return amount against Employee Advance via Journal Entry
2019-12-24 11:55:24 +05:30
Deepesh Garg
34dabc715b fix: Update return amount label 2019-12-24 11:54:04 +05:30
DeeMysterio
3881ce94ef fix(employee onboarding): stop showing irrelevant job offer links for a job applicant (#20054) 2019-12-23 19:02:44 +05:30
Marica
065bbc9cb3 enhancement: Added Set Reserve Warehouse field in Purchase Order. (#19992) 2019-12-23 18:24:28 +05:30
Pranav Nachnekar
139bb92df9 fix: wrap scheduled_time with getdate (#20046) 2019-12-23 18:19:52 +05:30
Deepesh Garg
15c8caac57 fix: Do not validate accounting dimensions if from repost (#20043)
* fix: Do not check for accounting dimensions in case of repost

* fix: Do not validate accounting dimensions if from repost
2019-12-23 17:58:44 +05:30
Saqib
7b926f228f fix: bad condition while checking last asset movement entry (#20048) 2019-12-23 16:08:40 +05:30
Saqib
dab963aac0 fix: remove mandatory purchase reference for existing asset (#19981) 2019-12-23 15:56:50 +05:30
Saqib
170c9d0ab8 fix: remove mandatory purchase reference for existing asset (#19980) 2019-12-23 15:56:44 +05:30
Saqib
f27a6528db fix: exchange rate not fetching correctly (#19985) 2019-12-23 15:52:59 +05:30
Anurag Mishra
b139f2fc0f feat: fixed party and party type in Accrual journal entry (#20022) 2019-12-23 15:50:20 +05:30
Mangesh-Khairnar
498ebfba9d fix(expense-claim): update status (#20032)
* fix(expense-claim): update status

* fix(expense-claim): compare using grandtotal precision
2019-12-23 15:48:18 +05:30
Deepesh Garg
2ebafb39ac Merge pull request #20011 from nextchamp-saqib/pi-payable-filter-hotfix
fix: bad credit to filter query in purchase invoice
2019-12-23 14:51:50 +05:30
thefalconx33
adc1b9dc0a fix: bad query for debit_to field in sales invoice 2019-12-23 13:08:46 +05:30
deepeshgarg007
b7012a47a2 fix: Remove trailing whitespace and add semicolon 2019-12-23 11:13:53 +05:30
deepeshgarg007
f1036c6985 feat: Custom button to create return entry from Employee Advance 2019-12-23 11:13:44 +05:30
deepeshgarg007
8f6e989f57 feat: Capture return amount against Employee advance via Journal Entry 2019-12-23 11:13:34 +05:30
deepeshgarg007
9609cce7b7 fix: Dashboard for employee advance doctype 2019-12-23 11:13:24 +05:30
Deepesh Garg
e14961a6c6 Merge pull request #20013 from nextchamp-saqib/share-transf-perm
fix: no role has cancelling permission for share transfer doctype
2019-12-21 17:22:15 +05:30
Deepesh Garg
f47afecc42 Merge pull request #20035 from rohitwaghchaure/fixed_patch_for_add_export_type_field_in_party_master_v12_hotfix
fix: patch
2019-12-21 17:20:28 +05:30
Sahil Khan
782f45ae5f Merge branch 'v12-pre-release' into version-12 2019-12-20 17:11:52 +05:30
Sahil Khan
f9ac8f63cf bumped to version 12.3.1 2019-12-20 17:31:52 +05:50
sahil28297
411b8e86b3 Merge pull request #20036 from rohitwaghchaure/fixed_patch_for_add_export_type_field_in_party_master_v12_pre_release
fix: patch
2019-12-20 17:09:09 +05:30
Rohit Waghchaure
2b14669b58 fix: patch 2019-12-20 17:06:57 +05:30
Rohit Waghchaure
14f624f587 fix: patch 2019-12-20 17:06:00 +05:30
Sahil Khan
98ddbf05b1 Merge branch 'v12-pre-release' into version-12 2019-12-20 15:55:12 +05:30
Sahil Khan
67d25028b2 bumped to version 12.3.0 2019-12-20 16:15:12 +05:50
Mangesh-Khairnar
328d5920bd fix(expense-claim): update status (#20033)
* fix(expense-claim): update status

* fix(expense-claim): compare using grandtotal precision
2019-12-20 15:26:49 +05:30
rohitwaghchaure
81d614b6bd Merge pull request #20007 from 0Pranav/appointment-schedulling-v12
fix: multiple issues with appointment schedulling
2019-12-20 15:17:41 +05:30
rohitwaghchaure
fdb7cec244 Merge pull request #20006 from 0Pranav/appointment-schedulling-v12
fix: multiple issues with appointment schedulling
2019-12-20 15:17:23 +05:30
thefalconx33
3aabeb88b4 fix: account manager doesn't have cancel submit perm for share transfer 2019-12-20 14:49:18 +05:30
rohitwaghchaure
b7fd9a652d Merge pull request #19929 from 0Pranav/delete-company-txn-query-v12
fix: replace sql with orm query for deleting company communications
2019-12-20 13:48:23 +05:30
rohitwaghchaure
63bc8f2d90 Merge pull request #20026 from rohitwaghchaure/subcontracting_issue_for_partial_purchase_receipt
fix: incorrect consumed qty for partial purchase receipt in subcontra…
2019-12-20 13:36:06 +05:30
rohitwaghchaure
b6d7fba936 Merge pull request #20025 from deepeshgarg007/gstr-2-fix-v12
fix: Tax amount not visible for some invoices
2019-12-20 13:35:41 +05:30
rohitwaghchaure
38540e85e8 Merge pull request #20029 from deepeshgarg007/gstr-2-fix-v12
fix: Tax amount not visible for some invoices
2019-12-20 13:35:14 +05:30
rohitwaghchaure
b3d97a560f Merge pull request #20027 from rohitwaghchaure/subcontracting_issue_for_partial_purchase_receipt_pre_release
fix: incorrect consumed qty for partial purchase receipt in subcontra…
2019-12-20 13:05:19 +05:30
Rohit Waghchaure
39436c6d38 fix: incorrect consumed qty for partial purchase receipt in subcontracting 2019-12-20 12:59:56 +05:30
Rohit Waghchaure
59cecb29a0 fix: incorrect consumed qty for partial purchase receipt in subcontracting 2019-12-20 12:56:01 +05:30
deepeshgarg007
55bf951ff5 fix: Tax amount not visible for some invoices 2019-12-20 12:43:55 +05:30
Deepesh Garg
4f543ce42a Merge pull request #20015 from marination/valuation_rate_company_hotfix
fix: Company None not found in get_valuation_rate
2019-12-20 11:56:58 +05:30
Deepesh Garg
8931b3d602 Merge pull request #19989 from deepeshgarg007/sales_register_upgrade_v12
fix: Update sales register report
2019-12-19 13:53:35 +05:30
marination
b13eebe657 fix: Company None not found in get_valuation_rate 2019-12-19 13:39:41 +05:30
thefalconx33
fcb296aafb fix: no role has cancelling permission for share transfer doctype 2019-12-19 13:19:50 +05:30
thefalconx33
5109b36689 fix: bad filter query 2019-12-19 13:12:37 +05:30
deepeshgarg007
2149d7ca4f feat: Dynamic filters for dimensions in budget variance report 2019-12-19 13:05:52 +05:30
0Pranav
220a208f4e fix: default timezone selection 2019-12-19 12:28:12 +05:30
0Pranav
0c8e46fdea fix: remove timezones in js 2019-12-19 12:25:29 +05:30
Deepesh Garg
ee4901f4a0 Merge pull request #19990 from 0Pranav/mapped-doc-for-customer-quotation-v12
fix: use open_mapped_doc instead of create_new_doc
2019-12-19 12:00:53 +05:30
Deepesh Garg
a0c847920f Merge pull request #19984 from 0Pranav/mapped-doc-for-customer-quotation-v12
fix: use open_mapped_doc instead of create_new_doc
2019-12-19 12:00:23 +05:30
rohitwaghchaure
86e5ff3cf9 Merge pull request #19997 from rohitwaghchaure/fixed_pricing_rule_issue_for_product_discount_v12_hotfix
fix: Pricing Rule Discount for Product
2019-12-19 11:12:15 +05:30
rohitwaghchaure
5dd7503516 Merge pull request #19995 from rohitwaghchaure/fixed_pricing_rule_issue_for_product_discount_pre_relesae
fix: Pricing Rule Discount for Product
2019-12-19 11:11:37 +05:30
deepeshgarg007
5cc0e08a41 fix: Use get_value instead of get_doc and formatting 2019-12-19 11:07:43 +05:30
Rohit Waghchaure
6b00d60b46 fix: Pricing Rule Discount for Product 2019-12-18 17:54:28 +05:30
Rohit Waghchaure
fecf5a9a15 fix: Pricing Rule Discount for Product 2019-12-18 17:48:39 +05:30
0Pranav
5b4050a4ff add link to appointment booking in sidebar 2019-12-18 16:30:54 +05:30
0Pranav
4d7862ef4c fix: defualt timezone not getting selected 2019-12-18 16:27:16 +05:30
0Pranav
6e41475612 fix : only set price list if it exists for customer 2019-12-18 16:05:59 +05:30
sahil28297
803e0ec27c Merge pull request #19988 from rohitwaghchaure/change_log_for_v12_3_0
feat: v12_3_0 change log
2019-12-18 15:54:37 +05:30
Rohit Waghchaure
b3addff99e v12_3_0 change log 2019-12-18 15:49:32 +05:30
deepeshgarg007
c6e098881f fix: Update sales register report 2019-12-18 15:43:14 +05:30
0Pranav
200ceb5352 use open_mapped_doc instead of create_new_doc 2019-12-18 12:34:19 +05:30
rohitwaghchaure
8c50f5c23f Merge pull request #19977 from Mangesh-Khairnar/fix-compensatory-off-pre
fix: compensatory off leave creation
2019-12-18 11:29:18 +05:30
rohitwaghchaure
6351a9395c Merge pull request #19975 from rohitwaghchaure/not_able_to_make_work_order_from_bom_v12_hotfix
fix: not able to make work order from BOM
2019-12-18 11:12:45 +05:30
Rushabh Mehta
fb2153c0eb Merge pull request #19966 from alyf-de/version-12-hotfix
fix(regional): Py3 compatibility for DATEV Export
2019-12-18 08:48:50 +05:30
Mangesh-Khairnar
86600ac8b9 fix: allow creation of additional leave ledger entry 2019-12-17 18:37:15 +05:30
Mangesh-Khairnar
b76a04b470 fix: compensatory leave request creation 2019-12-17 18:37:09 +05:30
Rohit Waghchaure
bb42fc615e fix: not able to make work order from BOM 2019-12-17 18:18:17 +05:30
rohitwaghchaure
80913994da Merge pull request #19974 from rohitwaghchaure/not_able_to_make_work_order_from_bom
fix: not able to make work order from BOM
2019-12-17 18:15:37 +05:30
Rohit Waghchaure
92ecdbe0c8 fix: not able to make work order from BOM 2019-12-17 18:13:54 +05:30
rohitwaghchaure
089dcaed70 Merge pull request #19969 from rohitwaghchaure/fixed_incorrect_outstanding_amount_showing_in_the_ap_ar_report
fix: incorrect outstanding amount showing in the AP/AR report
2019-12-17 17:15:28 +05:30
Mangesh-Khairnar
03a427a9e7 Merge pull request #19961 from Mangesh-Khairnar/compensatory-off-fix
fix: compensatory leave request creation
2019-12-17 13:32:05 +05:30
Rohit Waghchaure
764c2c7f17 fix: incorrect outstanding amount shwoing in the AP/AR report 2019-12-17 12:44:19 +05:30
Mangesh-Khairnar
b4d9b80fed fix: allow creation of additional leave ledger entry 2019-12-17 12:25:25 +05:30
Raffael Meyer
215274719e fix(regional): PY3 compatibility 2019-12-16 17:33:44 +01:00
rohitwaghchaure
c920efc156 Merge pull request #19963 from rohitwaghchaure/allow_overproduction_against_work_order_version_12_hotfix
fix: not allow to over production against work order
2019-12-16 18:04:27 +05:30
rohitwaghchaure
3b9fe1ae6f Merge pull request #19959 from rohitwaghchaure/fixed_incorrect_child_bom_fecthed
fix: incorrect child boms fetched
2019-12-16 17:00:08 +05:30
Rohit Waghchaure
c76c5e699b fix: now allow to over production against work order 2019-12-16 16:59:01 +05:30
Mangesh-Khairnar
ce6923ecb6 fix: compensatory leave request creation 2019-12-16 16:56:57 +05:30
0Pranav
03db85f3e7 fix: replace sql query by orm in delete_communications and added tests 2019-12-16 16:54:03 +05:30
Rohit Waghchaure
666fba94e2 fix: incorrect children boms fetched 2019-12-16 16:18:33 +05:30
rohitwaghchaure
48a8a40703 Merge pull request #19944 from nextchamp-saqib/gl-precision-hotfix
fix: gl entries doesn't filter based on debit precision
2019-12-16 15:29:04 +05:30
rohitwaghchaure
5646816282 Merge pull request #19870 from nextchamp-saqib/website-hotfix
fix: website showing disabled items in product list
2019-12-16 15:25:07 +05:30
thefalconx33
f8df3c7af2 fix: review changes 2019-12-16 15:03:27 +05:30
rohitwaghchaure
62d4dfa883 Merge pull request #19956 from nextchamp-saqib/pos-serial-no
fix: display serial no selection on adding items to cart
2019-12-16 14:54:23 +05:30
thefalconx33
b8f9fd023b fix: display serial no selection on adding items to cart 2019-12-16 14:49:59 +05:30
rohitwaghchaure
0df3c93737 Merge pull request #19936 from benknowles/patch-3
fix: task validation error when adding tasks to projects
2019-12-16 14:01:20 +05:30
rohitwaghchaure
e0e7dcd2f6 Merge pull request #19914 from nextchamp-saqib/cart-address-hotfix
fix: enable adding of address without enabling checkout feature
2019-12-16 13:52:48 +05:30
rohitwaghchaure
d5b1baed39 Merge pull request #19907 from 0Pranav/appointment-schedulling-v12
fix: change book-appointment route
2019-12-16 13:50:47 +05:30
rohitwaghchaure
800545ff5b Merge pull request #19947 from rohitwaghchaure/pricing_rule_not_working_for_product_discount_v12_hotfix
fix: pricing rule not working for product discount
2019-12-16 13:37:45 +05:30
rohitwaghchaure
388a177f75 Merge pull request #19939 from marination/item_manufacturer_table
fix(ui): Removed 'manufacturers' table from Item Master
2019-12-16 13:36:56 +05:30
Rohit Waghchaure
821166c628 fix: schedule date 2019-12-16 12:29:39 +05:30
marination
2b8df06f8e fix: Removed validation from non existent manufacturers table 2019-12-16 12:18:24 +05:30
Rohit Waghchaure
4e8e466a98 fix: pricing rule not working for production discount 2019-12-16 11:16:36 +05:30
Deepesh Garg
31d4482336 Merge pull request #19953 from surajshetty3416/fix-profit-and-loss-statement-version-12-hotfix
fix: Profit and Lost (financial statement) report
2019-12-15 20:23:05 +05:30
Suraj Shetty
5cd8c7c722 fix: Financial statement report
- Hidden column should note be considered in the report
- Remove hardcoded currency formatting
- Remove duplicate letterhead in the report
(print_template already adds one)
- Remove extra quotes from Total Amount text
2019-12-14 23:33:14 +05:30
Deepesh Garg
e14d9b5476 Merge pull request #19951 from deepeshgarg007/patch-and-address-fix-v12
fix: Add missing import
2019-12-14 23:03:27 +05:30
deepeshgarg007
6a8ff1bebe fix: Add missing import 2019-12-14 21:31:11 +05:30
rohitwaghchaure
a41d464198 Merge pull request #19942 from deepeshgarg007/pricing_rule_fix_v12
fix: Price rule filtering fix
2019-12-13 16:01:35 +05:30
thefalconx33
980793bde0 fix: gl entries doesn't filter based on debit precision 2019-12-13 15:42:34 +05:30
deepeshgarg007
b7329eac19 fix: Price rule filtering fix 2019-12-13 13:49:12 +05:30
marination
9ec5cb2570 fix: Removed 'manufacturers' table from Item Master 2019-12-13 13:12:10 +05:30
Deepesh Garg
44296a392d Merge pull request #19735 from marination/zero-division-v12-hotfix
fix: Division by zero error in Stock Entry
2019-12-13 09:24:31 +05:30
Ben Knowles
9097c7e11c fix: task validation error when adding tasks to projects
Related to PR #19919
2019-12-12 11:30:17 -06:00
Deepesh Garg
0256d7549c Merge pull request #19931 from deepeshgarg007/regional_address_fix_v12
fix: Get regional address details
2019-12-12 16:54:34 +05:30
marination
94d8b99ef9 fix: Distribute charges based on quantity if Total Basic Amount is Zero. 2019-12-12 16:51:11 +05:30
Deepesh Garg
3fe1335f7b Merge pull request #19926 from prssanna/file-upload-fix-v12
fix: Bank statement not getting attached in Bank Reconciliation
2019-12-12 15:19:36 +05:30
Deepesh Garg
dc7a4ac8af Merge pull request #19925 from rohitwaghchaure/not_able_to_submit_the_landed_cost_voucher_version_12
fix: not able to submit the landed cost voucher
2019-12-12 15:17:05 +05:30
Deepesh Garg
c0ff769214 Merge pull request #19924 from rohitwaghchaure/not_able_to_submit_the_landed_cost_voucher_version_12_hotfix
fix: not able to submit the landed cost voucher
2019-12-12 15:16:31 +05:30
deepeshgarg007
0a527b9f9a fix: Get regional address details fix 2019-12-12 15:13:30 +05:30
prssanna
e03871f9de fix: empty fname and fcontent of uploaded file 2019-12-12 12:22:03 +05:30
Rohit Waghchaure
c0286780bd fix: not able to submit the landed cost voucher 2019-12-12 12:14:26 +05:30
Rohit Waghchaure
9cc484650b fix: not able to submit the landed cost voucher 2019-12-12 12:13:40 +05:30
rohitwaghchaure
319f126258 Merge pull request #19901 from rohitwaghchaure/not_able_to_cancel_landed_cost_voucher_v12
fix: not able to cancel the landed cost voucher
2019-12-12 12:11:02 +05:30
0Pranav
234de12836 fix: add init files for book-appointments 2019-12-12 11:20:31 +05:30
rohitwaghchaure
4c19000ed9 Merge pull request #19918 from rohitwaghchaure/fixed_pricing_rule_working_on_other_items_v12_cherry_pick
fix: pricing rule not working
2019-12-12 10:20:05 +05:30
Deepesh Garg
a1651ca5f2 Merge pull request #19898 from hrwX/qms-int-fix-v12
fix: rename labels
2019-12-12 08:45:20 +05:30
Rohit Waghchaure
4d042cd81a Merge branch 'version-12' into fixed_pricing_rule_working_on_other_items_v12_cherry_pick 2019-12-11 22:53:27 +05:30
rohitwaghchaure
d72fae670a Merge pull request #19916 from rohitwaghchaure/fixed_pricing_rule_working_on_other_items
fix: pricing rule working on non pricing rule items
2019-12-11 22:18:07 +05:30
Rohit Waghchaure
d458e25dc5 fix: pricing rule working on non pricing rule items 2019-12-11 21:55:28 +05:30
Deepesh Garg
43474a3afa Merge pull request #19896 from hrwX/project-fix_v12
fix: Set project in child table via dashboard
2019-12-11 18:43:29 +05:30
Deepesh Garg
7daa2a2085 Merge pull request #19894 from marination/rounded_total_v12_hotfix
fix: Disable Rounded Total always showing field default value
2019-12-11 18:41:25 +05:30
Deepesh Garg
45075d8915 Merge pull request #19900 from rohitwaghchaure/not_able_to_cancel_landed_cost_voucher_v12_hotfix
fix: not able to cancel the landed cost voucher
2019-12-11 18:37:34 +05:30
thefalconx33
1de3040ecb fix: additional notes from Quotations not saved in SO 2019-12-11 18:11:48 +05:30
thefalconx33
af10f659d9 fix: enable address without checkout feature
* fix add address form country link field
2019-12-11 17:44:08 +05:30
thefalconx33
6f36691c64 fix: handle scenario with no condition 2019-12-11 16:10:56 +05:30
0Pranav
dfe629aff7 fix: change book-appointment route 2019-12-11 15:18:59 +05:30
Rohit Waghchaure
23bf2a6647 fix: not able to cancel the landed cost voucher 2019-12-11 13:52:47 +05:30
Rohit Waghchaure
b69cb8080c fix: not able to cancel the landed cost voucher 2019-12-11 13:52:18 +05:30
Himanshu Warekar
f23b5ed23b fix: rename labels 2019-12-11 13:10:31 +05:30
Himanshu Warekar
0a28387c70 fix: set project 2019-12-11 12:49:43 +05:30
marination
caae8c57bc fix: Disable Rounded Total always showing field default value 2019-12-11 12:18:51 +05:30
Nabin Hait
44ae135c36 Merge branch 'version-12' into version-12-hotfix 2019-12-11 09:12:10 +05:30
Deepesh Garg
47e786ef62 fix: Rounding Adjustment GL entry fix (#19839)
* fix: Rounding Adjustment GL entry fix

* fix: Spacing in tab

* fix: Comment fix
2019-12-11 09:06:37 +05:30
Deepesh Garg
f10be395c1 fix: NoneType' object has no attribute '__getitem_'_ (#19860) 2019-12-11 09:06:25 +05:30
rohitwaghchaure
ac967d09ec fix: Item-wise Sales History report not working (#19890) 2019-12-10 21:34:20 +05:30
Saqib
d1e8e8652f fix: incorrect account mapping for child companies (#19888)
* fix: incorrect account mapping for child companies on adding account to parent company

* Update account.py
2019-12-10 21:32:57 +05:30
Deepesh Garg
72649c207f feat(regional): Auto state wise taxation for GST India (#19877)
* feat(regional): Auto state wise taxation for GST India

* fix: Update gst category on addition of GSTIN

* fix: Codacy and travis fixes

* fix: Travis

* fix(test): Update GST category only if GSTIN field available

* fix: Test Cases

* fix: Do not skip accounts if place of supply is not present

* fix: Auto GST taxation for SEZ Party types

* fix: Automatic taxation for multi state

* fix: Codacy and travis fixes

* fix: Auto GST template selection in Sales Order

* fix: Move inter state check and source state to tax category

* fix: Remove unique check from tax template

* fix: Remove unique check from tax template

* fix: Address fetching logic in Sales

* fix: fecth tax template on company address change

* fix: fetch company gstin on address change

* fix: company_gstin set value fix

* fix: Mutiple fixes and code refactor

* fix: Add missing semicolon

* fix: Company address fetching in sales invoice

* fix: Remove print statement

* fix: Import functools

* fix: Naming fixes and code cleanup

* fix: Update patches

* fix: Remove changes in patches.txt

* fix: Iteritems compatibility for python 3
2019-12-10 15:54:29 +05:30
Deepesh Garg
d06b685fdf fix: Append expense account only if expense account exists (#19881) 2019-12-10 12:15:06 +05:30
marination
6411a56cdc fix: Changed check condition and added test 2019-12-09 21:36:02 +05:30
Saqib
34b3b04fb0 fix: error message displays asset category as None (#19874)
* fix: error message displays asset category as None

* fix: asset gl_entries doesn't considers asset category's cwip account
2019-12-09 19:06:14 +05:30
Deepesh Garg
b1a2a16f43 Merge pull request #19868 from nextchamp-saqib/report-col-hotfix
fix: column data not visible after manual selection of columns
2019-12-09 17:57:41 +05:30
thefalconx33
f092e68a58 fix: website showing disabled items in product list 2019-12-09 17:03:32 +05:30
thefalconx33
6d497ccb4c fix: column data not visible after manual selection of columns 2019-12-09 15:24:39 +05:30
Deepesh Garg
a7b97f7bac Merge pull request #19867 from nextchamp-saqib/cart-fix-hotfix
fix: Error while placing order of cart items added yesterday
2019-12-09 15:23:04 +05:30
thefalconx33
f40d3bd10f fix: due date before posting date for items added to cart yesterday 2019-12-09 14:07:25 +05:30
Deepesh Garg
1e2be32860 fix: Consistency in button positions in Sales Order and Purchase Order (#19834) 2019-12-09 13:04:58 +05:30
Deepesh Garg
6aec9e32d4 fix: Rounding Adjustment GL entry fix (#19839)
* fix: Rounding Adjustment GL entry fix

* fix: Spacing in tab

* fix: Comment fix
2019-12-09 13:03:02 +05:30
Deepesh Garg
59cc0e5029 fix: NoneType' object has no attribute '__getitem_'_ (#19860) 2019-12-09 11:28:35 +05:30
Deepesh Garg
851f39cee1 Merge pull request #19837 from deepeshgarg007/gst_1_validation_msg_v12
fix: Validation msg fix in GSTR-1 report
2019-12-07 19:53:03 +05:30
rohitwaghchaure
6822a30f8c Merge pull request #19850 from rohitwaghchaure/fixed_timsheet_overlap_issue_v12_hotfix
fix: timesheet overlap error
2019-12-07 14:10:54 +05:30
Rohit Waghchaure
495ba1618b fix: timsheet overlap error 2019-12-07 13:22:08 +05:30
deepeshgarg007
778d7595aa fix: Add missing semicolon 2019-12-06 20:00:56 +05:30
deepeshgarg007
a40dbd0384 fix: Validation msg fix in GSTR-1 report 2019-12-06 19:46:32 +05:30
Deepesh Garg
80dfb9f834 Merge pull request #19835 from deepeshgarg007/accounts_payable_terms_v12
feat: Accounts Payable report based on payment terms
2019-12-06 19:41:27 +05:30
deepeshgarg007
dabb303358 feat: Accounts Payable report based on payment terms 2019-12-06 17:52:48 +05:30
Pranav Nachnekar
d16ef54665 fix: query for finding lost quotation (#19801)
* fix:query for finding lost quotation

* Update opportunity.py
2019-12-04 15:31:25 +05:30
Nabin Hait
dc248b9458 optimize: Optimization of Receivable report filtered based on sales person (#19797) 2019-12-04 15:30:39 +05:30
Nabin Hait
bf0f26b4a4 fix: Service start and end date validation for deferred accounting (#19806) 2019-12-04 15:29:54 +05:30
Mangesh-Khairnar
929fd4ce47 enhancement(fixed-asset-register): add date filter (#19804)
* feat: add date filter in the fixed asset register

* fix: remove function from keyword argument
2019-12-04 14:10:41 +05:30
Deepesh Garg
81c895b21e Merge pull request #19793 from nabinhait/ar-summary-based-on-terms-v12
feat: Receivable / payable summary based on payment terms
2019-12-04 11:23:31 +05:30
Shivam Mishra
27a21f80d7 feat: allow searching from meta fields (#19725)
* feat: allow searching from meta fields

* feat: remove description in query based on number of items
2019-12-03 17:26:50 +05:30
sahil28297
aa7085e11c fix(patch): set proper tax_type based on company and set proper account if not already present (#19788) 2019-12-03 17:07:26 +05:30
Nabin Hait
6e5363ba48 feat: Receivable / payable summary based on payment terms 2019-12-03 16:58:02 +05:30
Deepesh Garg
53746636c3 fix: Party name field in trial balacne for party report (#19790) 2019-12-03 16:30:09 +05:30
Deepesh Garg
485d48c101 fix: Unable to see parties with negative balance in AR/AP Summary (#19777) 2019-12-03 15:12:28 +05:30
Marica
0e1ef35968 fix: Item qty cannot be zero in Purchase Receipt (#19780) 2019-12-03 12:59:15 +05:30
gavin
35effe9be0 fix: AttributeError on new Student creation (#19787) 2019-12-03 12:54:18 +05:30
Shivam Mishra
648d6e46f3 fix: query for item group listing (#19785) 2019-12-03 12:52:58 +05:30
Nabin Hait
d6d9a3ddd7 Update employee.py 2019-12-03 12:52:12 +05:30
Deepesh Garg
18f05db19a Merge pull request #19763 from Mangesh-Khairnar/fix-pr-creation-so
fix(sales-order): allow payment request creation for so that are not billed
2019-12-03 10:42:53 +05:30
Rucha Mahabal
586fecfe73 fix: render_template for subject in Email Campaign (#19771) 2019-12-02 16:25:29 +05:30
sahil28297
14018b3dea bumped to version 12.2.2 2019-12-02 13:05:27 +05:30
Deepesh Garg
1c196f958f Merge pull request #19768 from deepeshgarg007/avaiable_stock_for_v12
fix: Available stock for packing item report
2019-12-02 11:57:45 +05:30
rohitwaghchaure
91f2cfb999 Merge pull request #19769 from rohitwaghchaure/sales_invoice_none_type_error_serial_no_validation
fix: Serial no validation against sales invoice
2019-12-02 09:46:23 +05:30
deepeshgarg007
c0a0331570 fix: Validation msg 2019-12-02 09:43:11 +05:30
deepeshgarg007
4ceba43e43 fix: Serial no validation against sales invoice 2019-12-02 09:43:04 +05:30
deepeshgarg007
9b64e2e24c fix: Available stock for packing item report 2019-12-01 22:20:18 +05:30
Deepesh Garg
da5e227ad6 fix: Post GL entry fix for asset (#19752) 2019-12-01 10:06:31 +05:30
Mangesh-Khairnar
4f95e5d092 fix: show create payment request for so that are not billed 2019-11-30 20:31:18 +05:30
Deepesh Garg
6a8fd0102f fix: Serial no validation against sales invoice (#19749)
* fix: Serial no validation against sales invoice

* fix: Validation msg
2019-11-29 18:48:30 +05:30
Suraj Shetty
2b172ec4b4 fix: valuation of "finished good" item in purchase receipt (#19745)
* fix: Remove redundant purchase orders and unwanted condition

* fix: [WIP] Purchase receipt value

* fix: Add raw material cost based on transfered raw material

* fix: get_qty_to_be_received

* fix: Remove debugger statement

* fix: Reset rm_supp_cost before setting subcontracted raw_materials

* test: Fix and modify tests for backflush_based_on_stock_entry

* fix: Add non stock items to Purchase Receipt from Purchase Order

* fix: Ignore valuation rate check for non stock raw material

* fix: Rename check all rows

* fix: Remove amount from test

* test: Fix item rate error

* fix: handling of serial nos in backflush

* fix: Add serial no. of raw materials

* fix: [WIP] Handle Batch nos for purchase reciept backflushed raw material

* fix: Raw material batch number selection in purchase receipt

* Update test_purchase_order.py
2019-11-29 16:59:21 +05:30
Marica
5d2ad7fc38 fix: UOM was not fetching in purchase invoice (#19732) (#19737)
* fix: UOM was not fetching in purchase invoice

* fix: Changes requested

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2019-11-28 20:00:51 +05:30
rohitwaghchaure
3347473aa1 fix: removed stock value and account balance out of sync validation (#19728) 2019-11-28 20:00:41 +05:30
Rohit Waghchaure
7f951b5595 fix: revert value out of sync feature 2019-11-28 20:00:33 +05:30
Marica
208c69f196 fix: Permission issue in Stock Entry (#19739) 2019-11-28 19:39:55 +05:30
Marica
32b69bf122 fix: UOM was not fetching in purchase invoice (#19732) (#19737)
* fix: UOM was not fetching in purchase invoice

* fix: Changes requested

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2019-11-28 19:03:14 +05:30
Marica
b1fac1817c fix: Validation for Suppliers in SO to PO (#19700)
- Check if there is a Supplier against atleast one item in Sales Order
- Validation message earlier was vague
2019-11-28 18:23:11 +05:30
Marica
6516358a71 fix: Changed type of column 'serial_no' in Stock Ledger Entry (#19704) 2019-11-28 18:20:53 +05:30
marination
c6e2087673 fix: Division by zero error in Stock Entry 2019-11-28 16:54:58 +05:30
Shivam Mishra
d8469a7bfa fix: handle None case for get_shipping_amount_from_rules (#19724) 2019-11-28 16:47:14 +05:30
Marica
cf645aceae chore: Added Quick Stock Balance to Stock Module (#19727)
- Also 'Stock Balance Report' button no longer primary button
2019-11-28 16:44:56 +05:30
rohitwaghchaure
3dd72e238f fix: removed stock value and account balance out of sync validation (#19728) 2019-11-28 16:44:05 +05:30
Deepesh Garg
b74ce74ec9 Merge pull request #19718 from deepeshgarg007/status_fix_v12
fix: Path for quotation expiry method in hooks
2019-11-28 12:24:20 +05:30
deepeshgarg007
074aaa6005 fix: Path for quotation expiry method in hooks 2019-11-28 10:31:11 +05:30
Marica
9d5f43f4f0 fix: get_batch_qty_and_serial_no() requires argument 'stock_qty' (#19694) 2019-11-27 15:50:45 +05:30
rohitwaghchaure
7522aadc6e Merge pull request #19697 from rohitwaghchaure/dont_stop_submitting_entry_due_to_mismatch_issue
fix: revert value out of sync feature
2019-11-27 12:32:04 +05:30
rohitwaghchaure
326fdcb454 Merge pull request #19687 from deepeshgarg007/sales_invoice_fix_develop
fix: Serial no validation against sales invoice
2019-11-27 11:36:10 +05:30
Rohit Waghchaure
c41addec96 fix: revert value out of sync feature 2019-11-27 08:49:08 +05:30
deepeshgarg007
defed15528 fix: Validation msg 2019-11-26 16:12:29 +05:30
deepeshgarg007
cbc29989fe fix: Serial no validation against sales invoice 2019-11-26 15:13:23 +05:30
5445 changed files with 635669 additions and 832980 deletions

View File

@@ -1,14 +0,0 @@
# Root editor config file
root = true
# Common settings
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
# python, js indentation settings
[{*.py,*.js}]
indent_style = tab
indent_size = 4

View File

@@ -5,7 +5,7 @@
"es6": true
},
"parserOptions": {
"ecmaVersion": 9,
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
@@ -15,14 +15,6 @@
"tab",
{ "SwitchCase": 1 }
],
"brace-style": [
"error",
"1tbs"
],
"space-unary-ops": [
"error",
{ "words": true }
],
"linebreak-style": [
"error",
"unix"
@@ -52,10 +44,12 @@
"no-control-regex": [
"off"
],
"space-before-blocks": "warn",
"keyword-spacing": "warn",
"comma-spacing": "warn",
"key-spacing": "warn"
"spaced-comment": [
"warn"
],
"no-trailing-spaces": [
"warn"
]
},
"root": true,
"globals": {
@@ -92,7 +86,6 @@
"cur_page": true,
"cur_list": true,
"cur_tree": true,
"cur_pos": true,
"msg_dialog": true,
"is_null": true,
"in_list": true,
@@ -147,15 +140,9 @@
"Chart": true,
"Cypress": true,
"cy": true,
"describe": true,
"expect": true,
"it": true,
"context": true,
"before": true,
"beforeEach": true,
"onScan": true,
"html2canvas": true,
"extend_cscript": true,
"localforage": true
"beforeEach": true
}
}

33
.flake8
View File

@@ -1,33 +0,0 @@
[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
exclude=.github/helper/semgrep_rules

View File

@@ -1,19 +0,0 @@
# Since version 2.23 (released in August 2019), git-blame has a feature
# to ignore or bypass certain commits.
#
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
# This commit just changes spaces to tabs for indentation in some files
5f473611bd6ed57703716244a054d3fb5ba9cd23
# Whitespace trimming throughout codebase
9bb69e711a5da43aaf8c8ecb5601aeffd89dbe5a
f0bcb753fb7ebbb64bb0d6906d431d002f0f7d8f
# imports cleanup
4b2be2999f2203493b49bf74c5b440d49e38b5e3

View File

@@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Community Forum
url: https://discuss.erpnext.com/
about: For general QnA, discussions and community help.

View File

@@ -8,7 +8,7 @@ Please post on our forums:
for questions about using `ERPNext`: https://discuss.erpnext.com
for questions about using the `Frappe Framework`: ~~https://discuss.frappe.io~~ => [stackoverflow](https://stackoverflow.com/questions/tagged/frappe) tagged under `frappe`
for questions about using the `Frappe Framework`: https://discuss.frappe.io
for questions about using `bench`, probably the best place to start is the [bench repo](https://github.com/frappe/bench)

View File

@@ -1,72 +0,0 @@
[flake8]
ignore =
B007,
B009,
B010,
B950,
E101,
E111,
E114,
E116,
E117,
E121,
E122,
E123,
E124,
E125,
E126,
E127,
E128,
E131,
E201,
E202,
E203,
E211,
E221,
E222,
E223,
E224,
E225,
E226,
E228,
E231,
E241,
E242,
E251,
E261,
E262,
E265,
E266,
E271,
E272,
E273,
E274,
E301,
E302,
E303,
E305,
E306,
E402,
E501,
E502,
E701,
E702,
E703,
E741,
F403,
W191,
W291,
W292,
W293,
W391,
W503,
W504,
E711,
E129,
F841,
E713,
E712,
max-line-length = 200
exclude=.github/helper/semgrep_rules,test_*.py

View File

@@ -1,54 +0,0 @@
import sys
from urllib.parse import urlparse
import requests
docs_repos = [
"frappe_docs",
"erpnext_documentation",
"erpnext_com",
"frappe_io",
]
def uri_validator(x):
result = urlparse(x)
return all([result.scheme, result.netloc, result.path])
def docs_link_exists(body):
for line in body.splitlines():
for word in line.split():
if word.startswith('http') and uri_validator(word):
parsed_url = urlparse(word)
if parsed_url.netloc == "github.com":
parts = parsed_url.path.split('/')
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
return True
elif parsed_url.netloc == "docs.erpnext.com":
return True
if __name__ == "__main__":
pr = sys.argv[1]
response = requests.get("https://api.github.com/repos/frappe/erpnext/pulls/{}".format(pr))
if response.ok:
payload = response.json()
title = (payload.get("title") or "").lower().strip()
head_sha = (payload.get("head") or {}).get("sha")
body = (payload.get("body") or "").lower()
if (title.startswith("feat")
and head_sha
and "no-docs" not in body
and "backport" not in body
):
if docs_link_exists(body):
print("Documentation Link Found. You're Awesome! 🎉")
else:
print("Documentation Link Not Found! ⚠️")
sys.exit(1)
else:
print("Skipping documentation checks... 🏃")

View File

@@ -1,41 +0,0 @@
#!/bin/bash
set -e
cd ~ || exit
sudo apt-get install redis-server libcups2-dev
pip install frappe-bench
git clone https://github.com/frappe/frappe --branch "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" --depth 1
bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench
mkdir ~/frappe-bench/sites/test_site
cp -r "${GITHUB_WORKSPACE}/.github/helper/site_config.json" ~/frappe-bench/sites/test_site/
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE DATABASE test_frappe"
mysql --host 127.0.0.1 --port 3306 -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
mysql --host 127.0.0.1 --port 3306 -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
mysql --host 127.0.0.1 --port 3306 -u root -e "FLUSH PRIVILEGES"
wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
sudo chmod o+x /usr/local/bin/wkhtmltopdf
cd ~/frappe-bench || exit
sed -i 's/watch:/# watch:/g' Procfile
sed -i 's/schedule:/# schedule:/g' Procfile
sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
bench get-app erpnext "${GITHUB_WORKSPACE}"
bench start &> bench_run_logs.txt &
bench --site test_site reinstall --yes

View File

@@ -1,38 +0,0 @@
# Semgrep linting
## What is semgrep?
Semgrep or "semantic grep" is language agnostic static analysis tool. In simple terms semgrep is syntax-aware `grep`, so unlike regex it doesn't get confused by different ways of writing same thing or whitespaces or code split in multiple lines etc.
Example:
To check if a translate function is using f-string or not the regex would be `r"_\(\s*f[\"']"` while equivalent rule in semgrep would be `_(f"...")`. As semgrep knows grammer of language it takes care of unnecessary whitespace, type of quotation marks etc.
You can read more such examples in `.github/helper/semgrep_rules` directory.
# Why/when to use this?
We want to maintain quality of contributions, at the same time remembering all the good practices can be pain to deal with while evaluating contributions. Using semgrep if you can translate "best practice" into a rule then it can automate the task for us.
## Running locally
Install semgrep using homebrew `brew install semgrep` or pip `pip install semgrep`.
To run locally use following command:
`semgrep --config=.github/helper/semgrep_rules [file/folder names]`
## Testing
semgrep allows testing the tests. Refer to this page: https://semgrep.dev/docs/writing-rules/testing-rules/
When writing new rules you should write few positive and few negative cases as shown in the guide and current tests.
To run current tests: `semgrep --test --test-ignore-todo .github/helper/semgrep_rules`
## Reference
If you are new to Semgrep read following pages to get started on writing/modifying rules:
- https://semgrep.dev/docs/getting-started/
- https://semgrep.dev/docs/writing-rules/rule-syntax
- https://semgrep.dev/docs/writing-rules/pattern-examples/
- https://semgrep.dev/docs/writing-rules/rule-ideas/#common-use-cases

View File

@@ -1,63 +0,0 @@
import frappe
from frappe import _
from frappe.model.document import Document
# ruleid: frappe-modifying-but-not-comitting
def on_submit(self):
if self.value_of_goods == 0:
frappe.throw(_('Value of goods cannot be 0'))
self.status = 'Submitted'
# ok: frappe-modifying-but-not-comitting
def on_submit(self):
if self.value_of_goods == 0:
frappe.throw(_('Value of goods cannot be 0'))
self.status = 'Submitted'
self.db_set('status', 'Submitted')
# ok: frappe-modifying-but-not-comitting
def on_submit(self):
if self.value_of_goods == 0:
frappe.throw(_('Value of goods cannot be 0'))
x = "y"
self.status = x
self.db_set('status', x)
# ok: frappe-modifying-but-not-comitting
def on_submit(self):
x = "y"
self.status = x
self.save()
# ruleid: frappe-modifying-but-not-comitting-other-method
class DoctypeClass(Document):
def on_submit(self):
self.good_method()
self.tainted_method()
def tainted_method(self):
self.status = "uptate"
# ok: frappe-modifying-but-not-comitting-other-method
class DoctypeClass(Document):
def on_submit(self):
self.good_method()
self.tainted_method()
def tainted_method(self):
self.status = "update"
self.db_set("status", "update")
# ok: frappe-modifying-but-not-comitting-other-method
class DoctypeClass(Document):
def on_submit(self):
self.good_method()
self.tainted_method()
self.save()
def tainted_method(self):
self.status = "uptate"

View File

@@ -1,151 +0,0 @@
# This file specifies rules for correctness according to how frappe doctype data model works.
rules:
- id: frappe-modifying-but-not-comitting
patterns:
- pattern: |
def $METHOD(self, ...):
...
self.$ATTR = ...
- pattern-not: |
def $METHOD(self, ...):
...
self.$ATTR = ...
...
self.db_set(..., self.$ATTR, ...)
- pattern-not: |
def $METHOD(self, ...):
...
self.$ATTR = $SOME_VAR
...
self.db_set(..., $SOME_VAR, ...)
- pattern-not: |
def $METHOD(self, ...):
...
self.$ATTR = $SOME_VAR
...
self.save()
- metavariable-regex:
metavariable: '$ATTR'
# this is negative look-ahead, add more attrs to ignore like (ignore|ignore_this_too|ignore_me)
regex: '^(?!ignore_linked_doctypes|status_updater)(.*)$'
- metavariable-regex:
metavariable: "$METHOD"
regex: "(on_submit|on_cancel)"
message: |
DocType modified in self.$METHOD. Please check if modification of self.$ATTR is commited to database.
languages: [python]
severity: ERROR
- id: frappe-modifying-but-not-comitting-other-method
patterns:
- pattern: |
class $DOCTYPE(...):
def $METHOD(self, ...):
...
self.$ANOTHER_METHOD()
...
def $ANOTHER_METHOD(self, ...):
...
self.$ATTR = ...
- pattern-not: |
class $DOCTYPE(...):
def $METHOD(self, ...):
...
self.$ANOTHER_METHOD()
...
def $ANOTHER_METHOD(self, ...):
...
self.$ATTR = ...
...
self.db_set(..., self.$ATTR, ...)
- pattern-not: |
class $DOCTYPE(...):
def $METHOD(self, ...):
...
self.$ANOTHER_METHOD()
...
def $ANOTHER_METHOD(self, ...):
...
self.$ATTR = $SOME_VAR
...
self.db_set(..., $SOME_VAR, ...)
- pattern-not: |
class $DOCTYPE(...):
def $METHOD(self, ...):
...
self.$ANOTHER_METHOD()
...
self.save()
def $ANOTHER_METHOD(self, ...):
...
self.$ATTR = ...
- metavariable-regex:
metavariable: "$METHOD"
regex: "(on_submit|on_cancel)"
message: |
self.$ANOTHER_METHOD is called from self.$METHOD, check if changes to self.$ATTR are commited to database.
languages: [python]
severity: ERROR
- id: frappe-print-function-in-doctypes
pattern: print(...)
message: |
Did you mean to leave this print statement in? Consider using msgprint or logger instead of print statement.
languages: [python]
severity: WARNING
paths:
include:
- "*/**/doctype/*"
- id: frappe-modifying-child-tables-while-iterating
pattern-either:
- pattern: |
for $ROW in self.$TABLE:
...
self.remove(...)
- pattern: |
for $ROW in self.$TABLE:
...
self.append(...)
message: |
Child table being modified while iterating on it.
languages: [python]
severity: ERROR
paths:
include:
- "*/**/doctype/*"
- id: frappe-same-key-assigned-twice
pattern-either:
- pattern: |
{..., $X: $A, ..., $X: $B, ...}
- pattern: |
dict(..., ($X, $A), ..., ($X, $B), ...)
- pattern: |
_dict(..., ($X, $A), ..., ($X, $B), ...)
message: |
key `$X` is uselessly assigned twice. This could be a potential bug.
languages: [python]
severity: ERROR
- id: frappe-manual-commit
patterns:
- pattern: frappe.db.commit()
- pattern-not-inside: |
try:
...
except ...:
...
message: |
Manually commiting a transaction is highly discouraged. Read about the transaction model implemented by Frappe Framework before adding manual commits: https://frappeframework.com/docs/user/en/api/database#database-transaction-model If you think manual commit is required then add a comment explaining why and `// nosemgrep` on the same line.
paths:
exclude:
- "**/patches/**"
- "**/demo/**"
languages: [python]
severity: ERROR

View File

@@ -1,14 +0,0 @@
from frappe import _
# ruleid: frappe-missing-translate-function-in-report-python
{"label": "Field Label"}
# ruleid: frappe-missing-translate-function-in-report-python
dict(label="Field Label")
# ok: frappe-missing-translate-function-in-report-python
{"label": _("Field Label")}
# ok: frappe-missing-translate-function-in-report-python
dict(label=_("Field Label"))

View File

@@ -1,34 +0,0 @@
rules:
- id: frappe-missing-translate-function-in-report-python
paths:
include:
- "**/report"
exclude:
- "**/regional"
pattern-either:
- patterns:
- pattern: |
{..., "label": "...", ...}
- pattern-not: |
{..., "label": _("..."), ...}
- patterns:
- pattern: dict(..., label="...", ...)
- pattern-not: dict(..., label=_("..."), ...)
message: |
All user facing text must be wrapped in translate function. Please refer to translation documentation. https://frappeframework.com/docs/user/en/guides/basics/translations
languages: [python]
severity: ERROR
- id: frappe-translated-values-in-business-logic
paths:
include:
- "**/report"
patterns:
- pattern-inside: |
{..., filters: [...], ...}
- pattern: |
{..., options: [..., __("..."), ...], ...}
message: |
Using translated values in options field will require you to translate the values while comparing in business logic. Instead of passing translated labels provide objects that contain both label and value. e.g. { label: __("Option value"), value: "Option value"}
languages: [javascript]
severity: ERROR

View File

@@ -1,6 +0,0 @@
def function_name(input):
# ruleid: frappe-codeinjection-eval
eval(input)
# ok: frappe-codeinjection-eval
eval("1 + 1")

View File

@@ -1,10 +0,0 @@
rules:
- id: frappe-codeinjection-eval
patterns:
- pattern-not: eval("...")
- pattern: eval(...)
message: |
Detected the use of eval(). eval() can be dangerous if used to evaluate
dynamic content. Avoid it or use safe_eval().
languages: [python]
severity: ERROR

View File

@@ -1,44 +0,0 @@
// ruleid: frappe-translation-empty-string
__("")
// ruleid: frappe-translation-empty-string
__('')
// ok: frappe-translation-js-formatting
__('Welcome {0}, get started with ERPNext in just a few clicks.', [full_name]);
// ruleid: frappe-translation-js-formatting
__(`Welcome ${full_name}, get started with ERPNext in just a few clicks.`);
// ok: frappe-translation-js-formatting
__('This is fine');
// ok: frappe-translation-trailing-spaces
__('This is fine');
// ruleid: frappe-translation-trailing-spaces
__(' this is not ok ');
// ruleid: frappe-translation-trailing-spaces
__('this is not ok ');
// ruleid: frappe-translation-trailing-spaces
__(' this is not ok');
// ok: frappe-translation-js-splitting
__('You have {0} subscribers in your mailing list.', [subscribers.length])
// todoruleid: frappe-translation-js-splitting
__('You have') + subscribers.length + __('subscribers in your mailing list.')
// ruleid: frappe-translation-js-splitting
__('You have' + 'subscribers in your mailing list.')
// ruleid: frappe-translation-js-splitting
__('You have {0} subscribers' +
'in your mailing list', [subscribers.length])
// ok: frappe-translation-js-splitting
__("Ctrl+Enter to add comment")
// ruleid: frappe-translation-js-splitting
__('You have {0} subscribers \
in your mailing list', [subscribers.length])

View File

@@ -1,61 +0,0 @@
# Examples taken from https://frappeframework.com/docs/user/en/translations
# This file is used for testing the tests.
from frappe import _
full_name = "Jon Doe"
# ok: frappe-translation-python-formatting
_('Welcome {0}, get started with ERPNext in just a few clicks.').format(full_name)
# ruleid: frappe-translation-python-formatting
_('Welcome %s, get started with ERPNext in just a few clicks.' % full_name)
# ruleid: frappe-translation-python-formatting
_('Welcome %(name)s, get started with ERPNext in just a few clicks.' % {'name': full_name})
# ruleid: frappe-translation-python-formatting
_('Welcome {0}, get started with ERPNext in just a few clicks.'.format(full_name))
subscribers = ["Jon", "Doe"]
# ok: frappe-translation-python-formatting
_('You have {0} subscribers in your mailing list.').format(len(subscribers))
# ruleid: frappe-translation-python-splitting
_('You have') + len(subscribers) + _('subscribers in your mailing list.')
# ruleid: frappe-translation-python-splitting
_('You have {0} subscribers \
in your mailing list').format(len(subscribers))
# ok: frappe-translation-python-splitting
_('You have {0} subscribers') \
+ 'in your mailing list'
# ruleid: frappe-translation-trailing-spaces
msg = _(" You have {0} pending invoice ")
# ruleid: frappe-translation-trailing-spaces
msg = _("You have {0} pending invoice ")
# ruleid: frappe-translation-trailing-spaces
msg = _(" You have {0} pending invoice")
# ok: frappe-translation-trailing-spaces
msg = ' ' + _("You have {0} pending invoices") + ' '
# ruleid: frappe-translation-python-formatting
_(f"can not format like this - {subscribers}")
# ruleid: frappe-translation-python-splitting
_(f"what" + f"this is also not cool")
# ruleid: frappe-translation-empty-string
_("")
# ruleid: frappe-translation-empty-string
_('')
class Test:
# ok: frappe-translation-python-splitting
def __init__(
args
):
pass

View File

@@ -1,64 +0,0 @@
rules:
- id: frappe-translation-empty-string
pattern-either:
- pattern: _("")
- pattern: __("")
message: |
Empty string is useless for translation.
Please refer: https://frappeframework.com/docs/user/en/translations
languages: [python, javascript, json]
severity: ERROR
- id: frappe-translation-trailing-spaces
pattern-either:
- pattern: _("=~/(^[ \t]+|[ \t]+$)/")
- pattern: __("=~/(^[ \t]+|[ \t]+$)/")
message: |
Trailing or leading whitespace not allowed in translate strings.
Please refer: https://frappeframework.com/docs/user/en/translations
languages: [python, javascript, json]
severity: ERROR
- id: frappe-translation-python-formatting
pattern-either:
- pattern: _("..." % ...)
- pattern: _("...".format(...))
- pattern: _(f"...")
message: |
Only positional formatters are allowed and formatting should not be done before translating.
Please refer: https://frappeframework.com/docs/user/en/translations
languages: [python]
severity: ERROR
- id: frappe-translation-js-formatting
patterns:
- pattern: __(`...`)
- pattern-not: __("...")
message: |
Template strings are not allowed for text formatting.
Please refer: https://frappeframework.com/docs/user/en/translations
languages: [javascript, json]
severity: ERROR
- id: frappe-translation-python-splitting
pattern-either:
- pattern: _(...) + _(...)
- pattern: _("..." + "...")
- pattern-regex: '[\s\.]_\([^\)]*\\\s*' # lines broken by `\`
- pattern-regex: '[\s\.]_\(\s*\n' # line breaks allowed by python for using ( )
message: |
Do not split strings inside translate function. Do not concatenate using translate functions.
Please refer: https://frappeframework.com/docs/user/en/translations
languages: [python]
severity: ERROR
- id: frappe-translation-js-splitting
pattern-either:
- pattern-regex: '__\([^\)]*[\\]\s+'
- pattern: __('...' + '...', ...)
- pattern: __('...') + __('...')
message: |
Do not split strings inside translate function. Do not concatenate using translate functions.
Please refer: https://frappeframework.com/docs/user/en/translations
languages: [javascript, json]
severity: ERROR

View File

@@ -1,9 +0,0 @@
// ok: frappe-missing-translate-function-js
frappe.msgprint('{{ _("Both login and password required") }}');
// ruleid: frappe-missing-translate-function-js
frappe.msgprint('What');
// ok: frappe-missing-translate-function-js
frappe.throw(' {{ _("Both login and password required") }}. ');

View File

@@ -1,30 +0,0 @@
import frappe
from frappe import _, msgprint, throw
# ruleid: frappe-missing-translate-function-python
throw("Error Occured")
# ruleid: frappe-missing-translate-function-python
frappe.throw("Error Occured")
# ruleid: frappe-missing-translate-function-python
frappe.msgprint("Useful message")
# ruleid: frappe-missing-translate-function-python
msgprint("Useful message")
# ok: frappe-missing-translate-function-python
translatedmessage = _("Hello")
# ok: frappe-missing-translate-function-python
throw(translatedmessage)
# ok: frappe-missing-translate-function-python
msgprint(translatedmessage)
# ok: frappe-missing-translate-function-python
msgprint(_("Helpful message"))
# ok: frappe-missing-translate-function-python
frappe.throw(_("Error occured"))

View File

@@ -1,30 +0,0 @@
rules:
- id: frappe-missing-translate-function-python
pattern-either:
- patterns:
- pattern: frappe.msgprint("...", ...)
- pattern-not: frappe.msgprint(_("..."), ...)
- patterns:
- pattern: frappe.throw("...", ...)
- pattern-not: frappe.throw(_("..."), ...)
message: |
All user facing text must be wrapped in translate function. Please refer to translation documentation. https://frappeframework.com/docs/user/en/guides/basics/translations
languages: [python]
severity: ERROR
- id: frappe-missing-translate-function-js
pattern-either:
- patterns:
- pattern: frappe.msgprint("...", ...)
- pattern-not: frappe.msgprint(__("..."), ...)
# ignore microtemplating e.g. msgprint("{{ _("server side translation") }}")
- pattern-not: frappe.msgprint("=~/\{\{.*\_.*\}\}/i", ...)
- patterns:
- pattern: frappe.throw("...", ...)
- pattern-not: frappe.throw(__("..."), ...)
# ignore microtemplating
- pattern-not: frappe.throw("=~/\{\{.*\_.*\}\}/i", ...)
message: |
All user facing text must be wrapped in translate function. Please refer to translation documentation. https://frappeframework.com/docs/user/en/guides/basics/translations
languages: [javascript]
severity: ERROR

View File

@@ -1,60 +0,0 @@
import re
import sys
errors_encounter = 0
pattern = re.compile(r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,(\s*?.*?\n*?)*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)")
words_pattern = re.compile(r"_{1,2}\([\"'`]{1,3}.*?[a-zA-Z]")
start_pattern = re.compile(r"_{1,2}\([f\"'`]{1,3}")
f_string_pattern = re.compile(r"_\(f[\"']")
starts_with_f_pattern = re.compile(r"_\(f")
# skip first argument
files = sys.argv[1:]
files_to_scan = [_file for _file in files if _file.endswith(('.py', '.js'))]
for _file in files_to_scan:
with open(_file, 'r') as f:
print(f'Checking: {_file}')
file_lines = f.readlines()
for line_number, line in enumerate(file_lines, 1):
if 'frappe-lint: disable-translate' in line:
continue
start_matches = start_pattern.search(line)
if start_matches:
starts_with_f = starts_with_f_pattern.search(line)
if starts_with_f:
has_f_string = f_string_pattern.search(line)
if has_f_string:
errors_encounter += 1
print(f'\nF-strings are not supported for translations at line number {line_number}\n{line.strip()[:100]}')
continue
else:
continue
match = pattern.search(line)
error_found = False
if not match and line.endswith((',\n', '[\n')):
# concat remaining text to validate multiline pattern
line = "".join(file_lines[line_number - 1:])
line = line[start_matches.start() + 1:]
match = pattern.match(line)
if not match:
error_found = True
print(f'\nTranslation syntax error at line number {line_number}\n{line.strip()[:100]}')
if not error_found and not words_pattern.search(line):
error_found = True
print(f'\nTranslation is useless because it has no words at line number {line_number}\n{line.strip()[:100]}')
if error_found:
errors_encounter += 1
if errors_encounter > 0:
print('\nVisit "https://frappeframework.com/docs/user/en/translations" to learn about valid translation strings.')
sys.exit(1)
else:
print('\nGood To Go!')

View File

@@ -1,25 +0,0 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
jobs:
main:
runs-on: ubuntu-latest
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

@@ -1,14 +0,0 @@
name: Trigger Docker build on release
on:
release:
types: [released]
jobs:
curl:
runs-on: ubuntu-latest
container:
image: alpine:latest
steps:
- name: curl
run: |
apk add curl bash
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token ${{ secrets.TRAVIS_CI_TOKEN }}" -d '{"request":{"branch":"master"}}' https://api.travis-ci.com/repo/frappe%2Ffrappe_docker/requests

View File

@@ -1,24 +0,0 @@
name: 'Documentation Required'
on:
pull_request:
types: [ opened, synchronize, reopened, edited ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Setup Environment'
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: 'Clone repo'
uses: actions/checkout@v2
- name: Validate Docs
env:
PR_NUMBER: ${{ github.event.number }}
run: |
pip install requests --quiet
python $GITHUB_WORKSPACE/.github/helper/documentation.py $PR_NUMBER

View File

@@ -1,27 +0,0 @@
name: Linters
on:
pull_request: { }
jobs:
linters:
name: linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
env:
SEMGREP_TIMEOUT: 120
with:
config: >-
r/python.lang.correctness
.github/helper/semgrep_rules
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install and Run Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -1,85 +0,0 @@
name: Patch
on:
pull_request:
paths-ignore:
- '**.js'
- '**.md'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-18.04
name: Patch Test
services:
mysql:
image: mariadb:10.3
env:
MYSQL_ALLOW_EMPTY_PASSWORD: YES
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 12
check-latest: true
- name: Add to Hosts
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
- name: Run Patch Tests
run: |
cd ~/frappe-bench/
wget https://erpnext.com/files/v10-erpnext.sql.gz
bench --site test_site --force restore ~/frappe-bench/v10-erpnext.sql.gz
bench --site test_site migrate

View File

@@ -1,126 +0,0 @@
name: Server
on:
pull_request:
paths-ignore:
- '**.js'
- '**.md'
workflow_dispatch:
push:
branches: [ develop ]
paths-ignore:
- '**.js'
- '**.md'
jobs:
test:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
container: [1, 2, 3]
name: Python Unit Tests
services:
mysql:
image: mariadb:10.3
env:
MYSQL_ALLOW_EMPTY_PASSWORD: YES
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 12
check-latest: true
- name: Add to Hosts
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
- name: Run Tests
run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --use-orchestrator --with-coverage
env:
TYPE: server
CI_BUILD_ID: ${{ github.run_id }}
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io
- name: Upload Coverage Data
run: |
cp ~/frappe-bench/sites/.coverage ${GITHUB_WORKSPACE}
cd ${GITHUB_WORKSPACE}
pip3 install coverage==5.5
pip3 install coveralls==3.0.1
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-${{ matrix.container }}
COVERALLS_SERVICE_NAME: ${{ github.event_name == 'pull_request' && 'github' || 'github-actions' }}
COVERALLS_PARALLEL: true
coveralls:
name: Coverage Wrap Up
needs: test
container: python:3-slim
runs-on: ubuntu-18.04
steps:
- name: Clone
uses: actions/checkout@v2
- name: Coveralls Finished
run: |
cd ${GITHUB_WORKSPACE}
pip3 install coverage==5.5
pip3 install coveralls==3.0.1
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,22 +0,0 @@
name: Frappe Linter
on:
pull_request:
branches:
- develop
- version-12-hotfix
- version-11-hotfix
jobs:
check_translation:
name: Translation Syntax Check
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup python3
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Validating Translation Syntax
run: |
git fetch origin $GITHUB_BASE_REF:$GITHUB_BASE_REF -q
files=$(git diff --name-only --diff-filter=d $GITHUB_BASE_REF)
python $GITHUB_WORKSPACE/.github/helper/translation.py $files

View File

@@ -1,112 +0,0 @@
name: UI
on:
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
name: UI Tests (Cypress)
services:
mysql:
image: mariadb:10.3
env:
MYSQL_ALLOW_EMPTY_PASSWORD: YES
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: actions/setup-node@v2
with:
node-version: 14
check-latest: true
- name: Add to Hosts
run: |
echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache cypress binary
uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-cypress-
restore-keys: |
${{ runner.os }}-cypress-
${{ runner.os }}-
- name: Install
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
env:
DB: mariadb
TYPE: ui
- name: Site Setup
run: cd ~/frappe-bench/ && bench --site test_site execute erpnext.setup.utils.before_tests
- name: cypress pre-requisites
run: cd ~/frappe-bench/apps/frappe && yarn add cypress-file-upload@^5 @testing-library/cypress@^8 --no-lockfile
- name: Build Assets
run: cd ~/frappe-bench/ && bench build
env:
CI: Yes
- name: UI Tests
run: cd ~/frappe-bench/ && bench --site test_site run-ui-tests erpnext --headless
env:
CYPRESS_RECORD_KEY: 60a8e3bf-08f5-45b1-9269-2b207d7d30cd
- name: Show bench console if tests failed
if: ${{ failure() }}
run: cat ~/frappe-bench/bench_run_logs.txt

View File

@@ -1,58 +0,0 @@
pull_request_rules:
- name: Auto-close PRs on stable branch
conditions:
- and:
- and:
- author!=surajshetty3416
- author!=gavindsouza
- author!=rohitwaghchaure
- author!=nabinhait
- or:
- base=version-13
- base=version-12
actions:
close:
comment:
message: |
@{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch.
https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#which-branch
- name: backport to version-13-hotfix
conditions:
- label="backport version-13-hotfix"
actions:
backport:
branches:
- version-13-hotfix
assignees:
- "{{ author }}"
- name: backport to version-13-pre-release
conditions:
- label="backport version-13-pre-release"
actions:
backport:
branches:
- version-13-pre-release
assignees:
- "{{ author }}"
- name: backport to version-12-hotfix
conditions:
- label="backport version-12-hotfix"
actions:
backport:
branches:
- version-12-hotfix
assignees:
- "{{ author }}"
- name: backport to version-12-pre-release
conditions:
- label="backport version-12-pre-release"
actions:
backport:
branches:
- version-12-pre-release
assignees:
- "{{ author }}"

View File

@@ -1,38 +0,0 @@
exclude: 'node_modules|.git'
default_stages: [commit]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
files: "erpnext.*"
exclude: ".*json$|.*txt$|.*csv|.*md"
- id: check-yaml
- id: no-commit-to-branch
args: ['--branch', 'develop']
- id: check-merge-conflict
- id: check-ast
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear',
]
args: ['--config', '.github/helper/.flake8_strict']
exclude: ".*setup.py$"
- repo: https://github.com/timothycrosley/isort
rev: 5.9.1
hooks:
- id: isort
exclude: ".*setup.py$"
ci:
autoupdate_schedule: weekly
skip: []
submodules: false

1
.pylintrc Normal file
View File

@@ -0,0 +1 @@
disable=access-member-before-definition

82
.travis.yml Normal file
View File

@@ -0,0 +1,82 @@
dist: trusty
language: python
git:
depth: 1
cache:
- pip
addons:
hosts: test_site
mariadb: 10.3
jobs:
include:
- name: "Python 2.7 Server Side Test"
python: 2.7
script: bench --site test_site run-tests --app erpnext --coverage
- name: "Python 3.6 Server Side Test"
python: 3.6
script: bench --site test_site run-tests --app erpnext --coverage
- name: "Python 2.7 Patch Test"
python: 2.7
before_script:
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz
script: bench --site test_site migrate
- name: "Python 3.6 Patch Test"
python: 3.6
before_script:
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz
script: bench --site test_site migrate
install:
- cd ~
- nvm install 10
- git clone https://github.com/frappe/bench --depth 1
- pip install -e ./bench
- git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
- bench init --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench
- mkdir ~/frappe-bench/sites/test_site
- cp -r $TRAVIS_BUILD_DIR/.travis/site_config.json ~/frappe-bench/sites/test_site/
- mysql -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
- mysql -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
- mysql -u root -e "CREATE DATABASE test_frappe"
- mysql -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
- mysql -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
- mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
- mysql -u root -e "FLUSH PRIVILEGES"
- wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
- tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
- sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
- sudo chmod o+x /usr/local/bin/wkhtmltopdf
- sudo apt-get install libcups2-dev
- cd ~/frappe-bench
- sed -i 's/watch:/# watch:/g' Procfile
- sed -i 's/schedule:/# schedule:/g' Procfile
- sed -i 's/socketio:/# socketio:/g' Procfile
- sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
- bench get-app erpnext $TRAVIS_BUILD_DIR
- bench start &
- bench --site test_site reinstall --yes
after_script:
- pip install coverage==4.5.4
- pip install python-coveralls
- coveralls -b apps/erpnext -d ../../sites/.coverage

View File

@@ -1,6 +1,4 @@
{
"db_host": "127.0.0.1",
"db_port": 3306,
"db_name": "test_frappe",
"db_password": "test_frappe",
"auto_email_id": "test@example.com",
@@ -11,6 +9,5 @@
"root_login": "root",
"root_password": "travis",
"host_name": "http://test_site:8000",
"install_apps": ["erpnext"],
"throttle_user_limit": 100
"install_apps": ["erpnext"]
}

View File

@@ -1,35 +0,0 @@
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
erpnext/accounts/ @nextchamp-saqib @deepeshgarg007
erpnext/assets/ @nextchamp-saqib @deepeshgarg007
erpnext/erpnext_integrations/ @nextchamp-saqib
erpnext/loan_management/ @nextchamp-saqib @deepeshgarg007
erpnext/regional @nextchamp-saqib @deepeshgarg007
erpnext/selling @nextchamp-saqib @deepeshgarg007
erpnext/support/ @nextchamp-saqib @deepeshgarg007
pos* @nextchamp-saqib
erpnext/buying/ @marination @rohitwaghchaure @ankush
erpnext/e_commerce/ @marination
erpnext/maintenance/ @marination @rohitwaghchaure
erpnext/manufacturing/ @marination @rohitwaghchaure @ankush
erpnext/portal/ @marination
erpnext/quality_management/ @marination @rohitwaghchaure
erpnext/shopping_cart/ @marination
erpnext/stock/ @marination @rohitwaghchaure @ankush
erpnext/crm/ @ruchamahabal @pateljannat
erpnext/education/ @ruchamahabal @pateljannat
erpnext/healthcare/ @ruchamahabal @pateljannat @chillaranand
erpnext/hr/ @ruchamahabal @pateljannat
erpnext/non_profit/ @ruchamahabal
erpnext/payroll @ruchamahabal @pateljannat
erpnext/projects/ @ruchamahabal @pateljannat
erpnext/controllers @deepeshgarg007 @nextchamp-saqib @rohitwaghchaure @marination
.github/ @surajshetty3416 @ankush
requirements.txt @gavindsouza

View File

@@ -5,7 +5,7 @@
<p>ERP made simple</p>
</p>
[![CI](https://github.com/frappe/erpnext/actions/workflows/ci-tests.yml/badge.svg?branch=develop)](https://github.com/frappe/erpnext/actions/workflows/ci-tests.yml)
[![Build Status](https://travis-ci.com/frappe/erpnext.svg)](https://travis-ci.com/frappe/erpnext)
[![Open Source Helpers](https://www.codetriage.com/frappe/erpnext/badges/users.svg)](https://www.codetriage.com/frappe/erpnext)
[![Coverage Status](https://coveralls.io/repos/github/frappe/erpnext/badge.svg?branch=develop)](https://coveralls.io/github/frappe/erpnext?branch=develop)
@@ -13,36 +13,15 @@
</div>
ERPNext as a monolith includes the following areas for managing businesses:
Includes: Accounting, Inventory, Manufacturing, CRM, Sales, Purchase, Project Management, HRMS. Requires MariaDB.
1. [Accounting](https://erpnext.com/open-source-accounting)
1. [Warehouse Management](https://erpnext.com/distribution/warehouse-management-system)
1. [CRM](https://erpnext.com/open-source-crm)
1. [Sales](https://erpnext.com/open-source-sales-purchase)
1. [Purchase](https://erpnext.com/open-source-sales-purchase)
1. [HRMS](https://erpnext.com/open-source-hrms)
1. [Project Management](https://erpnext.com/open-source-projects)
1. [Support](https://erpnext.com/open-source-help-desk-software)
1. [Asset Management](https://erpnext.com/open-source-asset-management-software)
1. [Quality Management](https://erpnext.com/docs/user/manual/en/quality-management)
1. [Manufacturing](https://erpnext.com/open-source-manufacturing-erp-software)
1. [Website Management](https://erpnext.com/open-source-website-builder-software)
1. [Customize ERPNext](https://erpnext.com/docs/user/manual/en/customize-erpnext)
1. [And More](https://erpnext.com/docs/user/manual/en/)
ERPNext requires MariaDB.
ERPNext is built on the [Frappe Framework](https://github.com/frappe/frappe), a full-stack web app framework built with Python & JavaScript.
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
- [User Guide](https://erpnext.com/docs/user)
- [Discussion Forum](https://discuss.erpnext.com/)
---
### Containerized Installation
Use docker to deploy ERPNext in production or for development of [Frappe](https://github.com/frappe/frappe) apps. See https://github.com/frappe/frappe_docker for more details.
### Full Install
The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.

View File

@@ -1,11 +0,0 @@
{
"baseUrl": "http://test_site:8000",
"projectId": "da59y9",
"adminPassword": "admin",
"defaultCommandTimeout": 20000,
"pageLoadTimeout": 15000,
"retries": {
"runMode": 2,
"openMode": 2
}
}

View File

@@ -1,5 +0,0 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

View File

@@ -1,13 +0,0 @@
context('Customer', () => {
before(() => {
cy.login();
});
it('Check Customer Group', () => {
cy.visit(`app/customer/`);
cy.get('.primary-action').click();
cy.wait(500);
cy.get('.custom-actions > .btn').click();
cy.get_field('customer_group', 'Link').should('have.value', 'All Customer Groups');
});
});

View File

@@ -1,116 +0,0 @@
context('Organizational Chart', () => {
before(() => {
cy.login();
cy.visit('/app/website');
});
it('navigates to org chart', () => {
cy.visit('/app');
cy.visit('/app/organizational-chart');
cy.url().should('include', '/organizational-chart');
cy.window().its('frappe.csrf_token').then(csrf_token => {
return cy.request({
url: `/api/method/erpnext.tests.ui_test_helpers.create_employee_records`,
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'X-Frappe-CSRF-Token': csrf_token
},
timeout: 60000
}).then(res => {
expect(res.status).eq(200);
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
cy.get('@input')
.clear({ force: true })
.type('Test Org Chart{downarrow}{enter}', { force: true })
.blur({ force: true });
});
});
});
it('renders root nodes and loads children for the first expandable node', () => {
// check rendered root nodes and the node name, title, connections
cy.get('.hierarchy').find('.root-level ul.node-children').children()
.should('have.length', 2)
.first()
.as('first-child');
cy.get('@first-child').get('.node-name').contains('Test Employee 1');
cy.get('@first-child').get('.node-info').find('.node-title').contains('CEO');
cy.get('@first-child').get('.node-info').find('.node-connections').contains('· 2 Connections');
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
// children of 1st root visible
cy.get(`div[data-parent="${employee_records.message[0]}"]`).as('child-node');
cy.get('@child-node')
.should('have.length', 1)
.should('be.visible');
cy.get('@child-node').get('.node-name').contains('Test Employee 3');
// connectors between first root node and immediate child
cy.get(`path[data-parent="${employee_records.message[0]}"]`)
.should('be.visible')
.invoke('attr', 'data-child')
.should('equal', employee_records.message[2]);
});
});
it('hides active nodes children and connectors on expanding sibling node', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
// click sibling
cy.get(`#${employee_records.message[1]}`)
.click()
.should('have.class', 'active');
// child nodes and connectors hidden
cy.get(`[data-parent="${employee_records.message[0]}"]`).should('not.be.visible');
cy.get(`path[data-parent="${employee_records.message[0]}"]`).should('not.be.visible');
});
});
it('collapses previous level nodes and refreshes connectors on expanding child node', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
// click child node
cy.get(`#${employee_records.message[3]}`)
.click()
.should('have.class', 'active');
// previous level nodes: parent should be on active-path; other nodes should be collapsed
cy.get(`#${employee_records.message[0]}`).should('have.class', 'collapsed');
cy.get(`#${employee_records.message[1]}`).should('have.class', 'active-path');
// previous level connectors refreshed
cy.get(`path[data-parent="${employee_records.message[1]}"]`)
.should('have.class', 'collapsed-connector');
// child node's children and connectors rendered
cy.get(`[data-parent="${employee_records.message[3]}"]`).should('be.visible');
cy.get(`path[data-parent="${employee_records.message[3]}"]`).should('be.visible');
});
});
it('expands previous level nodes', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
cy.get(`#${employee_records.message[0]}`)
.click()
.should('have.class', 'active');
cy.get(`[data-parent="${employee_records.message[0]}"]`)
.should('be.visible');
cy.get('ul.hierarchy').children().should('have.length', 2);
cy.get(`#connectors`).children().should('have.length', 1);
});
});
it('edit node navigates to employee master', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
cy.get(`#${employee_records.message[0]}`).find('.btn-edit-node')
.click();
cy.url().should('include', `/employee/${employee_records.message[0]}`);
});
});
});

View File

@@ -1,195 +0,0 @@
context('Organizational Chart Mobile', () => {
before(() => {
cy.login();
cy.visit('/app/website');
});
it('navigates to org chart', () => {
cy.viewport(375, 667);
cy.visit('/app');
cy.visit('/app/organizational-chart');
cy.url().should('include', '/organizational-chart');
cy.window().its('frappe.csrf_token').then(csrf_token => {
return cy.request({
url: `/api/method/erpnext.tests.ui_test_helpers.create_employee_records`,
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'X-Frappe-CSRF-Token': csrf_token
},
timeout: 60000
}).then(res => {
expect(res.status).eq(200);
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
cy.get('@input')
.clear({ force: true })
.type('Test Org Chart{downarrow}{enter}', { force: true })
.blur({ force: true });
});
});
});
it('renders root nodes', () => {
// check rendered root nodes and the node name, title, connections
cy.get('.hierarchy-mobile').find('.root-level').children()
.should('have.length', 2)
.first()
.as('first-child');
cy.get('@first-child').get('.node-name').contains('Test Employee 1');
cy.get('@first-child').get('.node-info').find('.node-title').contains('CEO');
cy.get('@first-child').get('.node-info').find('.node-connections').contains('· 2');
});
it('expands root node', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
cy.get(`#${employee_records.message[1]}`)
.click()
.should('have.class', 'active');
// other root node removed
cy.get(`#${employee_records.message[0]}`).should('not.exist');
// children of active root node
cy.get('.hierarchy-mobile').find('.level').first().find('ul.node-children').children()
.should('have.length', 2);
cy.get(`div[data-parent="${employee_records.message[1]}"]`).first().as('child-node');
cy.get('@child-node').should('be.visible');
cy.get('@child-node')
.get('.node-name')
.contains('Test Employee 4');
// connectors between root node and immediate children
cy.get(`path[data-parent="${employee_records.message[1]}"]`).as('connectors');
cy.get('@connectors')
.should('have.length', 2)
.should('be.visible');
cy.get('@connectors')
.first()
.invoke('attr', 'data-child')
.should('eq', employee_records.message[3]);
});
});
it('expands child node', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
cy.get(`#${employee_records.message[3]}`)
.click()
.should('have.class', 'active')
.as('expanded_node');
// 2 levels on screen; 1 on active path; 1 collapsed
cy.get('.hierarchy-mobile').children().should('have.length', 2);
cy.get(`#${employee_records.message[1]}`).should('have.class', 'active-path');
// children of expanded node visible
cy.get('@expanded_node')
.next()
.should('have.class', 'node-children')
.as('node-children');
cy.get('@node-children').children().should('have.length', 1);
cy.get('@node-children')
.first()
.get('.node-card')
.should('have.class', 'active-child')
.contains('Test Employee 7');
// orphan connectors removed
cy.get(`#connectors`).children().should('have.length', 2);
});
});
it('renders sibling group', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
// sibling group visible for parent
cy.get(`#${employee_records.message[1]}`)
.next()
.as('sibling_group');
cy.get('@sibling_group')
.should('have.attr', 'data-parent', 'undefined')
.should('have.class', 'node-group')
.and('have.class', 'collapsed');
cy.get('@sibling_group').get('.avatar-group').children().as('siblings');
cy.get('@siblings').should('have.length', 1);
cy.get('@siblings')
.first()
.should('have.attr', 'title', 'Test Employee 1');
});
});
it('expands previous level nodes', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
cy.get(`#${employee_records.message[6]}`)
.click()
.should('have.class', 'active');
// clicking on previous level node should remove all the nodes ahead
// and expand that node
cy.get(`#${employee_records.message[3]}`).click();
cy.get(`#${employee_records.message[3]}`)
.should('have.class', 'active')
.should('not.have.class', 'active-path');
cy.get(`#${employee_records.message[6]}`).should('have.class', 'active-child');
cy.get('.hierarchy-mobile').children().should('have.length', 2);
cy.get(`#connectors`).children().should('have.length', 2);
});
});
it('expands sibling group', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
// sibling group visible for parent
cy.get(`#${employee_records.message[6]}`).click();
cy.get(`#${employee_records.message[3]}`)
.next()
.click();
// siblings of parent should be visible
cy.get('.hierarchy-mobile').prev().as('sibling_group');
cy.get('@sibling_group')
.should('exist')
.should('have.class', 'sibling-group')
.should('not.have.class', 'collapsed');
cy.get(`#${employee_records.message[1]}`)
.should('be.visible')
.should('have.class', 'active');
cy.get(`[data-parent="${employee_records.message[1]}"]`)
.should('be.visible')
.should('have.length', 2)
.should('have.class', 'active-child');
});
});
it('goes to the respective level after clicking on non-collapsed sibling group', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(() => {
// click on non-collapsed sibling group
cy.get('.hierarchy-mobile')
.prev()
.click();
// should take you to that level
cy.get('.hierarchy-mobile').find('li.level .node-card').should('have.length', 2);
});
});
it('edit node navigates to employee master', () => {
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
cy.get(`#${employee_records.message[0]}`).find('.btn-edit-node')
.click();
cy.url().should('include', `/employee/${employee_records.message[0]}`);
});
});
});

View File

@@ -1,17 +0,0 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
module.exports = () => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
};

View File

@@ -1,31 +0,0 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... });
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... });
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... });
//
//
// -- This is will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... });
const slug = (name) => name.toLowerCase().replace(" ", "-");
Cypress.Commands.add("go_to_doc", (doctype, name) => {
cy.visit(`/app/${slug(doctype)}/${encodeURIComponent(name)}`);
});

View File

@@ -1,26 +0,0 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands';
import '../../../frappe/cypress/support/commands' // eslint-disable-line
// Alternatively you can use CommonJS syntax:
// require('./commands')
Cypress.Cookies.defaults({
preserve: 'sid'
});

View File

@@ -1,12 +0,0 @@
{
"compilerOptions": {
"allowJs": true,
"baseUrl": "../node_modules",
"types": [
"cypress"
]
},
"include": [
"**/*.*"
]
}

View File

@@ -1,9 +0,0 @@
{
"extends": ["stylelint-config-recommended"],
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"no-descending-specificity": null
}
}

View File

@@ -1,13 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import inspect
import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '13.13.0'
__version__ = '12.7.0'
def get_default_company(user=None):
'''Get default company for user'''
@@ -111,7 +109,7 @@ def get_region(company=None):
'''
if company or frappe.flags.company:
return frappe.get_cached_value('Company',
company or frappe.flags.company, 'country')
company or frappe.flags.company, 'country')
elif frappe.flags.country:
return frappe.flags.country
else:
@@ -134,10 +132,16 @@ def allow_regional(fn):
return caller
def get_last_membership(member):
def get_last_membership():
'''Returns last membership if exists'''
last_membership = frappe.get_all('Membership', 'name,to_date,membership_type',
dict(member=member, paid=1), order_by='to_date desc', limit=1)
dict(member=frappe.session.user, paid=1), order_by='to_date desc', limit=1)
if last_membership:
return last_membership[0]
return last_membership and last_membership[0]
def is_member():
'''Returns true if the user is still a member'''
last_membership = get_last_membership()
if last_membership and getdate(last_membership.to_date) > getdate():
return True
return False

View File

@@ -1,58 +0,0 @@
{
"cards": [
{
"card": "Total Outgoing Bills"
},
{
"card": "Total Incoming Bills"
},
{
"card": "Total Incoming Payment"
},
{
"card": "Total Outgoing Payment"
}
],
"charts": [
{
"chart": "Profit and Loss",
"width": "Full"
},
{
"chart": "Incoming Bills (Purchase Invoice)",
"width": "Half"
},
{
"chart": "Outgoing Bills (Sales Invoice)",
"width": "Half"
},
{
"chart": "Accounts Receivable Ageing",
"width": "Half"
},
{
"chart": "Accounts Payable Ageing",
"width": "Half"
},
{
"chart": "Budget Variance",
"width": "Full"
},
{
"chart": "Bank Balance",
"width": "Full"
}
],
"creation": "2020-07-17 11:25:34.796608",
"dashboard_name": "Accounts",
"docstatus": 0,
"doctype": "Dashboard",
"idx": 0,
"is_default": 0,
"is_standard": 1,
"modified": "2020-07-22 13:07:34.540574",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts",
"owner": "Administrator"
}

View File

@@ -1,126 +1,58 @@
{
"custom_fields": [
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2018-12-28 22:29:21.828090",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Address",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 15,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "fax",
"label": "Tax Category",
"length": 0,
"mandatory_depends_on": null,
"modified": "2018-12-28 22:29:21.828090",
"modified_by": "Administrator",
"name": "Address-tax_category",
"no_copy": 0,
"options": "Tax Category",
"owner": "Administrator",
"parent": null,
"parentfield": null,
"parenttype": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"translatable": 0,
"unique": 0,
"width": null
},
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2020-10-14 17:41:40.878179",
"default": "0",
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Address",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "is_your_company_address",
"fieldtype": "Check",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 20,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "linked_with",
"label": "Is Your Company Address",
"length": 0,
"mandatory_depends_on": null,
"modified": "2020-10-14 17:41:40.878179",
"modified_by": "Administrator",
"name": "Address-is_your_company_address",
"no_copy": 0,
"options": null,
"owner": "Administrator",
"parent": null,
"parentfield": null,
"parenttype": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"translatable": 0,
"unique": 0,
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2018-12-28 22:29:21.828090",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Address",
"fetch_from": null,
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"idx": 14,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"insert_after": "fax",
"label": "Tax Category",
"modified": "2018-12-28 22:29:21.828090",
"modified_by": "Administrator",
"name": "Address-tax_category",
"no_copy": 0,
"options": "Tax Category",
"owner": "Administrator",
"parent": null,
"parentfield": null,
"parenttype": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"translatable": 0,
"unique": 0,
"width": null
}
],
"custom_perms": [],
"doctype": "Address",
"property_setters": [],
],
"custom_perms": [],
"doctype": "Address",
"property_setters": [],
"sync_on_migrate": 1
}

View File

@@ -1,61 +0,0 @@
import frappe
from frappe import _
from frappe.contacts.doctype.address.address import (
Address,
get_address_display,
get_address_templates,
)
class ERPNextAddress(Address):
def validate(self):
self.validate_reference()
super(ERPNextAddress, self).validate()
def link_address(self):
"""Link address based on owner"""
if self.is_your_company_address:
return
return super(ERPNextAddress, self).link_address()
def validate_reference(self):
if self.is_your_company_address and not [
row for row in self.links if row.link_doctype == "Company"
]:
frappe.throw(_("Address needs to be linked to a Company. Please add a row for Company in the Links table."),
title=_("Company Not Linked"))
def on_update(self):
"""
After Address is updated, update the related 'Primary Address' on Customer.
"""
address_display = get_address_display(self.as_dict())
filters = {
"customer_primary_address": self.name
}
customers = frappe.db.get_all("Customer", filters=filters, as_list=True)
for customer_name in customers:
frappe.db.set_value("Customer", customer_name[0], "primary_address", address_display)
@frappe.whitelist()
def get_shipping_address(company, address = None):
filters = [
["Dynamic Link", "link_doctype", "=", "Company"],
["Dynamic Link", "link_name", "=", company],
["Address", "is_your_company_address", "=", 1]
]
fields = ["*"]
if address and frappe.db.get_value('Dynamic Link',
{'parent': address, 'link_name': company}):
filters.append(["Address", "name", "=", address])
if not address:
filters.append(["Address", "is_shipping_address", "=", 1])
address = frappe.get_all("Address", filters=filters, fields=fields) or {}
if address:
address_as_dict = address[0]
name, address_template = get_address_templates(address_as_dict)
return address_as_dict.get("name"), frappe.render_template(address_template, address_as_dict)

View File

@@ -1,23 +0,0 @@
{
"chart_name": "Accounts Payable Ageing",
"chart_type": "Report",
"creation": "2020-07-17 11:25:34.564015",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"report_date\":\"frappe.datetime.now_date()\"}",
"filters_json": "{\"ageing_based_on\":\"Due Date\",\"range1\":30,\"range2\":60,\"range3\":90,\"range4\":120,\"group_by_party\":0,\"based_on_payment_terms\":0}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2020-07-22 12:29:33.584419",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable Ageing",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Accounts Payable",
"timeseries": 0,
"type": "Donut",
"use_report_chart": 1,
"y_axis": []
}

View File

@@ -1,23 +0,0 @@
{
"chart_name": "Accounts Receivable Ageing",
"chart_type": "Report",
"creation": "2020-07-17 11:25:34.535388",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"report_date\":\"frappe.datetime.now_date()\"}",
"filters_json": "{\"ageing_based_on\":\"Due Date\",\"range1\":30,\"range2\":60,\"range3\":90,\"range4\":120,\"group_by_party\":0,\"based_on_payment_terms\":0,\"show_future_payments\":0,\"show_delivery_notes\":0,\"show_sales_person\":0}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2020-07-22 12:28:42.743551",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable Ageing",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Accounts Receivable",
"timeseries": 0,
"type": "Donut",
"use_report_chart": 1,
"y_axis": []
}

View File

@@ -1,26 +0,0 @@
{
"chart_name": "Bank Balance",
"chart_type": "Custom",
"creation": "2020-07-17 11:25:34.620221",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"account\":\"locals[\\\":Company\\\"][frappe.defaults.get_user_default(\\\"Company\\\")][\\\"default_bank_account\\\"]\"}",
"filters_json": "{}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-22 12:19:59.879476",
"modified": "2020-07-22 12:21:48.780513",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Balance",
"number_of_groups": 0,
"owner": "Administrator",
"source": "Account Balance Timeline",
"time_interval": "Quarterly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Line",
"use_report_chart": 0,
"y_axis": []
}

View File

@@ -1,23 +0,0 @@
{
"chart_name": "Budget Variance",
"chart_type": "Report",
"creation": "2020-07-17 11:25:34.593061",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
"filters_json": "{\"period\":\"Monthly\",\"budget_against\":\"Cost Center\",\"show_cumulative\":0}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2020-07-22 12:24:49.144210",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Variance",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Budget Variance Report",
"timeseries": 0,
"type": "Bar",
"use_report_chart": 1,
"y_axis": []
}

View File

@@ -1,29 +0,0 @@
{
"based_on": "posting_date",
"chart_name": "Incoming Bills (Purchase Invoice)",
"chart_type": "Sum",
"color": "#a83333",
"creation": "2020-07-17 11:25:34.479703",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Purchase Invoice",
"dynamic_filters_json": "",
"filters_json": "[[\"Purchase Invoice\",\"docstatus\",\"=\",1]]",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-21 17:37:30.727306",
"modified": "2020-07-21 17:51:07.374917",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Incoming Bills (Purchase Invoice)",
"number_of_groups": 0,
"owner": "Administrator",
"time_interval": "Monthly",
"timeseries": 1,
"timespan": "Last Year",
"type": "Bar",
"use_report_chart": 0,
"value_based_on": "base_net_total",
"y_axis": []
}

View File

@@ -1,28 +0,0 @@
{
"based_on": "posting_date",
"chart_name": "Outgoing Bills (Sales Invoice)",
"chart_type": "Sum",
"color": "#7b933d",
"creation": "2020-07-17 11:25:34.507547",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Sales Invoice",
"filters_json": "[[\"Sales Invoice\",\"docstatus\",\"=\",1]]",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-21 17:37:31.574666",
"modified": "2020-07-21 17:52:03.970530",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Outgoing Bills (Sales Invoice)",
"number_of_groups": 0,
"owner": "Administrator",
"time_interval": "Monthly",
"timeseries": 1,
"timespan": "Last Year",
"type": "Bar",
"use_report_chart": 0,
"value_based_on": "base_net_total",
"y_axis": []
}

View File

@@ -1,23 +0,0 @@
{
"chart_name": "Profit and Loss",
"chart_type": "Report",
"creation": "2020-07-17 11:25:34.448572",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
"filters_json": "{\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"periodicity\":\"Yearly\",\"include_default_book_entries\":1}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2020-07-22 12:33:48.888943",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Profit and Loss",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Profit and Loss Statement",
"timeseries": 0,
"type": "Bar",
"use_report_chart": 1,
"y_axis": []
}

View File

@@ -19,4 +19,4 @@ frappe.dashboards.chart_sources["Account Balance Timeline"] = {
reqd: 1
},
]
};
};

View File

@@ -2,19 +2,18 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe, json
from frappe import _
from frappe.utils import add_to_date, formatdate, get_link_to_form, getdate, nowdate
from frappe.utils.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
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.utils.nestedset import get_descendants_of
@frappe.whitelist()
@cache_source
def get(chart_name = None, chart = None, no_cache = None, filters = None, from_date = None,
to_date = None, timespan = None, time_interval = None, heatmap_year = None):
def get(chart_name = None, chart = None, no_cache = None, from_date = None, to_date = None):
if chart_name:
chart = frappe.get_doc('Dashboard Chart', chart_name)
else:
@@ -26,7 +25,7 @@ def get(chart_name = None, chart = None, no_cache = None, filters = None, from_d
to_date = chart.to_date
timegrain = chart.time_interval
filters = frappe.parse_json(filters) or frappe.parse_json(chart.filters_json)
filters = frappe.parse_json(chart.filters_json)
account = filters.get("account")
company = filters.get("company")

View File

@@ -2,26 +2,9 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.email import sendmail_to_system_managers
from frappe.utils import (
add_days,
add_months,
cint,
date_diff,
flt,
get_first_day,
get_last_day,
get_link_to_form,
getdate,
rounded,
today,
)
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_accounting_dimensions,
)
from frappe.utils import date_diff, add_months, today, getdate, add_days, flt, get_last_day
from erpnext.accounts.utils import get_account_currency
from frappe.email import sendmail_to_system_managers
def validate_service_stop_date(doc):
''' Validates service_stop_date for Purchase Invoice and Sales Invoice '''
@@ -47,22 +30,10 @@ def validate_service_stop_date(doc):
frappe.throw(_("Service Stop Date cannot be after Service End Date"))
if old_stop_dates and old_stop_dates.get(item.name) and item.service_stop_date!=old_stop_dates.get(item.name):
frappe.throw(_("Cannot change Service Stop Date for item in row {0}").format(item.idx))
frappe.throw(_("Cannot change Service Stop Date for item in row {0}".format(item.idx)))
def build_conditions(process_type, account, company):
conditions=''
deferred_account = "item.deferred_revenue_account" if process_type=="Income" else "item.deferred_expense_account"
if account:
conditions += "AND %s='%s'"%(deferred_account, account)
elif company:
conditions += f"AND p.company = {frappe.db.escape(company)}"
return conditions
def convert_deferred_expense_to_expense(deferred_process, start_date=None, end_date=None, conditions=''):
def convert_deferred_expense_to_expense(start_date=None, end_date=None):
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
if not start_date:
start_date = add_months(today(), -1)
if not end_date:
@@ -70,25 +41,18 @@ def convert_deferred_expense_to_expense(deferred_process, start_date=None, end_d
# check for the purchase invoice for which GL entries has to be done
invoices = frappe.db.sql_list('''
select distinct item.parent
from `tabPurchase Invoice Item` item, `tabPurchase Invoice` p
where item.service_start_date<=%s and item.service_end_date>=%s
and item.enable_deferred_expense = 1 and item.parent=p.name
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
{0}
'''.format(conditions), (end_date, start_date)) #nosec
select distinct parent from `tabPurchase Invoice Item`
where service_start_date<=%s and service_end_date>=%s
and enable_deferred_expense = 1 and docstatus = 1 and ifnull(amount, 0) > 0
''', (end_date, start_date))
# For each invoice, book deferred expense
for invoice in invoices:
doc = frappe.get_doc("Purchase Invoice", invoice)
book_deferred_income_or_expense(doc, deferred_process, end_date)
book_deferred_income_or_expense(doc, end_date)
if frappe.flags.deferred_accounting_error:
send_mail(deferred_process)
def convert_deferred_revenue_to_income(deferred_process, start_date=None, end_date=None, conditions=''):
def convert_deferred_revenue_to_income(start_date=None, end_date=None):
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
if not start_date:
start_date = add_months(today(), -1)
if not end_date:
@@ -96,20 +60,14 @@ def convert_deferred_revenue_to_income(deferred_process, start_date=None, end_da
# check for the sales invoice for which GL entries has to be done
invoices = frappe.db.sql_list('''
select distinct item.parent
from `tabSales Invoice Item` item, `tabSales Invoice` p
where item.service_start_date<=%s and item.service_end_date>=%s
and item.enable_deferred_revenue = 1 and item.parent=p.name
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
{0}
'''.format(conditions), (end_date, start_date)) #nosec
select distinct parent from `tabSales Invoice Item`
where service_start_date<=%s and service_end_date>=%s
and enable_deferred_revenue = 1 and docstatus = 1 and ifnull(amount, 0) > 0
''', (end_date, start_date))
for invoice in invoices:
doc = frappe.get_doc("Sales Invoice", invoice)
book_deferred_income_or_expense(doc, deferred_process, end_date)
if frappe.flags.deferred_accounting_error:
send_mail(deferred_process)
book_deferred_income_or_expense(doc, end_date)
def get_booking_dates(doc, item, posting_date=None):
if not posting_date:
@@ -125,18 +83,6 @@ def get_booking_dates(doc, item, posting_date=None):
order by posting_date desc limit 1
''', (doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True)
prev_gl_via_je = frappe.db.sql('''
SELECT p.name, p.posting_date FROM `tabJournal Entry` p, `tabJournal Entry Account` c
WHERE p.name = c.parent and p.company=%s and c.account=%s
and c.reference_type=%s and c.reference_name=%s
and c.reference_detail_no=%s and c.docstatus < 2 order by posting_date desc limit 1
''', (doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True)
if prev_gl_via_je:
if (not prev_gl_entry) or (prev_gl_entry and
prev_gl_entry[0].posting_date < prev_gl_via_je[0].posting_date):
prev_gl_entry = prev_gl_via_je
if prev_gl_entry:
start_date = getdate(add_days(prev_gl_entry[0].posting_date, 1))
else:
@@ -158,48 +104,14 @@ def get_booking_dates(doc, item, posting_date=None):
else:
return None, None, None
def calculate_monthly_amount(doc, item, last_gl_entry, start_date, end_date, total_days, total_booking_days, account_currency):
amount, base_amount = 0, 0
if not last_gl_entry:
total_months = (item.service_end_date.year - item.service_start_date.year) * 12 + \
(item.service_end_date.month - item.service_start_date.month) + 1
prorate_factor = flt(date_diff(item.service_end_date, item.service_start_date)) \
/ flt(date_diff(get_last_day(item.service_end_date), get_first_day(item.service_start_date)))
actual_months = rounded(total_months * prorate_factor, 1)
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(doc, item)
base_amount = flt(item.base_net_amount / actual_months, item.precision("base_net_amount"))
if base_amount + already_booked_amount > item.base_net_amount:
base_amount = item.base_net_amount - already_booked_amount
if account_currency==doc.company_currency:
amount = base_amount
else:
amount = flt(item.net_amount/actual_months, item.precision("net_amount"))
if amount + already_booked_amount_in_account_currency > item.net_amount:
amount = item.net_amount - already_booked_amount_in_account_currency
if not (get_first_day(start_date) == start_date and get_last_day(end_date) == end_date):
partial_month = flt(date_diff(end_date, start_date)) \
/ flt(date_diff(get_last_day(end_date), get_first_day(start_date)))
base_amount = rounded(partial_month, 1) * base_amount
amount = rounded(partial_month, 1) * amount
else:
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(doc, item)
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
if account_currency==doc.company_currency:
amount = base_amount
else:
amount = flt(item.net_amount - already_booked_amount_in_account_currency, item.precision("net_amount"))
return amount, base_amount
def calculate_amount(doc, item, last_gl_entry, total_days, total_booking_days, account_currency):
if doc.doctype == "Sales Invoice":
total_credit_debit, total_credit_debit_currency = "debit", "debit_in_account_currency"
deferred_account = "deferred_revenue_account"
else:
total_credit_debit, total_credit_debit_currency = "credit", "credit_in_account_currency"
deferred_account = "deferred_expense_account"
amount, base_amount = 0, 0
if not last_gl_entry:
base_amount = flt(item.base_net_amount*total_booking_days/flt(total_days), item.precision("base_net_amount"))
@@ -208,55 +120,27 @@ def calculate_amount(doc, item, last_gl_entry, total_days, total_booking_days, a
else:
amount = flt(item.net_amount*total_booking_days/flt(total_days), item.precision("net_amount"))
else:
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(doc, item)
gl_entries_details = frappe.db.sql('''
select sum({0}) as total_credit, sum({1}) as total_credit_in_account_currency, voucher_detail_no
from `tabGL Entry` where company=%s and account=%s and voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
group by voucher_detail_no
'''.format(total_credit_debit, total_credit_debit_currency),
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True)
already_booked_amount = gl_entries_details[0].total_credit if gl_entries_details else 0
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
if account_currency==doc.company_currency:
amount = base_amount
else:
already_booked_amount_in_account_currency = gl_entries_details[0].total_credit_in_account_currency if gl_entries_details else 0
amount = flt(item.net_amount - already_booked_amount_in_account_currency, item.precision("net_amount"))
return amount, base_amount
def get_already_booked_amount(doc, item):
if doc.doctype == "Sales Invoice":
total_credit_debit, total_credit_debit_currency = "debit", "debit_in_account_currency"
deferred_account = "deferred_revenue_account"
else:
total_credit_debit, total_credit_debit_currency = "credit", "credit_in_account_currency"
deferred_account = "deferred_expense_account"
gl_entries_details = frappe.db.sql('''
select sum({0}) as total_credit, sum({1}) as total_credit_in_account_currency, voucher_detail_no
from `tabGL Entry` where company=%s and account=%s and voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
group by voucher_detail_no
'''.format(total_credit_debit, total_credit_debit_currency),
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True)
journal_entry_details = frappe.db.sql('''
SELECT sum(c.{0}) as total_credit, sum(c.{1}) as total_credit_in_account_currency, reference_detail_no
FROM `tabJournal Entry` p , `tabJournal Entry Account` c WHERE p.name = c.parent and
p.company = %s and c.account=%s and c.reference_type=%s and c.reference_name=%s and c.reference_detail_no=%s
and p.docstatus < 2 group by reference_detail_no
'''.format(total_credit_debit, total_credit_debit_currency),
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True)
already_booked_amount = gl_entries_details[0].total_credit if gl_entries_details else 0
already_booked_amount += journal_entry_details[0].total_credit if journal_entry_details else 0
if doc.currency == doc.company_currency:
already_booked_amount_in_account_currency = already_booked_amount
else:
already_booked_amount_in_account_currency = gl_entries_details[0].total_credit_in_account_currency if gl_entries_details else 0
already_booked_amount_in_account_currency += journal_entry_details[0].total_credit_in_account_currency if journal_entry_details else 0
return already_booked_amount, already_booked_amount_in_account_currency
def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
def book_deferred_income_or_expense(doc, posting_date=None):
enable_check = "enable_deferred_revenue" \
if doc.doctype=="Sales Invoice" else "enable_deferred_expense"
def _book_deferred_revenue_or_expense(item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on):
def _book_deferred_revenue_or_expense(item):
start_date, end_date, last_gl_entry = get_booking_dates(doc, item, posting_date=posting_date)
if not (start_date and end_date): return
@@ -271,69 +155,22 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
total_days = date_diff(item.service_end_date, item.service_start_date) + 1
total_booking_days = date_diff(end_date, start_date) + 1
if book_deferred_entries_based_on == 'Months':
amount, base_amount = calculate_monthly_amount(doc, item, last_gl_entry,
start_date, end_date, total_days, total_booking_days, account_currency)
else:
amount, base_amount = calculate_amount(doc, item, last_gl_entry,
total_days, total_booking_days, account_currency)
amount, base_amount = calculate_amount(doc, item, last_gl_entry,
total_days, total_booking_days, account_currency)
if not amount:
return
if via_journal_entry:
book_revenue_via_journal_entry(doc, credit_account, debit_account, against, amount,
base_amount, end_date, project, account_currency, item.cost_center, item, deferred_process, submit_journal_entry)
else:
make_gl_entries(doc, credit_account, debit_account, against,
amount, base_amount, end_date, project, account_currency, item.cost_center, item, deferred_process)
# Returned in case of any errors because it tries to submit the same record again and again in case of errors
if frappe.flags.deferred_accounting_error:
return
make_gl_entries(doc, credit_account, debit_account, against,
amount, base_amount, end_date, project, account_currency, item.cost_center, item.name)
if getdate(end_date) < getdate(posting_date) and not last_gl_entry:
_book_deferred_revenue_or_expense(item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on)
_book_deferred_revenue_or_expense(item)
via_journal_entry = cint(frappe.db.get_singles_value('Accounts Settings', 'book_deferred_entries_via_journal_entry'))
submit_journal_entry = cint(frappe.db.get_singles_value('Accounts Settings', 'submit_journal_entries'))
book_deferred_entries_based_on = frappe.db.get_singles_value('Accounts Settings', 'book_deferred_entries_based_on')
for item in doc.get('items'):
if item.get(enable_check):
_book_deferred_revenue_or_expense(item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on)
def process_deferred_accounting(posting_date=None):
''' Converts deferred income/expense into income/expense
Executed via background jobs on every month end '''
if not posting_date:
posting_date = today()
if not cint(frappe.db.get_singles_value('Accounts Settings', 'automatically_process_deferred_accounting_entry')):
return
start_date = add_months(today(), -1)
end_date = add_days(today(), -1)
companies = frappe.get_all('Company')
for company in companies:
for record_type in ('Income', 'Expense'):
doc = frappe.get_doc(dict(
doctype='Process Deferred Accounting',
company=company.name,
posting_date=posting_date,
start_date=start_date,
end_date=end_date,
type=record_type
))
doc.insert()
doc.submit()
_book_deferred_revenue_or_expense(item)
def make_gl_entries(doc, credit_account, debit_account, against,
amount, base_amount, posting_date, project, account_currency, cost_center, item, deferred_process=None):
amount, base_amount, posting_date, project, account_currency, cost_center, voucher_detail_no):
# GL Entry for crediting the amount in the deferred expense
from erpnext.accounts.general_ledger import make_gl_entries
@@ -347,12 +184,10 @@ def make_gl_entries(doc, credit_account, debit_account, against,
"credit": base_amount,
"credit_in_account_currency": amount,
"cost_center": cost_center,
"voucher_detail_no": item.name,
"voucher_detail_no": voucher_detail_no,
'posting_date': posting_date,
'project': project,
'against_voucher_type': 'Process Deferred Accounting',
'against_voucher': deferred_process
}, account_currency, item=item)
'project': project
}, account_currency)
)
# GL Entry to debit the amount from the expense
gl_entries.append(
@@ -362,109 +197,19 @@ def make_gl_entries(doc, credit_account, debit_account, against,
"debit": base_amount,
"debit_in_account_currency": amount,
"cost_center": cost_center,
"voucher_detail_no": item.name,
"voucher_detail_no": voucher_detail_no,
'posting_date': posting_date,
'project': project,
'against_voucher_type': 'Process Deferred Accounting',
'against_voucher': deferred_process
}, account_currency, item=item)
'project': project
}, account_currency)
)
if gl_entries:
try:
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
frappe.db.commit()
except Exception as e:
if frappe.flags.in_test:
raise e
else:
frappe.db.rollback()
traceback = frappe.get_traceback()
frappe.log_error(message=traceback)
frappe.flags.deferred_accounting_error = True
def send_mail(deferred_process):
title = _("Error while processing deferred accounting for {0}").format(deferred_process)
link = get_link_to_form('Process Deferred Accounting', deferred_process)
content = _("Deferred accounting failed for some invoices:") + "\n"
content += _("Please check Process Deferred Accounting {0} and submit manually after resolving errors.").format(link)
sendmail_to_system_managers(title, content)
def book_revenue_via_journal_entry(doc, credit_account, debit_account, against,
amount, base_amount, posting_date, project, account_currency, cost_center, item,
deferred_process=None, submit='No'):
if amount == 0: return
journal_entry = frappe.new_doc('Journal Entry')
journal_entry.posting_date = posting_date
journal_entry.company = doc.company
journal_entry.voucher_type = 'Deferred Revenue' if doc.doctype == 'Sales Invoice' \
else 'Deferred Expense'
debit_entry = {
'account': credit_account,
'credit': base_amount,
'credit_in_account_currency': amount,
'party_type': 'Customer' if doc.doctype == 'Sales Invoice' else 'Supplier',
'party': against,
'account_currency': account_currency,
'reference_name': doc.name,
'reference_type': doc.doctype,
'reference_detail_no': item.name,
'cost_center': cost_center,
'project': project,
}
credit_entry = {
'account': debit_account,
'debit': base_amount,
'debit_in_account_currency': amount,
'party_type': 'Customer' if doc.doctype == 'Sales Invoice' else 'Supplier',
'party': against,
'account_currency': account_currency,
'reference_name': doc.name,
'reference_type': doc.doctype,
'reference_detail_no': item.name,
'cost_center': cost_center,
'project': project,
}
for dimension in get_accounting_dimensions():
debit_entry.update({
dimension: item.get(dimension)
})
credit_entry.update({
dimension: item.get(dimension)
})
journal_entry.append('accounts', debit_entry)
journal_entry.append('accounts', credit_entry)
try:
journal_entry.save()
if submit:
journal_entry.submit()
except Exception:
frappe.db.rollback()
traceback = frappe.get_traceback()
frappe.log_error(message=traceback)
frappe.flags.deferred_accounting_error = True
def get_deferred_booking_accounts(doctype, voucher_detail_no, dr_or_cr):
if doctype == 'Sales Invoice':
credit_account, debit_account = frappe.db.get_value('Sales Invoice Item', {'name': voucher_detail_no},
['income_account', 'deferred_revenue_account'])
else:
credit_account, debit_account = frappe.db.get_value('Purchase Invoice Item', {'name': voucher_detail_no},
['deferred_expense_account', 'expense_account'])
if dr_or_cr == 'Debit':
return debit_account
else:
return credit_account
except:
frappe.db.rollback()
title = _("Error while processing deferred accounting for {0}").format(doc.name)
traceback = frappe.get_traceback()
frappe.log_error(message=traceback , title=title)
sendmail_to_system_managers(title, traceback)

View File

@@ -74,7 +74,7 @@ frappe.ui.form.on('Account', {
});
} else if (cint(frm.doc.is_group) == 0
&& frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
frm.add_custom_button(__('Ledger'), function () {
cur_frm.add_custom_button(__('Ledger'), function () {
frappe.route_options = {
"account": frm.doc.name,
"from_date": frappe.sys_defaults.year_start_date,

View File

@@ -34,15 +34,11 @@
{
"fieldname": "properties",
"fieldtype": "Section Break",
"oldfieldtype": "Section Break",
"show_days": 1,
"show_seconds": 1
"oldfieldtype": "Section Break"
},
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1,
"width": "50%"
},
{
@@ -53,9 +49,7 @@
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
"reqd": 1
},
{
"fieldname": "account_number",
@@ -63,17 +57,13 @@
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Account Number",
"read_only": 1,
"show_days": 1,
"show_seconds": 1
"read_only": 1
},
{
"default": "0",
"fieldname": "is_group",
"fieldtype": "Check",
"label": "Is Group",
"show_days": 1,
"show_seconds": 1
"label": "Is Group"
},
{
"fieldname": "company",
@@ -85,9 +75,7 @@
"options": "Company",
"read_only": 1,
"remember_last_selected_value": 1,
"reqd": 1,
"show_days": 1,
"show_seconds": 1
"reqd": 1
},
{
"fieldname": "root_type",
@@ -95,9 +83,7 @@
"in_standard_filter": 1,
"label": "Root Type",
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
"read_only": 1,
"show_days": 1,
"show_seconds": 1
"read_only": 1
},
{
"fieldname": "report_type",
@@ -105,32 +91,24 @@
"in_standard_filter": 1,
"label": "Report Type",
"options": "\nBalance Sheet\nProfit and Loss",
"read_only": 1,
"show_days": 1,
"show_seconds": 1
"read_only": 1
},
{
"depends_on": "eval:doc.is_group==0",
"fieldname": "account_currency",
"fieldtype": "Link",
"label": "Currency",
"options": "Currency",
"show_days": 1,
"show_seconds": 1
"options": "Currency"
},
{
"default": "0",
"fieldname": "inter_company_account",
"fieldtype": "Check",
"label": "Inter Company Account",
"show_days": 1,
"show_seconds": 1
"label": "Inter Company Account"
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1,
"width": "50%"
},
{
@@ -142,9 +120,7 @@
"oldfieldtype": "Link",
"options": "Account",
"reqd": 1,
"search_index": 1,
"show_days": 1,
"show_seconds": 1
"search_index": 1
},
{
"description": "Setting Account Type helps in selecting this Account in transactions.",
@@ -154,9 +130,7 @@
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nDepreciation\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary",
"show_days": 1,
"show_seconds": 1
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nDepreciation\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nTax\nTemporary"
},
{
"description": "Rate at which this tax is applied",
@@ -164,9 +138,7 @@
"fieldtype": "Float",
"label": "Rate",
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency",
"show_days": 1,
"show_seconds": 1
"oldfieldtype": "Currency"
},
{
"description": "If the account is frozen, entries are allowed to restricted users.",
@@ -175,17 +147,13 @@
"label": "Frozen",
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
"options": "No\nYes",
"show_days": 1,
"show_seconds": 1
"options": "No\nYes"
},
{
"fieldname": "balance_must_be",
"fieldtype": "Select",
"label": "Balance must be",
"options": "\nDebit\nCredit",
"show_days": 1,
"show_seconds": 1
"options": "\nDebit\nCredit"
},
{
"fieldname": "lft",
@@ -194,9 +162,7 @@
"label": "Lft",
"print_hide": 1,
"read_only": 1,
"search_index": 1,
"show_days": 1,
"show_seconds": 1
"search_index": 1
},
{
"fieldname": "rgt",
@@ -205,9 +171,7 @@
"label": "Rgt",
"print_hide": 1,
"read_only": 1,
"search_index": 1,
"show_days": 1,
"show_seconds": 1
"search_index": 1
},
{
"fieldname": "old_parent",
@@ -215,33 +179,27 @@
"hidden": 1,
"label": "Old Parent",
"print_hide": 1,
"read_only": 1,
"show_days": 1,
"show_seconds": 1
"read_only": 1
},
{
"default": "0",
"depends_on": "eval:(doc.report_type == 'Profit and Loss' && !doc.is_group)",
"fieldname": "include_in_gross",
"fieldtype": "Check",
"label": "Include in gross",
"show_days": 1,
"show_seconds": 1
"label": "Include in gross"
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disable",
"show_days": 1,
"show_seconds": 1
"label": "Disable"
}
],
"icon": "fa fa-money",
"idx": 1,
"is_tree": 1,
"links": [],
"modified": "2020-06-11 15:15:54.338622",
"modified": "2020-03-18 18:26:03.992861",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",

View File

@@ -2,22 +2,18 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.utils import cint, cstr
from frappe import throw, _
from frappe.utils.nestedset import NestedSet, get_ancestors_of, get_descendants_of
import erpnext
class RootNotEditable(frappe.ValidationError): pass
class BalanceMismatchError(frappe.ValidationError): pass
class Account(NestedSet):
nsm_parent_field = 'parent_account'
def on_update(self):
if frappe.local.flags.ignore_update_nsm:
if frappe.local.flags.ignore_on_update:
return
else:
super(Account, self).on_update()
@@ -93,7 +89,7 @@ class Account(NestedSet):
throw(_("Root cannot be edited."), RootNotEditable)
if not self.parent_account and not self.is_group:
frappe.throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
frappe.throw(_("Root Account must be a group"))
def validate_root_company_and_sync_account_to_children(self):
# ignore validation while creating new compnay or while syncing to child companies
@@ -105,7 +101,7 @@ class Account(NestedSet):
return
if not frappe.db.get_value("Account",
{'account_name': self.account_name, 'company': ancestors[0]}, 'name'):
frappe.throw(_("Please add the account to root level Company - {}").format(ancestors[0]))
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
elif self.parent_account:
descendants = get_descendants_of('Company', self.company)
if not descendants: return
@@ -121,9 +117,7 @@ class Account(NestedSet):
for d in frappe.db.get_values('Account', filters=filters, fieldname=["company", "name"], as_dict=True):
parent_acc_name_map[d["company"]] = d["name"]
if not parent_acc_name_map: return
self.create_account_for_child_company(parent_acc_name_map, descendants, parent_acc_name)
def validate_group_or_ledger(self):
@@ -168,19 +162,9 @@ class Account(NestedSet):
def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name):
for company in descendants:
company_bold = frappe.bold(company)
parent_acc_name_bold = frappe.bold(parent_acc_name)
if not parent_acc_name_map.get(company):
frappe.throw(_("While creating account for Child Company {0}, parent account {1} not found. Please create the parent account in corresponding COA")
.format(company_bold, parent_acc_name_bold), title=_("Account Not Found"))
# validate if parent of child company account to be added is a group
if (frappe.db.get_value("Account", self.parent_account, "is_group")
and not frappe.db.get_value("Account", parent_acc_name_map[company], "is_group")):
msg = _("While creating account for Child Company {0}, parent account {1} found as a ledger account.").format(company_bold, parent_acc_name_bold)
msg += "<br><br>"
msg += _("Please convert the parent account in corresponding child company to a group account.")
frappe.throw(msg, title=_("Invalid Parent Account"))
frappe.throw(_("While creating account for child Company {0}, parent account {1} not found. Please create the parent account in corresponding COA")
.format(company, parent_acc_name))
filters = {
"account_name": self.account_name,
@@ -198,7 +182,7 @@ class Account(NestedSet):
"company": company,
# parent account's currency should be passed down to child account's curreny
# if it is None, it picks it up from default company currency, which might be unintended
"account_currency": erpnext.get_company_currency(company),
"account_currency": self.account_currency,
"parent_account": parent_acc_name_map[company]
})
@@ -209,7 +193,8 @@ class Account(NestedSet):
# update the parent company's value in child companies
doc = frappe.get_doc("Account", child_account)
parent_value_changed = False
for field in ['account_type', 'freeze_account', 'balance_must_be']:
for field in ['account_type', 'account_currency',
'freeze_account', 'balance_must_be']:
if doc.get(field) != self.get(field):
parent_value_changed = True
doc.set(field, self.get(field))
@@ -217,7 +202,6 @@ class Account(NestedSet):
if parent_value_changed:
doc.save()
@frappe.whitelist()
def convert_group_to_ledger(self):
if self.check_if_child_exists():
throw(_("Account with child nodes cannot be converted to ledger"))
@@ -228,12 +212,11 @@ class Account(NestedSet):
self.save()
return 1
@frappe.whitelist()
def convert_ledger_to_group(self):
if self.check_gle_exists():
throw(_("Account with existing transaction can not be converted to group."))
elif self.account_type and not self.flags.exclude_account_type_check:
throw(_("Cannot convert to Group because Account Type is selected."))
throw(_("Cannot covert to Group because Account Type is selected."))
else:
self.is_group = 1
self.save()
@@ -261,8 +244,6 @@ class Account(NestedSet):
super(Account, self).on_trash(True)
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select name from tabAccount
where is_group = 1 and docstatus != 2 and company = %s
@@ -306,31 +287,10 @@ def validate_account_number(name, account_number, company):
.format(account_number, account_with_same_number))
@frappe.whitelist()
def update_account_number(name, account_name, account_number=None, from_descendant=False):
def update_account_number(name, account_name, account_number=None):
account = frappe.db.get_value("Account", name, "company", as_dict=True)
if not account: return
old_acc_name, old_acc_number = frappe.db.get_value('Account', name, \
["account_name", "account_number"])
# check if account exists in parent company
ancestors = get_ancestors_of("Company", account.company)
allow_independent_account_creation = frappe.get_value("Company", account.company, "allow_account_creation_against_child_company")
if ancestors and not allow_independent_account_creation:
for ancestor in ancestors:
if frappe.db.get_value("Account", {'account_name': old_acc_name, 'company': ancestor}, 'name'):
# same account in parent company exists
allow_child_account_creation = _("Allow Account Creation Against Child Company")
message = _("Account {0} exists in parent company {1}.").format(frappe.bold(old_acc_name), frappe.bold(ancestor))
message += "<br>"
message += _("Renaming it is only allowed via parent company {0}, to avoid mismatch.").format(frappe.bold(ancestor))
message += "<br><br>"
message += _("To overrule this, enable '{0}' in company {1}").format(allow_child_account_creation, frappe.bold(account.company))
frappe.throw(message, title=_("Rename Not Allowed"))
validate_account_number(name, account_number, account.company)
if account_number:
frappe.db.set_value("Account", name, "account_number", account_number.strip())
@@ -338,12 +298,6 @@ def update_account_number(name, account_name, account_number=None, from_descenda
frappe.db.set_value("Account", name, "account_number", "")
frappe.db.set_value("Account", name, "account_name", account_name.strip())
if not from_descendant:
# Update and rename in child company accounts as well
descendants = get_descendants_of('Company', account.company)
if descendants:
sync_update_account_number_in_child(descendants, old_acc_name, account_name, account_number, old_acc_number)
new_name = get_account_autoname(account_number, account_name, account.company)
if name != new_name:
frappe.rename_doc("Account", name, new_name, force=1)
@@ -374,14 +328,3 @@ def get_root_company(company):
# return the topmost company in the hierarchy
ancestors = get_ancestors_of('Company', company, "lft asc")
return [ancestors[0]] if ancestors else []
def sync_update_account_number_in_child(descendants, old_acc_name, account_name, account_number=None, old_acc_number=None):
filters = {
"company": ["in", descendants],
"account_name": old_acc_name,
}
if old_acc_number:
filters["account_number"] = old_acc_number
for d in frappe.db.get_values('Account', filters=filters, fieldname=["company", "name"], as_dict=True):
update_account_number(d["name"], account_name, account_number, from_descendant=True)

View File

@@ -2,7 +2,7 @@ frappe.provide("frappe.treeview_settings")
frappe.treeview_settings["Account"] = {
breadcrumb: "Accounts",
title: __("Chart of Accounts"),
title: __("Chart Of Accounts"),
get_tree_root: false,
filters: [
{
@@ -14,9 +14,6 @@ frappe.treeview_settings["Account"] = {
on_change: function() {
var me = frappe.treeview_settings['Account'].treeview;
var company = me.page.fields_dict.company.get_value();
if (!company) {
frappe.throw(__("Please set a Company"));
}
frappe.call({
method: "erpnext.accounts.doctype.account.account.get_root_company",
args: {
@@ -45,49 +42,6 @@ frappe.treeview_settings["Account"] = {
],
root_label: "Accounts",
get_tree_nodes: 'erpnext.accounts.utils.get_children',
on_get_node: function(nodes, deep=false) {
if (frappe.boot.user.can_read.indexOf("GL Entry") == -1) return;
let accounts = [];
if (deep) {
// in case of `get_all_nodes`
accounts = nodes.reduce((acc, node) => [...acc, ...node.data], []);
} else {
accounts = nodes;
}
const get_balances = frappe.call({
method: 'erpnext.accounts.utils.get_account_balances',
args: {
accounts: accounts,
company: cur_tree.args.company
},
});
get_balances.then(r => {
if (!r.message || r.message.length == 0) return;
for (let account of r.message) {
const node = cur_tree.nodes && cur_tree.nodes[account.value];
if (!node || node.is_root) continue;
// show Dr if positive since balance is calculated as debit - credit else show Cr
const balance = account.balance_in_account_currency || account.balance;
const dr_or_cr = balance > 0 ? "Dr": "Cr";
const format = (value, currency) => format_currency(Math.abs(value), currency);
if (account.balance!==undefined) {
$('<span class="balance-area pull-right">'
+ (account.balance_in_account_currency ?
(format(account.balance_in_account_currency, account.account_currency) + " / ") : "")
+ format(account.balance, account.company_currency)
+ " " + dr_or_cr
+ '</span>').insertBefore(node.$ul);
}
}
});
},
add_tree_node: 'erpnext.accounts.utils.add_ac',
menu_items:[
{
@@ -140,7 +94,7 @@ frappe.treeview_settings["Account"] = {
treeview.page.add_inner_button(__("Journal Entry"), function() {
frappe.new_doc('Journal Entry', {company: get_company()});
}, __('Create'));
treeview.page.add_inner_button(__("Company"), function() {
treeview.page.add_inner_button(__("New Company"), function() {
frappe.new_doc('Company');
}, __('Create'));
@@ -163,7 +117,25 @@ frappe.treeview_settings["Account"] = {
} else {
treeview.new_node();
}
}, "add");
}, "octicon octicon-plus");
},
onrender: function(node) {
if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){
// show Dr if positive since balance is calculated as debit - credit else show Cr
let balance = node.data.balance_in_account_currency || node.data.balance;
let dr_or_cr = balance > 0 ? "Dr": "Cr";
if (node.data && node.data.balance!==undefined) {
$('<span class="balance-area pull-right text-muted small">'
+ (node.data.balance_in_account_currency ?
(format_currency(Math.abs(node.data.balance_in_account_currency),
node.data.account_currency) + " / ") : "")
+ format_currency(Math.abs(node.data.balance), node.data.company_currency)
+ " " + dr_or_cr
+ '</span>').insertBefore(node.$ul);
}
}
},
toolbar: [
{

View File

@@ -2,17 +2,14 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import json
import os
import frappe
import frappe, os, json
from frappe.utils import cstr
from frappe.utils.nestedset import rebuild_tree
from six import iteritems
from unidecode import unidecode
from six import iteritems
from frappe.utils.nestedset import rebuild_tree
def create_charts(company, chart_template=None, existing_company=None, custom_chart=None, from_coa_importer=None):
def create_charts(company, chart_template=None, existing_company=None, custom_chart=None):
chart = custom_chart or get_chart(chart_template, existing_company)
if chart:
accounts = []
@@ -22,7 +19,7 @@ def create_charts(company, chart_template=None, existing_company=None, custom_ch
if root_account:
root_type = child.get("root_type")
if account_name not in ["account_name", "account_number", "account_type",
if account_name not in ["account_number", "account_type",
"root_type", "is_group", "tax_rate"]:
account_number = cstr(child.get("account_number")).strip()
@@ -35,7 +32,7 @@ def create_charts(company, chart_template=None, existing_company=None, custom_ch
account = frappe.get_doc({
"doctype": "Account",
"account_name": child.get('account_name') if from_coa_importer else account_name,
"account_name": account_name,
"company": company,
"parent_account": parent,
"is_group": is_group,
@@ -60,10 +57,10 @@ def create_charts(company, chart_template=None, existing_company=None, custom_ch
# Rebuild NestedSet HSM tree for Account Doctype
# after all accounts are already inserted.
frappe.local.flags.ignore_update_nsm = True
frappe.local.flags.ignore_on_update = True
_import_accounts(chart, None, None, root_account=True)
rebuild_tree("Account", "parent_account")
frappe.local.flags.ignore_update_nsm = False
frappe.local.flags.ignore_on_update = False
def add_suffix_if_duplicate(account_name, account_number, accounts):
if account_number:
@@ -94,14 +91,11 @@ def get_chart(chart_template, existing_company=None):
return get_account_tree_from_existing_company(existing_company)
elif chart_template == "Standard":
from erpnext.accounts.doctype.account.chart_of_accounts.verified import (
standard_chart_of_accounts,
)
from erpnext.accounts.doctype.account.chart_of_accounts.verified import standard_chart_of_accounts
return standard_chart_of_accounts.get()
elif chart_template == "Standard with Numbers":
from erpnext.accounts.doctype.account.chart_of_accounts.verified import (
standard_chart_of_accounts_with_account_number,
)
from erpnext.accounts.doctype.account.chart_of_accounts.verified \
import standard_chart_of_accounts_with_account_number
return standard_chart_of_accounts_with_account_number.get()
else:
folders = ("verified",)
@@ -213,7 +207,7 @@ def validate_bank_account(coa, bank_account):
return (bank_account in accounts)
@frappe.whitelist()
def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=False):
def build_tree_from_json(chart_template, chart_data=None):
''' get chart template from its folder and parse the json to be rendered as tree '''
chart = chart_data or get_chart(chart_template)
@@ -226,15 +220,12 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals
''' recursively called to form a parent-child based list of dict from chart template '''
for account_name, child in iteritems(children):
account = {}
if account_name in ["account_name", "account_number", "account_type",\
if account_name in ["account_number", "account_type",\
"root_type", "is_group", "tax_rate"]: continue
if from_coa_importer:
account_name = child['account_name']
account['parent_account'] = parent
account['expandable'] = True if identify_is_group(child) else False
account['value'] = (cstr(child.get('account_number')).strip() + ' - ' + account_name) \
account['value'] = (child.get('account_number') + ' - ' + account_name) \
if child.get('account_number') else account_name
accounts.append(account)
_import_accounts(child, account['value'])

View File

@@ -6,13 +6,12 @@ Import chart of accounts from OpenERP sources
"""
from __future__ import print_function, unicode_literals
import os, json
import ast
import json
import os
from xml.etree import ElementTree as ET
import frappe
from frappe.utils.csvutils import read_csv_content
import frappe
from six import iteritems
path = "/Users/nabinhait/projects/odoo/addons"

View File

@@ -1,466 +1,465 @@
{
"country_code": "ae",
"name": "U.A.E - Chart of Accounts",
"country_code": "ae",
"name": "U.A.E - Chart of Accounts",
"tree": {
"Assets": {
"Current Assets": {
"Accounts Receivable": {
"Corporate Credit Cards": {
"account_type": "Receivable"
},
},
"Other Receivable": {
"Accrued Rebates Due from Suppliers": {
"account_type": "Receivable"
},
},
"Accrued Income from Suppliers": {
"account_type": "Receivable"
},
},
"Other Debtors": {
"account_type": "Receivable"
},
},
"account_type": "Receivable"
},
},
"Post Dated Cheques Received": {
"account_type": "Receivable"
},
},
"Staff Receivable": {
"account_type": "Receivable"
},
},
"Trade Receivable": {
"account_type": "Receivable"
},
},
"Trade in Opening Fees": {
"account_type": "Receivable"
},
},
"account_type": "Receivable"
},
},
"Cash in Hand & Banks": {
"Banks": {
"Bank Margin On LC & LG": {},
"Banks Blocked Deposits": {},
"Banks Call Deposit Accounts": {},
"Bank Margin On LC & LG": {},
"Banks Blocked Deposits": {},
"Banks Call Deposit Accounts": {},
"Banks Current Accounts": {
"account_type": "Bank"
},
},
"account_type": "Bank"
},
},
"Cash in Hand": {
"Cash in Safe": {
"Main Safe": {
"account_type": "Cash"
},
},
"Main Safe - Foreign Currency": {
"account_type": "Cash"
}
},
},
"Petty Cash": {
"Petty Cash - Administration": {
"account_type": "Cash"
},
},
"Petty Cash - Others": {
"account_type": "Cash"
}
},
},
"account_type": "Cash"
},
},
"Cash in Transit": {
"Credit Cards": {
"Gateway Credit Cards": {
"account_type": "Bank"
},
},
"Manual Visa & Master Cards": {
"account_type": "Bank"
},
},
"PayPal Account": {
"account_type": "Bank"
},
},
"Visa & Master Credit Cards": {
"account_type": "Bank"
}
}
}
},
},
"Inventory": {
"Consigned Stock": {
"Handling Difference in Inventory": {},
"Handling Difference in Inventory": {
"account_type": "Stock Adjustment"
},
"Items Delivered to Customs on temporary Base": {}
},
},
"Stock in Hand": {
"account_type": "Stock"
}
},
},
"Preliminary and Preoperating Expenses": {
"Preoperating Expenses": {}
},
},
"Prepayments & Deposits": {
"Deposits": {
"Deposit - Office Rent": {},
"Deposit Others": {},
"Deposit to Immigration (Visa)": {},
"Deposit - Office Rent": {},
"Deposit Others": {},
"Deposit to Immigration (Visa)": {},
"Deposits - Customs": {}
},
},
"Prepaid Taxes": {
"Sales Taxes Receivables": {},
"Sales Taxes Receivables": {},
"Withholding Tax Receivables": {}
},
},
"Prepayments": {
"Other Prepayments": {},
"PrePaid Advertisement Expenses": {},
"Prepaid Bank Guarantee": {},
"Prepaid Consultancy Fees": {},
"Prepaid Employees Housing": {},
"Prepaid Finance charge for Loans": {},
"Prepaid Legal Fees": {},
"Prepaid License Fees": {},
"Prepaid Life Insurance": {},
"Prepaid Maintenance": {},
"Prepaid Medical Insurance": {},
"Prepaid Office Rent": {},
"Prepaid Other Insurance": {},
"Prepaid Schooling Fees": {},
"Prepaid Site Hosting Fees": {},
"Other Prepayments": {},
"PrePaid Advertisement Expenses": {},
"Prepaid Bank Guarantee": {},
"Prepaid Consultancy Fees": {},
"Prepaid Employees Housing": {},
"Prepaid Finance charge for Loans": {},
"Prepaid Legal Fees": {},
"Prepaid License Fees": {},
"Prepaid Life Insurance": {},
"Prepaid Maintenance": {},
"Prepaid Medical Insurance": {},
"Prepaid Office Rent": {},
"Prepaid Other Insurance": {},
"Prepaid Schooling Fees": {},
"Prepaid Site Hosting Fees": {},
"Prepaid Sponsorship Fees": {}
}
}
},
},
"Long Term Assets": {
"Fixed Assets": {
"Accumulated Depreciation": {
"Acc. Depreciation of Motor Vehicles": {
"account_type": "Accumulated Depreciation"
},
},
"Acc. Deprn.Computer Hardware & Software": {
"account_type": "Accumulated Depreciation"
},
},
"Acc.Deprn.of Furniture & Office Equipment": {
"account_type": "Accumulated Depreciation"
},
},
"Amortisation on Leasehold Improvement": {
"account_type": "Accumulated Depreciation"
},
},
"account_type": "Accumulated Depreciation"
},
},
"Fixed Assets (Cost Price)": {
"Computer Hardware & Software": {
"account_type": "Fixed Asset"
},
},
"Furniture and Equipment": {
"account_type": "Fixed Asset"
},
"Leasehold Improvement": {},
},
"Leasehold Improvement": {},
"Motor Vehicles": {
"account_type": "Fixed Asset"
},
"Work In Progress": {},
},
"Work In Progress": {},
"account_type": "Fixed Asset"
}
},
},
"Intangible Assets": {
"Computer Card Renewal": {},
"Disposal of Outlets": {},
"Computer Card Renewal": {},
"Disposal of Outlets": {},
"Registration of Trademarks": {}
},
"Intercompany Accounts": {},
},
"Intercompany Accounts": {},
"Investments": {
"Investments in Subsidiaries": {}
}
},
},
"root_type": "Asset"
},
},
"Closing And Temporary Accounts": {
"Closing Accounts": {
"Closing Account": {}
},
},
"root_type": "Liability"
},
},
"Expenses": {
"Commercial Expenses": {
"Consultancy Fees": {},
"Consultancy Fees": {},
"Provision for Doubtful Debts": {}
},
},
"Cost of Sale": {
"Cost Of Goods Sold": {
"Cost Of Goods Sold I/C Sales": {},
"Cost Of Goods Sold I/C Sales": {},
"Cost of Goods Sold in Trading": {
"account_type": "Cost of Goods Sold"
},
},
"account_type": "Cost of Goods Sold"
},
},
"Expenses Included In Valuation": {
"account_type": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"account_type": "Stock Adjustment"
}
},
},
"Depreciation": {
"Depreciation & Amortization": {
"Amortization on Leasehold Improvement": {},
"Amortization on Leasehold Improvement": {},
"Depreciation Of Computer Hard & Soft": {
"account_type": "Depreciation"
},
},
"Depreciation Of Furniture & Office Equipment\n\t\t\t": {
"account_type": "Depreciation"
},
},
"Depreciation Of Motor Vehicles": {
"account_type": "Depreciation"
}
}
},
},
"Direct Expenses": {
"Financial Charges": {
"Air Miles Card Charges": {},
"Amex Credit Cards Charges": {},
"Bank Finance & Loan Charges": {},
"Credit Card Charges": {},
"Credit Card Swipe Charges": {},
"Air Miles Card Charges": {},
"Amex Credit Cards Charges": {},
"Bank Finance & Loan Charges": {},
"Credit Card Charges": {},
"Credit Card Swipe Charges": {},
"PayPal Charges": {}
}
},
},
"MISC Charges": {
"Other Charges": {
"Capital Loss": {
"Disposal of Business Branch": {},
"Loss On Fixed Assets Disposal": {},
"Disposal of Business Branch": {},
"Loss On Fixed Assets Disposal": {},
"Loss on Difference on Exchange": {}
},
},
"Other Non Operating Exp": {
"Other Non Operating Expenses": {}
},
},
"Previous Year Adjustments": {
"Previous Year Adjustments Account": {}
},
},
"Royalty Fees": {
"Royalty to Parent Co.": {}
},
},
"Tax / Zakat Expenses": {
"Income Tax": {
"account_type": "Tax"
},
"Zakat": {},
},
"Zakat": {},
"account_type": "Tax"
}
}
},
},
"Share Resources": {
"Share Resource Expenses Account": {}
},
},
"Store Operating Expenses": {
"Selling, General & Admin Expenses": {
"Advertising Expenses": {
"Other - Advertising Expenses": {}
},
},
"Bank & Finance Charges": {
"Other Bank Charges": {}
},
},
"Communications": {
"Courier": {},
"Others - Communication": {},
"Telephone": {},
"Courier": {},
"Others - Communication": {},
"Telephone": {},
"Web Site Hosting Fees": {}
},
},
"Office & Various Expenses": {
"Cleaning": {},
"Conveyance Expenses": {},
"Gifts & Donations": {},
"Insurance": {},
"Kitchen and Buffet Expenses": {},
"Maintenance": {},
"Others - Office Various Expenses": {},
"Security & Guard": {},
"Stationary From Suppliers": {},
"Stationary Out Of Stock": {},
"Subscriptions": {},
"Training": {},
"Cleaning": {},
"Conveyance Expenses": {},
"Gifts & Donations": {},
"Insurance": {},
"Kitchen and Buffet Expenses": {},
"Maintenance": {},
"Others - Office Various Expenses": {},
"Security & Guard": {},
"Stationary From Suppliers": {},
"Stationary Out Of Stock": {},
"Subscriptions": {},
"Training": {},
"Vehicle Expenses": {}
},
},
"Personnel Cost": {
"Basic Salary": {},
"End Of Service Indemnity": {},
"Housing Allowance": {},
"Leave Salary": {},
"Leave Ticket": {},
"Life Insurance": {},
"Medical Insurance": {},
"Personnel Cost Others": {},
"Sales Commission": {},
"Staff School Allowances": {},
"Transportation Allowance": {},
"Uniform": {},
"Basic Salary": {},
"End Of Service Indemnity": {},
"Housing Allowance": {},
"Leave Salary": {},
"Leave Ticket": {},
"Life Insurance": {},
"Medical Insurance": {},
"Personnel Cost Others": {},
"Sales Commission": {},
"Staff School Allowances": {},
"Transportation Allowance": {},
"Uniform": {},
"Visa Expenses": {}
},
},
"Professional & Legal Fees": {
"Audit Fees": {},
"Legal fees": {},
"Others - Professional Fees": {},
"Sponsorship Fees": {},
"Audit Fees": {},
"Legal fees": {},
"Others - Professional Fees": {},
"Sponsorship Fees": {},
"Trade License Fees": {}
},
},
"Provision & Write Off": {
"Amortisation of Preoperating Expenses": {},
"Cash Shortage": {},
"Others - Provision & Write off": {},
"Write Off Inventory": {},
"Amortisation of Preoperating Expenses": {},
"Cash Shortage": {},
"Others - Provision & Write off": {},
"Write Off Inventory": {},
"Write Off Receivables & Payables": {}
},
},
"Rent Expenses": {
"Office Rent": {},
"Office Rent": {},
"Warehouse Rent": {}
},
},
"Travel Expenses": {
"Air tickets": {},
"Hotel": {},
"Meals": {},
"Others": {},
"Air tickets": {},
"Hotel": {},
"Meals": {},
"Others": {},
"Per Diem": {}
},
},
"Utilities": {
"Other Utility Cahrges": {},
"Other Utility Cahrges": {},
"Water & Electricity": {}
}
}
},
},
"root_type": "Expense"
},
},
"Liabilities": {
"Current Liabilities": {
"Accounts Payable": {
"Payables": {
"Advance Payable to Suppliers": {
"account_type": "Payable"
},
},
"Consigned Payable": {
"account_type": "Payable"
},
},
"Other Payable": {
"account_type": "Payable"
},
},
"Post Dated Cheques Paid": {
"account_type": "Payable"
},
"Staff Payable": {},
},
"Staff Payable": {},
"Suppliers Price Protection": {
"account_type": "Payable"
},
},
"Trade Payable": {
"account_type": "Payable"
},
},
"account_type": "Payable"
}
},
},
"Accruals & Provisions": {
"Accruals": {
"Accrued Personnel Cost": {
"Accrued - Commissions": {},
"Accrued - Leave Salary": {},
"Accrued - Leave Tickets": {},
"Accrued - Salaries": {},
"Accrued Other Personnel Cost": {},
"Accrued Salaries Increment": {},
"Accrued - Commissions": {},
"Accrued - Leave Salary": {},
"Accrued - Leave Tickets": {},
"Accrued - Salaries": {},
"Accrued Other Personnel Cost": {},
"Accrued Salaries Increment": {},
"Accrued-Staff Bonus": {}
}
},
},
"Accrued Expenses": {
"Accrued Other Expenses": {
"Accrued - Audit Fees": {},
"Accrued - Office Rent": {},
"Accrued - Sponsorship": {},
"Accrued - Telephone": {},
"Accrued - Utilities": {},
"Accrued - Audit Fees": {},
"Accrued - Office Rent": {},
"Accrued - Sponsorship": {},
"Accrued - Telephone": {},
"Accrued - Utilities": {},
"Accrued Others": {}
}
},
},
"Other Current Liabilities": {
"Accrued Dubai Customs": {},
"Deferred income": {},
"Accrued Dubai Customs": {},
"Deferred income": {},
"Shipping & Handling": {}
},
},
"Provisions": {
"Tax Payables": {
"Income Tax Payable": {},
"Sales Tax Payable": {},
"Income Tax Payable": {},
"Sales Tax Payable": {},
"Withholding Tax Payable": {}
}
},
},
"Short Term Loan": {}
},
},
"Duties and Taxes": {
"account_type": "Tax",
"account_type": "Tax",
"is_group": 1
},
},
"Reservations & Credit Notes": {
"Credit Notes": {
"Credit Notes to Customers": {},
"Credit Notes to Customers": {},
"Reservations": {}
}
},
},
"Stock Liabilities": {
"Stock Received But Not Billed": {
"account_type": "Stock Received But Not Billed"
}
},
},
"Unearned Income": {}
},
},
"Long Term Liabilities": {
"Long Term Loans & Provisions": {}
},
},
"root_type": "Liability"
},
},
"Revenue": {
"Direct Revenue": {
"Other Direct Revenue": {
"Other Revenue - Operating": {
"Advertising Income": {},
"Branding Income": {},
"Early Setmt Margin from Suppliers": {},
"Marketing Rebate from Suppliers": {},
"Rebate from Suppliers": {},
"Service Income": {},
"Advertising Income": {},
"Branding Income": {},
"Early Setmt Margin from Suppliers": {},
"Marketing Rebate from Suppliers": {},
"Rebate from Suppliers": {},
"Service Income": {},
"Space Rental Income": {}
}
}
},
},
"Indirect Revenue": {
"Other Indirect Revenue": {
"Capital Gain": {},
"Excess In Till": {},
"Gain On Difference Of Exchange": {},
"Management Consultancy Fees": {},
"Capital Gain": {},
"Excess In Till": {},
"Gain On Difference Of Exchange": {},
"Management Consultancy Fees": {},
"Other Income": {}
},
},
"Other Revenue - Non Operating": {
"Interest Revenue": {},
"Interest from FD": {},
"Products Listing Fees from Suppliers": {},
"Interest Revenue": {},
"Interest from FD": {},
"Products Listing Fees from Suppliers": {},
"Trade Opening Fees from suppliers": {}
}
},
},
"Sales": {
"Sales from Other Regions": {
"Sales from Other Region": {}
},
},
"Sales of same region": {
"Management Consultancy Fees 1": {},
"Sales Account": {},
"Management Consultancy Fees 1": {},
"Sales Account": {},
"Sales of I/C": {}
}
},
},
"root_type": "Income"
},
},
"Share Holder Equity": {
"Capital": {
"Contributed Capital": {},
"Share Capital": {},
"Shareholders Current A/c": {},
"Sub Ordinated Loan": {},
"Contributed Capital": {},
"Share Capital": {},
"Shareholders Current A/c": {},
"Sub Ordinated Loan": {},
"Treasury Stocks": {}
},
},
"Retained Earnings": {
"Current Year Results": {},
"Dividends Paid": {},
"Current Year Results": {},
"Dividends Paid": {},
"Previous Years Results": {}
},
"account_type": "Equity",
},
"account_type": "Equity",
"root_type": "Equity"
}
}

View File

@@ -1,531 +0,0 @@
{
"country_code": "de",
"name": "SKR03 mit Kontonummern",
"tree": {
"Aktiva": {
"is_group": 1,
"root_type": "Asset",
"A - Anlagevermögen": {
"is_group": 1,
"EDV-Software": {
"account_number": "0027",
"account_type": "Fixed Asset"
},
"Gesch\u00e4ftsausstattung": {
"account_number": "0410",
"account_type": "Fixed Asset"
},
"B\u00fcroeinrichtung": {
"account_number": "0420",
"account_type": "Fixed Asset"
},
"Darlehen": {
"account_number": "0565"
},
"Maschinen": {
"account_number": "0210",
"account_type": "Fixed Asset"
},
"Betriebsausstattung": {
"account_number": "0400",
"account_type": "Fixed Asset"
},
"Ladeneinrichtung": {
"account_number": "0430",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation": {
"account_type": "Accumulated Depreciation"
}
},
"B - Umlaufvermögen": {
"is_group": 1,
"I. Vorräte": {
"is_group": 1,
"Roh-, Hilfs- und Betriebsstoffe (Bestand)": {
"account_number": "3970",
"account_type": "Stock"
},
"Waren (Bestand)": {
"account_number": "3980",
"account_type": "Stock"
}
},
"II. Forderungen und sonstige Vermögensgegenstände": {
"is_group": 1,
"Ford. a. Lieferungen und Leistungen": {
"account_number": "1400",
"account_type": "Receivable"
},
"Durchlaufende Posten": {
"account_number": "1590"
},
"Gewinnermittlung \u00a74/3 nicht Ergebniswirksam": {
"account_number": "1371"
},
"Abziehbare Vorsteuer": {
"account_type": "Tax",
"is_group": 1,
"Abziehbare Vorsteuer 7%": {
"account_number": "1571"
},
"Abziehbare Vorsteuer 19%": {
"account_number": "1576"
},
"Abziehbare Vorsteuer nach \u00a713b UStG 19%": {
"account_number": "1577"
},
"Leistungen \u00a713b UStG 19% Vorsteuer, 19% Umsatzsteuer": {
"account_number": "3120"
}
}
},
"III. Wertpapiere": {
"is_group": 1
},
"IV. Kassenbestand, Bundesbankguthaben, Guthaben bei Kreditinstituten und Schecks.": {
"is_group": 1,
"Kasse": {
"account_type": "Cash",
"is_group": 1,
"Kasse": {
"is_group": 1,
"account_number": "1000",
"account_type": "Cash"
}
},
"Bank": {
"is_group": 1,
"account_type": "Bank",
"Postbank": {
"account_number": "1100",
"account_type": "Bank"
},
"Bankkonto": {
"account_number": "1200",
"account_type": "Bank"
}
}
}
},
"C - Rechnungsabgrenzungsposten": {
"is_group": 1,
"Aktive Rechnungsabgrenzung": {
"account_number": "0980"
}
},
"D - Aktive latente Steuern": {
"is_group": 1,
"Aktive latente Steuern": {
"account_number": "0983"
}
},
"E - Aktiver Unterschiedsbetrag aus der Vermögensverrechnung": {
"is_group": 1
}
},
"Passiva": {
"is_group": 1,
"root_type": "Liability",
"A. Eigenkapital": {
"is_group": 1,
"I. Gezeichnetes Kapital": {
"is_group": 1
},
"II. Kapitalrücklage": {
"is_group": 1
},
"III. Gewinnrücklagen": {
"is_group": 1
},
"IV. Gewinnvortrag/Verlustvortrag": {
"is_group": 1
},
"V. Jahresüberschuß/Jahresfehlbetrag": {
"is_group": 1
}
},
"B. Rückstellungen": {
"is_group": 1,
"I. Rückstellungen für Pensionen und ähnliche Verpflichtungen": {
"is_group": 1
},
"II. Steuerrückstellungen": {
"is_group": 1
},
"III. sonstige Rückstellungen": {
"is_group": 1
}
},
"C. Verbindlichkeiten": {
"is_group": 1,
"I. Anleihen": {
"is_group": 1
},
"II. Verbindlichkeiten gegenüber Kreditinstituten": {
"is_group": 1
},
"III. Erhaltene Anzahlungen auf Bestellungen": {
"is_group": 1
},
"IV. Verbindlichkeiten aus Lieferungen und Leistungen": {
"is_group": 1,
"Verbindlichkeiten aus Lieferungen u. Leistungen": {
"account_number": "1600",
"account_type": "Payable"
}
},
"V. Verbindlichkeiten aus der Annahme gezogener Wechsel und der Ausstellung eigener Wechsel": {
"is_group": 1
},
"VI. Verbindlichkeiten gegenüber verbundenen Unternehmen": {
"is_group": 1
},
"VII. Verbindlichkeiten gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht": {
"is_group": 1
},
"VIII. sonstige Verbindlichkeiten": {
"is_group": 1,
"Sonstige Verbindlichkeiten": {
"account_number": "1700",
"account_type": "Asset Received But Not Billed"
},
"Sonstige Verbindlichkeiten (1 bis 5 Jahre)": {
"account_number": "1702",
"account_type": "Stock Received But Not Billed"
},
"Verbindlichkeiten aus Lohn und Gehalt": {
"account_number": "1740",
"account_type": "Payable"
},
"Umsatzsteuer": {
"is_group": 1,
"account_type": "Tax",
"Umsatzsteuer 7%": {
"account_number": "1771"
},
"Umsatzsteuer 19%": {
"account_number": "1776"
},
"Umsatzsteuer-Vorauszahlung": {
"account_number": "1780"
},
"Umsatzsteuer-Vorauszahlung 1/11": {
"account_number": "1781"
},
"Umsatzsteuer \u00a7 13b UStG 19%": {
"account_number": "1787"
},
"Umsatzsteuer Vorjahr": {
"account_number": "1790"
},
"Umsatzsteuer fr\u00fchere Jahre": {
"account_number": "1791"
}
}
}
},
"D. Rechnungsabgrenzungsposten": {
"is_group": 1,
"Passive Rechnungsabgrenzung": {
"account_number": "0990"
}
},
"E. Passive latente Steuern": {
"is_group": 1
}
},
"Erl\u00f6se u. Ertr\u00e4ge 2/8": {
"is_group": 1,
"root_type": "Income",
"Erl\u00f6skonten 8": {
"is_group": 1,
"Erl\u00f6se": {
"account_number": "8200",
"account_type": "Income Account"
},
"Erl\u00f6se USt. 19%": {
"account_number": "8400",
"account_type": "Income Account"
},
"Erl\u00f6se USt. 7%": {
"account_number": "8300",
"account_type": "Income Account"
}
},
"Ertragskonten 2": {
"is_group": 1,
"sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": {
"account_number": "2650",
"account_type": "Income Account"
},
"Au\u00dferordentliche Ertr\u00e4ge": {
"account_number": "2500",
"account_type": "Income Account"
},
"Sonstige Ertr\u00e4ge": {
"account_number": "2700",
"account_type": "Income Account"
}
}
},
"Aufwendungen 2/4": {
"is_group": 1,
"root_type": "Expense",
"Wareneingang": {
"account_number": "3200"
},
"Bezugsnebenkosten": {
"account_number": "3800",
"account_type": "Expenses Included In Asset Valuation"
},
"Herstellungskosten": {
"account_number": "4996",
"account_type": "Cost of Goods Sold"
},
"Verluste aus dem Abgang von Gegenständen des Anlagevermögens": {
"account_number": "2320",
"account_type": "Stock Adjustment"
},
"Verwaltungskosten": {
"account_number": "4997",
"account_type": "Expenses Included In Valuation"
},
"Vertriebskosten": {
"account_number": "4998",
"account_type": "Expenses Included In Valuation"
},
"Gegenkonto 4996-4998": {
"account_number": "4999"
},
"Abschreibungen": {
"is_group": 1,
"Abschreibungen auf Sachanlagen (ohne AfA auf Kfz und Gebäude)": {
"account_number": "4830",
"account_type": "Accumulated Depreciation"
},
"Abschreibungen auf Gebäude": {
"account_number": "4831",
"account_type": "Depreciation"
},
"Abschreibungen auf Kfz": {
"account_number": "4832",
"account_type": "Depreciation"
},
"Sofortabschreibung GWG": {
"account_number": "4855",
"account_type": "Expense Account"
}
},
"Kfz-Kosten": {
"is_group": 1,
"Kfz-Steuer": {
"account_number": "4510",
"account_type": "Expense Account"
},
"Kfz-Versicherungen": {
"account_number": "4520",
"account_type": "Expense Account"
},
"laufende Kfz-Betriebskosten": {
"account_number": "4530",
"account_type": "Expense Account"
},
"Kfz-Reparaturen": {
"account_number": "4540",
"account_type": "Expense Account"
},
"Fremdfahrzeuge": {
"account_number": "4570",
"account_type": "Expense Account"
},
"sonstige Kfz-Kosten": {
"account_number": "4580",
"account_type": "Expense Account"
}
},
"Personalkosten": {
"is_group": 1,
"Geh\u00e4lter": {
"account_number": "4120",
"account_type": "Expense Account"
},
"gesetzliche soziale Aufwendungen": {
"account_number": "4130",
"account_type": "Expense Account"
},
"Aufwendungen f\u00fcr Altersvorsorge": {
"account_number": "4165",
"account_type": "Expense Account"
},
"Verm\u00f6genswirksame Leistungen": {
"account_number": "4170",
"account_type": "Expense Account"
},
"Aushilfsl\u00f6hne": {
"account_number": "4190",
"account_type": "Expense Account"
}
},
"Raumkosten": {
"is_group": 1,
"Miete und Nebenkosten": {
"account_number": "4210",
"account_type": "Expense Account"
},
"Gas, Wasser, Strom (Verwaltung, Vertrieb)": {
"account_number": "4240",
"account_type": "Expense Account"
},
"Reinigung": {
"account_number": "4250",
"account_type": "Expense Account"
}
},
"Reparatur/Instandhaltung": {
"is_group": 1,
"Reparatur u. Instandh. von Anlagen/Maschinen u. Betriebs- u. Gesch\u00e4ftsausst.": {
"account_number": "4805",
"account_type": "Expense Account"
}
},
"Versicherungsbeitr\u00e4ge": {
"is_group": 1,
"Versicherungen": {
"account_number": "4360",
"account_type": "Expense Account"
},
"Beitr\u00e4ge": {
"account_number": "4380",
"account_type": "Expense Account"
},
"sonstige Ausgaben": {
"account_number": "4390",
"account_type": "Expense Account"
},
"steuerlich abzugsf\u00e4hige Versp\u00e4tungszuschl\u00e4ge und Zwangsgelder": {
"account_number": "4396",
"account_type": "Expense Account"
}
},
"Werbe-/Reisekosten": {
"is_group": 1,
"Werbekosten": {
"account_number": "4610",
"account_type": "Expense Account"
},
"Aufmerksamkeiten": {
"account_number": "4653",
"account_type": "Expense Account"
},
"nicht abzugsf\u00e4hige Betriebsausg. aus Werbe-, Repr\u00e4s.- u. Reisekosten": {
"account_number": "4665",
"account_type": "Expense Account"
},
"Reisekosten Unternehmer": {
"account_number": "4670",
"account_type": "Expense Account"
}
},
"verschiedene Kosten": {
"is_group": 1,
"Porto": {
"account_number": "4910",
"account_type": "Expense Account"
},
"Telekom": {
"account_number": "4920",
"account_type": "Expense Account"
},
"Mobilfunk D2": {
"account_number": "4921",
"account_type": "Expense Account"
},
"Internet": {
"account_number": "4922",
"account_type": "Expense Account"
},
"B\u00fcrobedarf": {
"account_number": "4930",
"account_type": "Expense Account"
},
"Zeitschriften, B\u00fccher": {
"account_number": "4940",
"account_type": "Expense Account"
},
"Fortbildungskosten": {
"account_number": "4945",
"account_type": "Expense Account"
},
"Buchf\u00fchrungskosten": {
"account_number": "4955",
"account_type": "Expense Account"
},
"Abschlu\u00df- u. Pr\u00fcfungskosten": {
"account_number": "4957",
"account_type": "Expense Account"
},
"Nebenkosten des Geldverkehrs": {
"account_number": "4970",
"account_type": "Expense Account"
},
"Werkzeuge und Kleinger\u00e4te": {
"account_number": "4985",
"account_type": "Expense Account"
}
},
"Zinsaufwendungen": {
"is_group": 1,
"Zinsaufwendungen f\u00fcr kurzfristige Verbindlichkeiten": {
"account_number": "2110",
"account_type": "Expense Account"
},
"Zinsaufwendungen f\u00fcr KFZ Finanzierung": {
"account_number": "2121",
"account_type": "Expense Account"
}
}
},
"Anfangsbestand 9": {
"is_group": 1,
"root_type": "Equity",
"Saldenvortragskonten": {
"is_group": 1,
"Saldenvortrag Sachkonten": {
"account_number": "9000"
},
"Saldenvortr\u00e4ge Debitoren": {
"account_number": "9008"
},
"Saldenvortr\u00e4ge Kreditoren": {
"account_number": "9009"
}
}
},
"Privatkonten 1": {
"is_group": 1,
"root_type": "Equity",
"Privatentnahmen/-einlagen": {
"is_group": 1,
"Privatentnahme allgemein": {
"account_number": "1800"
},
"Privatsteuern": {
"account_number": "1810"
},
"Sonderausgaben beschr\u00e4nkt abzugsf\u00e4hig": {
"account_number": "1820"
},
"Sonderausgaben unbeschr\u00e4nkt abzugsf\u00e4hig": {
"account_number": "1830"
},
"Au\u00dfergew\u00f6hnliche Belastungen": {
"account_number": "1850"
},
"Privateinlagen": {
"account_number": "1890"
}
}
}
}
}

View File

@@ -292,21 +292,18 @@
"Umsatzsteuerforderungen fr\u00fchere Jahre": {}
},
"Sonstige Verm\u00f6gensgegenst\u00e4nde oder sonstige Verbindlichkeiten": {
"Abziehbare Vorsteuer": {
"account_type": "Tax",
"is_group": 1,
"Abziehbare Vorsteuer 16%": {},
"Abziehbare Vorsteuer 19%": {},
"Abziehbare Vorsteuer 7%": {},
"Abziehbare Vorsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Unsatzsteuerlager": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb von Neufahrzeugen von Lieferanten ohne Ust-Identifikationsnummer": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG ": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 16%": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 19%": {}
},
"Abziehbare Vorsteuer": {},
"Abziehbare Vorsteuer 16%": {},
"Abziehbare Vorsteuer 19%": {},
"Abziehbare Vorsteuer 7%": {},
"Abziehbare Vorsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Unsatzsteuerlager": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb von Neufahrzeugen von Lieferanten ohne Ust-Identifikationsnummer": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG ": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 16%": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 19%": {},
"Aufl\u00f6sung Vorsteuer aus Vorjahr \u00a7 4/3 EStG": {},
"Aufzuteilende Vorsteuer": {},
"Aufzuteilende Vorsteuer 16%": {},
@@ -676,26 +673,23 @@
"Sonstige Verrechnungskonten (Interimskonto)": {
"account_type": "Stock Received But Not Billed"
},
"Umsatzsteuer": {
"account_type": "Tax",
"is_group": 1,
"Umsatzsteuer 16%": {},
"Umsatzsteuer 19%": {},
"Umsatzsteuer 7%": {},
"Umsatzsteuer Vorjahr": {},
"Umsatzsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Umsatzsteuerlager": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ohne Vorsteuerabzug": {},
"Umsatzsteuer fr\u00fchere Jahre": {},
"Umsatzsteuer laufendes Jahr": {},
"Umsatzsteuer nach \u00a713b UStG": {},
"Umsatzsteuer nach \u00a713b UStG 16%": {},
"Umsatzsteuer nach \u00a713b UStG 19%": {}
},
"Umsatzsteuer": {},
"Umsatzsteuer 16%": {},
"Umsatzsteuer 19%": {},
"Umsatzsteuer 7%": {},
"Umsatzsteuer Vorjahr": {},
"Umsatzsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Umsatzsteuerlager": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ohne Vorsteuerabzug": {},
"Umsatzsteuer fr\u00fchere Jahre": {},
"Umsatzsteuer laufendes Jahr": {},
"Umsatzsteuer nach \u00a713b UStG": {},
"Umsatzsteuer nach \u00a713b UStG 16%": {},
"Umsatzsteuer nach \u00a713b UStG 19%": {},
"Umsatzsteuer- Vorauszahlungen": {},
"Umsatzsteuer- Vorauszahlungen 1/11": {},
"Verbindlichkeiten aus Lohn- und Kirchensteuer": {}

View File

@@ -659,7 +659,6 @@
},
"Abziehbare Vorsteuer (Gruppe)": {
"is_group": 1,
"account_type": "Tax",
"Abziehbare Vorsteuer": {
"account_number": "1400"
},
@@ -911,8 +910,75 @@
},
"is_group": 1
},
"Passiva - Verbindlichkeiten": {
"Passiva": {
"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.": {
@@ -1529,143 +1595,6 @@
},
"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,
@@ -1734,15 +1663,7 @@
"Erl\u00f6se 7 % USt": {
"account_number": "4300",
"account_type": "Income Account"
},
"Erl\u00f6se 16 % USt": {
"account_number": "4340",
"account_type": "Income Account"
},
"Erl\u00f6se 19 % USt": {
"account_number": "4400",
"account_type": "Income Account"
},
},
"Erl\u00f6se aus im Inland steuerpfl. EU-Lieferungen 7 % USt": {
"account_number": "4310"
},
@@ -1770,6 +1691,19 @@
"Erl\u00f6se aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Ums\u00e4tze": {
"account_number": "4339"
},
"Erl\u00f6se 16 % USt (Gruppe)": {
"is_group": 1,
"Erl\u00f6se 16 % USt": {
"account_number": "4340"
}
},
"Erl\u00f6se 19 % USt (Gruppe)": {
"is_group": 1,
"Erl\u00f6se 19 % USt": {
"account_number": "4400",
"account_type": "Income Account"
}
},
"Grundst\u00fccksertr\u00e4ge (Gruppe)": {
"is_group": 1,
"Grundst\u00fccksertr\u00e4ge": {
@@ -1828,12 +1762,14 @@
"2 - Herstellungskosten der zur Erzielung der Umsatzerl\u00f6se erbrachten Leistungen": {
"root_type": "Expense",
"is_group": 1,
"Herstellungskosten": {
"account_number": "6990",
"account_type": "Cost of Goods Sold"
},
"Herstellungskosten: Schwund": {
"account_type": "Stock Adjustment"
"Herstellungskosten (Gruppe)": {
"Herstellungskosten": {
"account_number": "6990",
"account_type": "Cost of Goods Sold"
},
"Herstellungskosten: Schwund": {
"account_type": "Stock Adjustment"
}
},
"Aufwendungen f. Roh-, Hilfs- und Betriebsstoffe und f. bezogene Waren": {
"account_number": "5000",
@@ -1883,10 +1819,10 @@
"Energiestoffe (Fertigung)": {
"account_number": "5190"
},
"Energiestoffe (Fertigung) 7% Vorsteuer": {
"Energiestoffe (Fertigung)7% Vorsteuer": {
"account_number": "5191"
},
"Energiestoffe (Fertigung) 19% Vorsteuer": {
"Energiestoffe (Fertigung)19% Vorsteuer": {
"account_number": "5192"
}
}
@@ -2009,49 +1945,49 @@
},
"Nachl\u00e4sse aus innergem. Erwerb 15 % Vorsteuer und 15 % Umsatzsteuer": {
"account_number": "5727"
}
},
"Erhaltene Skonti (Gruppe)": {
"is_group": 1,
"Erh. Skonti": {
"account_number": "5730"
},
"Erh. Skonti 7 % Vorsteuer": {
"account_number": "5731"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe": {
"account_number": "5733"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": {
"account_number": "5734"
},
"Erh. Skonti 19 % Vorsteuer": {
"account_number": "5736"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": {
"account_number": "5738"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe aus steuerpfl. innergem. Erwerb 19% Vorst. u. 19% Ust.": {
"account_number": "5741"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe aus steuerpfl. innergem. Erwerb 7% Vorst. u. 7% Ust.": {
"account_number": "5743"
},
"Erh. Skonti aus steuerpflichtigem innergem. Erwerb": {
"account_number": "5745"
},
"Erh. Skonti aus steuerpflichtigem innergem. Erwerb 7% Vorst. u. 7% Ust.": {
"account_number": "5746"
},
"Erh. Skonti aus steuerpflichtigem innergem. Erwerb 19% Vorst. u. 19% Ust.": {
"account_number": "5748"
},
"Erh. Skonti aus Erwerb Roh-,Hilfs-,Betriebsstoff letzter Abn.innerh.Dreiecksg. 19% Vorst. und 19% Ust.": {
"account_number": "5792"
},
"Erh. Skonti aus Erwerb Waren als letzter Abnehmer innerh. Dreiecksgesch. 19% Vorst. u. 19% Ust.": {
"account_number": "5793"
}
},
"Erhaltene Skonti (Gruppe)": {
"is_group": 1,
"Erh. Skonti": {
"account_number": "5730"
},
"Erh. Skonti 7 % Vorsteuer": {
"account_number": "5731"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe": {
"account_number": "5733"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": {
"account_number": "5734"
},
"Erh. Skonti 19 % Vorsteuer": {
"account_number": "5736"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": {
"account_number": "5738"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe aus steuerpfl. innergem. Erwerb 19% Vorst. u. 19% Ust.": {
"account_number": "5741"
},
"Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe aus steuerpfl. innergem. Erwerb 7% Vorst. u. 7% Ust.": {
"account_number": "5743"
},
"Erh. Skonti aus steuerpflichtigem innergem. Erwerb": {
"account_number": "5745"
},
"Erh. Skonti aus steuerpflichtigem innergem. Erwerb 7% Vorst. u. 7% Ust.": {
"account_number": "5746"
},
"Erh. Skonti aus steuerpflichtigem innergem. Erwerb 19% Vorst. u. 19% Ust.": {
"account_number": "5748"
},
"Erh. Skonti aus Erwerb Roh-,Hilfs-,Betriebsstoff letzter Abn.innerh.Dreiecksg. 19% Vorst. und 19% Ust.": {
"account_number": "5792"
},
"Erh. Skonti aus Erwerb Waren als letzter Abnehmer innerh. Dreiecksgesch. 19% Vorst. u. 19% Ust.": {
"account_number": "5793"
}
}
},
"Bezugsnebenkosten (Gruppe)": {
"is_group": 1,

View File

@@ -2,10 +2,8 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from frappe import _
def get():
return {
_("Application of Funds (Assets)"): {

View File

@@ -2,10 +2,8 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from frappe import _
def get():
return {
_("Application of Funds (Assets)"): {
@@ -247,9 +245,6 @@ def get():
"account_number": "2200"
},
_("Duties and Taxes"): {
_("TDS Payable"): {
"account_number": "2310"
},
"account_type": "Tax",
"is_group": 1,
"account_number": "2300"

View File

@@ -2,14 +2,11 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from erpnext.accounts.doctype.account.account import merge_account, update_account_number
from erpnext.stock import get_company_default_inventory_account, get_warehouse_account
from erpnext.stock import get_warehouse_account, get_company_default_inventory_account
from erpnext.accounts.doctype.account.account import update_account_number
from erpnext.accounts.doctype.account.account import merge_account
class TestAccount(unittest.TestCase):
def test_rename_account(self):
@@ -72,7 +69,6 @@ class TestAccount(unittest.TestCase):
acc.account_name = "Accumulated Depreciation"
acc.parent_account = "Fixed Assets - _TC"
acc.company = "_Test Company"
acc.account_type = "Accumulated Depreciation"
acc.insert()
doc = frappe.get_doc("Account", "Securities and Deposits - _TC")
@@ -102,8 +98,7 @@ class TestAccount(unittest.TestCase):
"Softwares - _TC", doc.is_group, doc.root_type, doc.company)
def test_account_sync(self):
frappe.local.flags.pop("ignore_root_company_validation", None)
del frappe.local.flags["ignore_root_company_validation"]
acc = frappe.new_doc("Account")
acc.account_name = "Test Sync Account"
acc.parent_account = "Temporary Accounts - _TC3"
@@ -115,68 +110,7 @@ class TestAccount(unittest.TestCase):
self.assertEqual(acc_tc_4, "Test Sync Account - _TC4")
self.assertEqual(acc_tc_5, "Test Sync Account - _TC5")
def test_add_account_to_a_group(self):
frappe.db.set_value("Account", "Office Rent - _TC3", "is_group", 1)
acc = frappe.new_doc("Account")
acc.account_name = "Test Group Account"
acc.parent_account = "Office Rent - _TC3"
acc.company = "_Test Company 3"
self.assertRaises(frappe.ValidationError, acc.insert)
frappe.db.set_value("Account", "Office Rent - _TC3", "is_group", 0)
def test_account_rename_sync(self):
frappe.local.flags.pop("ignore_root_company_validation", None)
acc = frappe.new_doc("Account")
acc.account_name = "Test Rename Account"
acc.parent_account = "Temporary Accounts - _TC3"
acc.company = "_Test Company 3"
acc.insert()
# Rename account in parent company
update_account_number(acc.name, "Test Rename Sync Account", "1234")
# Check if renamed in children
self.assertTrue(frappe.db.exists("Account", {'account_name': "Test Rename Sync Account", "company": "_Test Company 4", "account_number": "1234"}))
self.assertTrue(frappe.db.exists("Account", {'account_name': "Test Rename Sync Account", "company": "_Test Company 5", "account_number": "1234"}))
frappe.delete_doc("Account", "1234 - Test Rename Sync Account - _TC3")
frappe.delete_doc("Account", "1234 - Test Rename Sync Account - _TC4")
frappe.delete_doc("Account", "1234 - Test Rename Sync Account - _TC5")
def test_child_company_account_rename_sync(self):
frappe.local.flags.pop("ignore_root_company_validation", None)
acc = frappe.new_doc("Account")
acc.account_name = "Test Group Account"
acc.parent_account = "Temporary Accounts - _TC3"
acc.is_group = 1
acc.company = "_Test Company 3"
acc.insert()
self.assertTrue(frappe.db.exists("Account", {'account_name': "Test Group Account", "company": "_Test Company 4"}))
self.assertTrue(frappe.db.exists("Account", {'account_name': "Test Group Account", "company": "_Test Company 5"}))
# Try renaming child company account
acc_tc_5 = frappe.db.get_value('Account', {'account_name': "Test Group Account", "company": "_Test Company 5"})
self.assertRaises(frappe.ValidationError, update_account_number, acc_tc_5, "Test Modified Account")
# Rename child company account with allow_account_creation_against_child_company enabled
frappe.db.set_value("Company", "_Test Company 5", "allow_account_creation_against_child_company", 1)
update_account_number(acc_tc_5, "Test Modified Account")
self.assertTrue(frappe.db.exists("Account", {'name': "Test Modified Account - _TC5", "company": "_Test Company 5"}))
frappe.db.set_value("Company", "_Test Company 5", "allow_account_creation_against_child_company", 0)
to_delete = ["Test Group Account - _TC3", "Test Group Account - _TC4", "Test Modified Account - _TC5"]
for doc in to_delete:
frappe.delete_doc("Account", doc)
def _make_test_records(verbose=None):
def _make_test_records(verbose):
from frappe.test_runner import make_test_objects
accounts = [
@@ -215,7 +149,7 @@ def _make_test_records(verbose=None):
# fixed asset depreciation
["_Test Fixed Asset", "Current Assets", 0, "Fixed Asset", None],
["_Test Accumulated Depreciations", "Current Assets", 0, "Accumulated Depreciation", None],
["_Test Accumulated Depreciations", "Current Assets", 0, None, None],
["_Test Depreciations", "Expenses", 0, None, None],
["_Test Gain/Loss on Asset Disposal", "Expenses", 0, None, None],
@@ -258,8 +192,7 @@ def create_account(**kwargs):
account_name = kwargs.get('account_name'),
account_type = kwargs.get('account_type'),
parent_account = kwargs.get('parent_account'),
company = kwargs.get('company'),
account_currency = kwargs.get('account_currency')
company = kwargs.get('company')
))
account.save()

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Account Subtype', {
refresh: function() {
}
});

View File

@@ -0,0 +1,134 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:account_subtype",
"beta": 0,
"creation": "2018-10-25 15:46:08.054586",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account_subtype",
"fieldtype": "Data",
"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": "Account Subtype",
"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,
"translatable": 0,
"unique": 1
}
],
"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": "2018-10-25 15:47:03.841390",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Subtype",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 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
},
{
"amend": 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": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 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": "Accounts User",
"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": 0,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class AccountSubtype(Document):
pass

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Account Subtype", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Account Subtype
() => frappe.tests.make('Account Subtype', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
class TestAccountSubtype(unittest.TestCase):
pass

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Account Type', {
refresh: function() {
}
});

View File

@@ -0,0 +1,134 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:account_type",
"beta": 0,
"creation": "2018-10-25 15:45:45.789963",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account_type",
"fieldtype": "Data",
"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": "Account Type",
"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,
"translatable": 0,
"unique": 1
}
],
"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": "2018-10-25 15:46:51.042604",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Type",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 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
},
{
"amend": 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": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 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": "Accounts User",
"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": 0,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class AccountType(Document):
pass

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Account Type", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Account Type
() => frappe.tests.make('Account Type', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
class TestAccountType(unittest.TestCase):
pass

View File

@@ -2,11 +2,12 @@
// For license information, please see license.txt
frappe.ui.form.on('Accounting Dimension', {
refresh: function(frm) {
frm.set_query('document_type', () => {
let invalid_doctypes = frappe.model.core_doctypes_list;
invalid_doctypes.push('Accounting Dimension', 'Project',
'Cost Center', 'Accounting Dimension Detail', 'Company');
'Cost Center', 'Accounting Dimension Detail');
return {
filters: {
@@ -60,4 +61,4 @@ frappe.ui.form.on('Accounting Dimension Detail', {
let row = locals[cdt][cdn];
row.reference_document = frm.doc.document_type;
}
});
});

View File

@@ -30,7 +30,6 @@
"fieldtype": "Link",
"label": "Reference Document Type",
"options": "DocType",
"read_only_depends_on": "eval:!doc.__islocal",
"reqd": 1
},
{
@@ -49,7 +48,7 @@
}
],
"links": [],
"modified": "2021-02-08 16:37:53.936656",
"modified": "2020-03-22 20:34:39.805728",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension",

View File

@@ -3,16 +3,15 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import json
import frappe
from frappe import _, scrub
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from frappe.model import core_doctypes_list
from frappe import _
import json
from frappe.model.document import Document
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from frappe import scrub
from frappe.utils import cstr
from frappe.utils.background_jobs import enqueue
from frappe.model import core_doctypes_list
class AccountingDimension(Document):
def before_insert(self):
@@ -20,7 +19,7 @@ class AccountingDimension(Document):
def validate(self):
if self.document_type in core_doctypes_list + ('Accounting Dimension', 'Project',
'Cost Center', 'Accounting Dimension Detail', 'Company', 'Account') :
'Cost Center', 'Accounting Dimension Detail') :
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
frappe.throw(msg)
@@ -28,29 +27,19 @@ class AccountingDimension(Document):
exists = frappe.db.get_value("Accounting Dimension", {'document_type': self.document_type}, ['name'])
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)
frappe.throw("Document Type already used as a dimension")
def after_insert(self):
if frappe.flags.in_test:
make_dimension_in_accounting_doctypes(doc=self)
else:
frappe.enqueue(make_dimension_in_accounting_doctypes, doc=self, queue='long')
frappe.enqueue(make_dimension_in_accounting_doctypes, doc=self)
def on_trash(self):
if frappe.flags.in_test:
delete_accounting_dimension(doc=self)
else:
frappe.enqueue(delete_accounting_dimension, doc=self, queue='long')
frappe.enqueue(delete_accounting_dimension, doc=self)
def set_fieldname_and_label(self):
if not self.label:
@@ -59,13 +48,8 @@ class AccountingDimension(Document):
if not self.fieldname:
self.fieldname = scrub(self.label)
def on_update(self):
frappe.flags.accounting_dimensions = None
def make_dimension_in_accounting_doctypes(doc, doclist=None):
if not doclist:
doclist = get_doctypes_with_dimensions()
def make_dimension_in_accounting_doctypes(doc):
doclist = get_doctypes_with_dimensions()
doc_count = len(get_accounting_dimensions())
count = 0
@@ -85,14 +69,10 @@ def make_dimension_in_accounting_doctypes(doc, doclist=None):
"owner": "Administrator"
}
meta = frappe.get_meta(doctype, cached=False)
fieldnames = [d.fieldname for d in meta.get("fields")]
if df['fieldname'] not in fieldnames:
if doctype == "Budget":
add_dimension_to_budget_doctype(df.copy(), doc)
else:
create_custom_field(doctype, df)
if doctype == "Budget":
add_dimension_to_budget_doctype(df, doc)
else:
create_custom_field(doctype, df)
count += 1
@@ -181,17 +161,23 @@ def toggle_disabling(doc):
frappe.clear_cache(doctype=doctype)
def get_doctypes_with_dimensions():
return frappe.get_hooks("accounting_dimension_doctypes")
doclist = ["GL Entry", "Sales Invoice", "Purchase Invoice", "Payment Entry", "Asset",
"Expense Claim", "Stock Entry", "Budget", "Payroll Entry", "Delivery Note", "Sales Invoice Item", "Purchase Invoice Item",
"Purchase Order Item", "Journal Entry Account", "Material Request Item", "Delivery Note Item", "Purchase Receipt Item",
"Stock Entry Detail", "Payment Entry Deduction", "Sales Taxes and Charges", "Purchase Taxes and Charges", "Shipping Rule",
"Landed Cost Item", "Asset Value Adjustment", "Loyalty Program", "Fee Schedule", "Fee Structure", "Stock Reconciliation",
"Travel Request", "Fees", "POS Profile", "Opening Invoice Creation Tool", "Opening Invoice Creation Tool Item", "Subscription",
"Subscription Plan"]
return doclist
def get_accounting_dimensions(as_list=True):
if frappe.flags.accounting_dimensions is None:
frappe.flags.accounting_dimensions = frappe.get_all("Accounting Dimension",
fields=["label", "fieldname", "disabled", "document_type"])
accounting_dimensions = frappe.get_all("Accounting Dimension", fields=["label", "fieldname", "disabled", "document_type"])
if as_list:
return [d.fieldname for d in frappe.flags.accounting_dimensions]
return [d.fieldname for d in accounting_dimensions]
else:
return frappe.flags.accounting_dimensions
return accounting_dimensions
def get_checks_for_pl_and_bs_accounts():
dimensions = frappe.db.sql("""SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs
@@ -213,32 +199,19 @@ def get_dimension_with_children(doctype, dimension):
return all_dimensions
@frappe.whitelist()
def get_dimensions(with_cost_center_and_project=False):
def get_dimension_filters():
dimension_filters = frappe.db.sql("""
SELECT label, fieldname, document_type
FROM `tabAccounting Dimension`
WHERE disabled = 0
""", as_dict=1)
default_dimensions = frappe.db.sql("""SELECT p.fieldname, c.company, c.default_dimension
FROM `tabAccounting Dimension Detail` c, `tabAccounting Dimension` p
WHERE c.parent = p.name""", as_dict=1)
if with_cost_center_and_project:
dimension_filters.extend([
{
'fieldname': 'cost_center',
'document_type': 'Cost Center'
},
{
'fieldname': 'project',
'document_type': 'Project'
}
])
default_dimensions = frappe.db.sql("""SELECT parent, company, default_dimension
FROM `tabAccounting Dimension Detail`""", as_dict=1)
default_dimensions_map = {}
for dimension in default_dimensions:
default_dimensions_map.setdefault(dimension.company, {})
default_dimensions_map[dimension.company][dimension.fieldname] = dimension.default_dimension
default_dimensions_map.setdefault(dimension['company'], {})
default_dimensions_map[dimension['company']][dimension['parent']] = dimension['default_dimension']
return dimension_filters, default_dimensions_map

View File

@@ -3,18 +3,45 @@
# See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
import unittest
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
test_dependencies = ['Cost Center', 'Location', 'Warehouse', 'Department']
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import delete_accounting_dimension
class TestAccountingDimension(unittest.TestCase):
def setUp(self):
create_dimension()
frappe.set_user("Administrator")
if not frappe.db.exists("Accounting Dimension", {"document_type": "Department"}):
dimension = frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Department",
}).insert()
else:
dimension1 = frappe.get_doc("Accounting Dimension", "Department")
dimension1.disabled = 0
dimension1.save()
if not frappe.db.exists("Accounting Dimension", {"document_type": "Location"}):
dimension1 = frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Location",
})
dimension1.append("dimension_defaults", {
"company": "_Test Company",
"reference_document": "Location",
"default_dimension": "Block 1",
"mandatory_for_bs": 1
})
dimension1.insert()
dimension1.save()
else:
dimension1 = frappe.get_doc("Accounting Dimension", "Location")
dimension1.disabled = 0
dimension1.save()
def test_dimension_against_sales_invoice(self):
si = create_sales_invoice(do_not_save=1)
@@ -74,38 +101,6 @@ class TestAccountingDimension(unittest.TestCase):
def tearDown(self):
disable_dimension()
def create_dimension():
frappe.set_user("Administrator")
if not frappe.db.exists("Accounting Dimension", {"document_type": "Department"}):
frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Department",
}).insert()
else:
dimension = frappe.get_doc("Accounting Dimension", "Department")
dimension.disabled = 0
dimension.save()
if not frappe.db.exists("Accounting Dimension", {"document_type": "Location"}):
dimension1 = frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Location",
})
dimension1.append("dimension_defaults", {
"company": "_Test Company",
"reference_document": "Location",
"default_dimension": "Block 1",
"mandatory_for_bs": 1
})
dimension1.insert()
dimension1.save()
else:
dimension1 = frappe.get_doc("Accounting Dimension", "Location")
dimension1.disabled = 0
dimension1.save()
def disable_dimension():
dimension1 = frappe.get_doc("Accounting Dimension", "Department")
@@ -115,3 +110,5 @@ def disable_dimension():
dimension2 = frappe.get_doc("Accounting Dimension", "Location")
dimension2.disabled = 1
dimension2.save()

View File

@@ -3,10 +3,8 @@
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class AccountingDimensionDetail(Document):
pass

View File

@@ -1,82 +0,0 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Accounting Dimension Filter', {
refresh: function(frm, cdt, cdn) {
if (frm.doc.accounting_dimension) {
frm.set_df_property('dimensions', 'label', frm.doc.accounting_dimension, cdn, 'dimension_value');
}
let help_content =
`<table class="table table-bordered" style="background-color: #f9f9f9;">
<tr><td>
<p>
<i class="fa fa-hand-right"></i>
{{__('Note: On checking Is Mandatory the accounting dimension will become mandatory against that specific account for all accounting transactions')}}
</p>
</td></tr>
</table>`;
frm.set_df_property('dimension_filter_help', 'options', help_content);
},
onload: function(frm) {
frm.set_query('applicable_on_account', 'accounts', function() {
return {
filters: {
'company': frm.doc.company
}
};
});
frappe.db.get_list('Accounting Dimension',
{fields: ['document_type']}).then((res) => {
let options = ['Cost Center', 'Project'];
res.forEach((dimension) => {
options.push(dimension.document_type);
});
frm.set_df_property('accounting_dimension', 'options', options);
});
frm.trigger('setup_filters');
},
setup_filters: function(frm) {
let filters = {};
if (frm.doc.accounting_dimension) {
frappe.model.with_doctype(frm.doc.accounting_dimension, function() {
if (frappe.model.is_tree(frm.doc.accounting_dimension)) {
filters['is_group'] = 0;
}
if (frappe.meta.has_field(frm.doc.accounting_dimension, 'company')) {
filters['company'] = frm.doc.company;
}
frm.set_query('dimension_value', 'dimensions', function() {
return {
filters: filters
};
});
});
}
},
accounting_dimension: function(frm) {
frm.clear_table("dimensions");
let row = frm.add_child("dimensions");
row.accounting_dimension = frm.doc.accounting_dimension;
frm.refresh_field("dimensions");
frm.trigger('setup_filters');
},
});
frappe.ui.form.on('Allowed Dimension', {
dimensions_add: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
row.accounting_dimension = frm.doc.accounting_dimension;
frm.refresh_field("dimensions");
}
});

View File

@@ -1,158 +0,0 @@
{
"actions": [],
"autoname": "format:{accounting_dimension}-{#####}",
"creation": "2020-11-08 18:28:11.906146",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"accounting_dimension",
"disabled",
"column_break_2",
"company",
"allow_or_restrict",
"section_break_4",
"accounts",
"column_break_6",
"dimensions",
"section_break_10",
"dimension_filter_help"
],
"fields": [
{
"fieldname": "accounting_dimension",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Accounting Dimension",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hide_border": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break_6",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "allow_or_restrict",
"fieldtype": "Select",
"label": "Allow Or Restrict Dimension",
"options": "Allow\nRestrict",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Applicable On Account",
"options": "Applicable On Account",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"depends_on": "eval:doc.accounting_dimension",
"fieldname": "dimensions",
"fieldtype": "Table",
"label": "Applicable Dimension",
"options": "Allowed Dimension",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "dimension_filter_help",
"fieldtype": "HTML",
"label": "Dimension Filter Help",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-03 12:04:58.678402",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension Filter",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -1,63 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright, (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
from frappe.model.document import Document
class AccountingDimensionFilter(Document):
def validate(self):
self.validate_applicable_accounts()
def validate_applicable_accounts(self):
accounts = frappe.db.sql(
"""
SELECT a.applicable_on_account as account
FROM `tabApplicable On Account` a, `tabAccounting Dimension Filter` d
WHERE d.name = a.parent
and d.name != %s
and d.accounting_dimension = %s
""", (self.name, self.accounting_dimension), as_dict=1)
account_list = [d.account for d in accounts]
for account in self.get('accounts'):
if account.applicable_on_account in account_list:
frappe.throw(_("Row {0}: {1} account already applied for Accounting Dimension {2}").format(
account.idx, frappe.bold(account.applicable_on_account), frappe.bold(self.accounting_dimension)))
def get_dimension_filter_map():
filters = frappe.db.sql("""
SELECT
a.applicable_on_account, d.dimension_value, p.accounting_dimension,
p.allow_or_restrict, a.is_mandatory
FROM
`tabApplicable On Account` a, `tabAllowed Dimension` d,
`tabAccounting Dimension Filter` p
WHERE
p.name = a.parent
AND p.disabled = 0
AND p.name = d.parent
""", as_dict=1)
dimension_filter_map = {}
for f in filters:
f.fieldname = scrub(f.accounting_dimension)
build_map(dimension_filter_map, f.fieldname, f.applicable_on_account, f.dimension_value,
f.allow_or_restrict, f.is_mandatory)
return dimension_filter_map
def build_map(map_object, dimension, account, filter_value, allow_or_restrict, is_mandatory):
map_object.setdefault((dimension, account), {
'allowed_dimensions': [],
'is_mandatory': is_mandatory,
'allow_or_restrict': allow_or_restrict
})
map_object[(dimension, account)]['allowed_dimensions'].append(filter_value)

View File

@@ -1,106 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from erpnext.accounts.doctype.accounting_dimension.test_accounting_dimension import (
create_dimension,
disable_dimension,
)
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.exceptions import InvalidAccountDimensionError, MandatoryAccountDimensionError
test_dependencies = ['Location', 'Cost Center', 'Department']
class TestAccountingDimensionFilter(unittest.TestCase):
def setUp(self):
create_dimension()
create_accounting_dimension_filter()
self.invoice_list = []
def test_allowed_dimension_validation(self):
si = create_sales_invoice(do_not_save=1)
si.items[0].cost_center = 'Main - _TC'
si.department = 'Accounts - _TC'
si.location = 'Block 1'
si.save()
self.assertRaises(InvalidAccountDimensionError, si.submit)
self.invoice_list.append(si)
def test_mandatory_dimension_validation(self):
si = create_sales_invoice(do_not_save=1)
si.department = ''
si.location = 'Block 1'
# Test with no department for Sales Account
si.items[0].department = ''
si.items[0].cost_center = '_Test Cost Center 2 - _TC'
si.save()
self.assertRaises(MandatoryAccountDimensionError, si.submit)
self.invoice_list.append(si)
def tearDown(self):
disable_dimension_filter()
disable_dimension()
for si in self.invoice_list:
si.load_from_db()
if si.docstatus == 1:
si.cancel()
def create_accounting_dimension_filter():
if not frappe.db.get_value('Accounting Dimension Filter',
{'accounting_dimension': 'Cost Center'}):
frappe.get_doc({
'doctype': 'Accounting Dimension Filter',
'accounting_dimension': 'Cost Center',
'allow_or_restrict': 'Allow',
'company': '_Test Company',
'accounts': [{
'applicable_on_account': 'Sales - _TC',
}],
'dimensions': [{
'accounting_dimension': 'Cost Center',
'dimension_value': '_Test Cost Center 2 - _TC'
}]
}).insert()
else:
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Cost Center'})
doc.disabled = 0
doc.save()
if not frappe.db.get_value('Accounting Dimension Filter',
{'accounting_dimension': 'Department'}):
frappe.get_doc({
'doctype': 'Accounting Dimension Filter',
'accounting_dimension': 'Department',
'allow_or_restrict': 'Allow',
'company': '_Test Company',
'accounts': [{
'applicable_on_account': 'Sales - _TC',
'is_mandatory': 1
}],
'dimensions': [{
'accounting_dimension': 'Department',
'dimension_value': 'Accounts - _TC'
}]
}).insert()
else:
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Department'})
doc.disabled = 0
doc.save()
def disable_dimension_filter():
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Cost Center'})
doc.disabled = 1
doc.save()
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Department'})
doc.disabled = 1
doc.save()

View File

@@ -3,11 +3,9 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe import _
class OverlapError(frappe.ValidationError): pass
@@ -41,11 +39,10 @@ class AccountingPeriod(Document):
frappe.throw(_("Accounting Period overlaps with {0}")
.format(existing_accounting_period[0].get("name")), OverlapError)
@frappe.whitelist()
def get_doctypes_for_closing(self):
docs_for_closing = []
doctypes = ["Sales Invoice", "Purchase Invoice", "Journal Entry", "Payroll Entry", \
"Bank Clearance", "Asset", "Stock Entry"]
"Bank Reconciliation", "Asset", "Stock Entry"]
closed_doctypes = [{"document_type": doctype, "closed": 1} for doctype in doctypes]
for closed_doctype in closed_doctypes:
docs_for_closing.append(closed_doctype)
@@ -58,4 +55,4 @@ class AccountingPeriod(Document):
self.append('closed_documents', {
"document_type": doctype_for_closing.document_type,
"closed": doctype_for_closing.closed
})
})

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Accounting Period", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Accounting Period
() => frappe.tests.make('Accounting Period', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -3,48 +3,44 @@
# See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from frappe.utils import add_months, nowdate
import unittest
from frappe.utils import nowdate, add_months
from erpnext.accounts.general_ledger import ClosedAccountingPeriod
from erpnext.accounts.doctype.accounting_period.accounting_period import OverlapError
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.general_ledger import ClosedAccountingPeriod
test_dependencies = ['Item']
class TestAccountingPeriod(unittest.TestCase):
def test_overlap(self):
ap1 = create_accounting_period(start_date = "2018-04-01",
end_date = "2018-06-30", company = "Wind Power LLC")
ap1.save()
def test_overlap(self):
ap1 = create_accounting_period(start_date = "2018-04-01",
end_date = "2018-06-30", company = "Wind Power LLC")
ap1.save()
ap2 = create_accounting_period(start_date = "2018-06-30",
end_date = "2018-07-10", company = "Wind Power LLC", period_name = "Test Accounting Period 1")
self.assertRaises(OverlapError, ap2.save)
ap2 = create_accounting_period(start_date = "2018-06-30",
end_date = "2018-07-10", company = "Wind Power LLC", period_name = "Test Accounting Period 1")
self.assertRaises(OverlapError, ap2.save)
def test_accounting_period(self):
ap1 = create_accounting_period(period_name = "Test Accounting Period 2")
ap1.save()
def test_accounting_period(self):
ap1 = create_accounting_period(period_name = "Test Accounting Period 2")
ap1.save()
doc = create_sales_invoice(do_not_submit=1, cost_center="_Test Company - _TC", warehouse="Stores - _TC")
self.assertRaises(ClosedAccountingPeriod, doc.submit)
doc = create_sales_invoice(do_not_submit=1, cost_center = "_Test Company - _TC", warehouse = "Stores - _TC")
self.assertRaises(ClosedAccountingPeriod, doc.submit)
def tearDown(self):
for d in frappe.get_all("Accounting Period"):
frappe.delete_doc("Accounting Period", d.name)
def tearDown(self):
for d in frappe.get_all("Accounting Period"):
frappe.delete_doc("Accounting Period", d.name)
def create_accounting_period(**args):
args = frappe._dict(args)
args = frappe._dict(args)
accounting_period = frappe.new_doc("Accounting Period")
accounting_period.start_date = args.start_date or nowdate()
accounting_period.end_date = args.end_date or add_months(nowdate(), 1)
accounting_period.company = args.company or "_Test Company"
accounting_period.period_name = args.period_name or "_Test_Period_Name_1"
accounting_period.append("closed_documents", {
"document_type": 'Sales Invoice', "closed": 1
})
accounting_period = frappe.new_doc("Accounting Period")
accounting_period.start_date = args.start_date or nowdate()
accounting_period.end_date = args.end_date or add_months(nowdate(), 1)
accounting_period.company = args.company or "_Test Company"
accounting_period.period_name =args.period_name or "_Test_Period_Name_1"
accounting_period.append("closed_documents", {
"document_type": 'Sales Invoice', "closed": 1
})
return accounting_period
return accounting_period

View File

@@ -6,46 +6,3 @@ frappe.ui.form.on('Accounts Settings', {
}
});
frappe.tour['Accounts Settings'] = [
{
fieldname: "acc_frozen_upto",
title: "Accounts Frozen Upto",
description: __("Freeze accounting transactions up to specified date, nobody can make/modify entry except the specified Role."),
},
{
fieldname: "frozen_accounts_modifier",
title: "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
description: __("Users with this Role are allowed to set frozen accounts and create/modify accounting entries against frozen accounts.")
},
{
fieldname: "determine_address_tax_category_from",
title: "Determine Address Tax Category From",
description: __("Tax category can be set on Addresses. An address can be Shipping or Billing address. Set which addres to select when applying Tax Category.")
},
{
fieldname: "over_billing_allowance",
title: "Over Billing Allowance Percentage",
description: __("The percentage by which you can overbill transactions. For example, if the order value is $100 for an Item and percentage here is set as 10% then you are allowed to bill for $110.")
},
{
fieldname: "credit_controller",
title: "Credit Controller",
description: __("Select the role that is allowed to submit transactions that exceed credit limits set. The credit limit can be set in the Customer form.")
},
{
fieldname: "make_payment_via_journal_entry",
title: "Make Payment via Journal Entry",
description: __("When checked, if user proceeds to make payment from an invoice, the system will open a Journal Entry instead of a Payment Entry.")
},
{
fieldname: "unlink_payment_on_cancellation_of_invoice",
title: "Unlink Payment on Cancellation of Invoice",
description: __("If checked, system will unlink the payment against the respective invoice.")
},
{
fieldname: "unlink_advance_payment_on_cancelation_of_order",
title: "Unlink Advance Payment on Cancellation of Order",
description: __("Similar to the previous option, this unlinks any advance payments made against Purchase/Sales Orders.")
}
];

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