Compare commits

...

1903 Commits

Author SHA1 Message Date
Nabin Hait
ec2ba6bc1f Merge branch 'version-13-pre-release' into version-13 2021-05-06 19:18:17 +05:30
Nabin Hait
ae18efaa0a bumped to version 13.2.1 2021-05-06 19:38:17 +05:50
Nabin Hait
0e41295c0e perf: Performance enhancement on setup wizard (#25606)
* perf: Performance enhancement on setup wizard

* fix: create departments without updating nsm
2021-05-06 19:14:06 +05:30
Saqib
92cefd5655 feat(pos): ability to retry on pos closing failure (#25604)
* feat(pos): ability to retry on pos closing failure

* fix: sider issues

* fix: sider issues

* fix: mark all queued closing entry as failed

* feat: add headline message
2021-05-06 17:03:16 +05:30
Deepesh Garg
daf6c124a9 fix: Check if payment schedule exists 2021-05-06 16:47:02 +05:30
Deepesh Garg
be66ee9723 fix: Check if payment schedule exits before updating label 2021-05-06 16:46:55 +05:30
Deepesh Garg
a0ed517c85 fix: function call to update payment schedule labels 2021-05-06 16:46:47 +05:30
Nabin Hait
a2fcca85a5 fix: Fixed merge conflict 2021-05-01 14:53:13 +05:30
Nabin Hait
d8cd5a95cb bumped to version 13.2.0 2021-05-01 15:12:44 +05:50
Nabin Hait
3c788f0325 chore: Add release note for v13.2.0 2021-05-01 14:42:30 +05:30
rohitwaghchaure
2e38f1514f fix: stock ledger entry created against draft stock entry (#25539) 2021-05-01 13:53:46 +05:30
Afshan
1fd1e2bb60 fix: fieldname when updating docfield property (#25517) 2021-04-30 18:41:26 +05:30
Afshan
5a4615fd4e fix: allow to cancel loan with cancelled replayment entry (#25508) 2021-04-30 18:40:43 +05:30
Nabin Hait
a19c6a9278 fix: Fetch total stock at company in PO (#25533) 2021-04-30 18:38:49 +05:30
Deepesh Garg
89120695a6 Merge pull request #25529 from deepeshgarg007/psoa_fixes_v13_pre_release
fix: Ageing errors in PSOA
2021-04-30 16:33:26 +05:30
Deepesh Garg
88d40e8dc4 fix: Remove extra space 2021-04-30 15:33:33 +05:30
Deepesh Garg
1deef5229e fix: Linting and translation issues 2021-04-30 15:20:55 +05:30
Deepesh Garg
bd5ee7d725 fix: Use party account currency 2021-04-30 15:20:45 +05:30
Deepesh Garg
9cbca06f4e fix: Updated filters for process statement of accounts 2021-04-30 15:20:31 +05:30
Deepesh Garg
303f6d2d36 Merge branch 'version-13-pre-release' of https://github.com/frappe/erpnext into psoa_fixes_v13_pre_release 2021-04-30 15:17:07 +05:30
Deepesh Garg
178938b2f0 fix: Ageing errors in PSOA 2021-04-30 15:14:24 +05:30
Deepesh Garg
3d9fa2b8de Merge pull request #25528 from Anuja-pawar/fix_allocated_amt_pre_release
fix: update allocated amount after paid amount is changed in PE version13 pre release
2021-04-30 14:42:18 +05:30
Anuja P
435e93bda9 fix: allocated amount change wrt paid amount change 2021-04-30 13:52:48 +05:30
Deepesh Garg
1ec53c1cf2 Merge pull request #25518 from nextchamp-saqib/payment-term-amount-currency-fix-v13
fix: payment amount showing in foreign currency
2021-04-30 11:09:58 +05:30
Saqib Ansari
3e83542360 fix: sider issues 2021-04-29 18:12:47 +05:30
Saqib
2bde1baa38 fix: remove print statement 2021-04-29 18:12:42 +05:30
Saqib Ansari
6dd1c5cf92 refactor: remove extra fields 2021-04-29 18:12:36 +05:30
Saqib Ansari
3a5ecb7587 fix: test 2021-04-29 18:12:32 +05:30
Saqib Ansari
973afeac3c feat: set dynamic labels for payment schedule fields 2021-04-29 18:12:27 +05:30
Saqib Ansari
a91eebf6aa feat: base payment amount in payment schedule 2021-04-29 18:12:23 +05:30
Saqib Ansari
e70d9c925c fix: payment amount showing in foreign currency 2021-04-29 18:12:17 +05:30
Nabin Hait
f085c89994 Merge branch 'version-13-hotfix' into version-13 2021-04-27 20:08:01 +05:30
Nabin Hait
3e5c6424ed bumped to version 13.1.1 2021-04-27 20:28:01 +05:50
Rucha Mahabal
a86a51f020 fix(HR): Permission error while adding weekly holidays (#25450) 2021-04-27 20:01:49 +05:30
Saqib
7b3dd3585b fix: unexpected keyword argument 'merge_logs' (#25489)
* fix: unexpected keyword arguement 'merge_logs'

* fix: reference error

* fix: test
2021-04-27 20:01:08 +05:30
Nabin Hait
2ddca77243 Merge branch 'develop' into version-13-pre-release 2021-04-26 21:12:07 +05:30
Saqib
b643776c53 feat(e-invoicing): auto calculate distance for e-way bill generations (#25480) 2021-04-26 17:12:20 +05:30
Rucha Mahabal
1608658700 Merge pull request #25209 from NagariaHussain/employee-util-report
feat: Employee Hours Utilization Report
2021-04-26 17:04:35 +05:30
Saqib
34ce4edf29 fix: cannot scan spacebar character in pos (#25479) 2021-04-26 16:38:57 +05:30
Rucha Mahabal
d5ca9474ce fix: add employee name in report data 2021-04-26 16:10:06 +05:30
Rucha Mahabal
926a9aed58 Merge branch 'develop' into employee-util-report 2021-04-26 16:03:39 +05:30
Rucha Mahabal
7a84d76489 fix: tests 2021-04-26 16:03:10 +05:30
Ankush Menat
9178d95cca fix: can not create item variants (#25433)
* fix: item_code assigned to function returning None

* fix: ignore has_variants and attributes in variant

* fix: patch to remove has_variants and attributes

* chore: fix whitespace in translation
2021-04-26 15:37:17 +05:30
Jannat Patel
616f1d3624 fix: issue in project custom status (#25452) 2021-04-26 15:35:49 +05:30
Sagar Vora
71342320ce fix(Italy): multiple fixes in import supplier invoice (#25466)
* fix(Italy): remove incorrect method, use defined variable

* fix: show attach section after save; use db_set
2021-04-26 15:32:28 +05:30
Ankush Menat
c2de4f6b35 chore: update snyk (#25477) 2021-04-26 15:28:17 +05:30
Deepesh Garg
4c8d15b487 fix: Incorrect GL Entry validation (#25474)
* fix: Incorrect GL Entry validation

* fix: Add validation for party accounts

* fix: Scrub labels

* fix: Translation
2021-04-26 15:24:34 +05:30
Deepesh Garg
ab7664e595 Merge pull request #25444 from deepeshgarg007/gstr_backward_compatiability
fix: Backward compatibility for GSTR-1 report
2021-04-26 15:09:55 +05:30
Deepesh Garg
cac3fd3a24 Merge pull request #25460 from Anuja-pawar/fix_allocated_amt_in_PE
fix: to update Allocated amount after Paid Amount is changed in PE
2021-04-26 13:29:17 +05:30
Rucha Mahabal
4716ebea5a feat: Add % Utilization (Billed Only)
- Added billed utilization metric in report summary
2021-04-26 11:40:26 +05:30
Anuja Pawar
fee9a56d4e Merge branch 'develop' into fix_allocated_amt_in_PE 2021-04-26 11:36:10 +05:30
Anuja P
802518b8ac Merge branch 'fix_allocated_amt_in_PE' of https://github.com/Anuja-pawar/erpnext into fix_allocated_amt_in_PE 2021-04-26 11:34:33 +05:30
Anuja P
f74d8d2e16 fix: suggested changes 2021-04-26 11:31:51 +05:30
Rucha Mahabal
2a1a472371 chore: clean-up
- set default date filters for last month instead of year

- added abbreviations for columns to use them in the metrics labels
2021-04-26 11:18:32 +05:30
Shadrak Gurupnor
b9d4719285 fix: circular loop in project task (#25454)
* fix: circular loop in project task
2021-04-26 11:14:07 +05:30
Rucha Mahabal
0decc2b66a fix: validate Standard Working Hours
- use standard working hours in metrics calculation
2021-04-26 11:00:54 +05:30
Rucha Mahabal
b7a7e1b11a Merge branch 'develop' into employee-util-report 2021-04-26 10:25:42 +05:30
Rucha Mahabal
9d6520d4a7 Merge pull request #24944 from pateljannat/profitability-report
feat: Project Profitability Report
2021-04-26 10:02:36 +05:30
Rucha Mahabal
e939da982e Merge branch 'develop' into profitability-report 2021-04-26 09:17:12 +05:30
Rucha Mahabal
2a25c7505e fix: report column widths 2021-04-25 20:29:14 +05:30
Walstan Baptista
4a805b5622 chore: frappe.whitelist for doc methods (#25465) 2021-04-24 14:23:08 +05:30
Anuja Pawar
dc215ec08d Merge branch 'develop' into fix_allocated_amt_in_PE 2021-04-23 22:06:15 +05:30
Rucha Mahabal
e63f3b2f36 fix: standard working hours message and link for HR Settings 2021-04-23 20:33:42 +05:30
Rucha Mahabal
184317d5bd fix(HR): Permission error while adding weekly holidays (#25450) 2021-04-23 20:03:50 +05:30
Anuja P
dc599e0164 fix: to update Allocated amount after Paid Amount is changed 2021-04-23 19:24:53 +05:30
gavin
1b1c1bcbd0 Merge pull request #25455 from revant/docs-docker-readme
docs: add docker repo link in README
2021-04-23 16:31:41 +05:30
gavin
62d2df5815 docs: Add Frappe reference in Containerized Install section 2021-04-23 16:31:13 +05:30
Revant Nandgaonkar
68b514b1f5 docs: add docker repo link in README 2021-04-23 13:06:13 +05:30
Rucha Mahabal
373e248e9f fix(patch): lab module patch fix (#25447) (#25449)
* fix(patch): lab module patch fix

* fix: param

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

Co-authored-by: Anoop <3326959+akurungadam@users.noreply.github.com>
2021-04-22 22:47:39 +05:30
Anoop
c21ce42559 fix(patch): lab module patch fix (#25447)
* fix(patch): lab module patch fix

* fix: param

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-04-22 22:44:44 +05:30
Deepesh Garg
eed60bf035 fix: Backward compatibility for GSTR-1 report 2021-04-22 17:11:22 +05:30
pateljannat
84ef7419da fix: sider 2021-04-22 16:31:16 +05:30
Saqib
3d4acf9e5c fix: permission error after submitting exchange rate revaluation (#25432) 2021-04-22 16:16:03 +05:30
Rucha Mahabal
e3b8057eb4 fix: Laboratory Module patch (#25431) 2021-04-22 16:11:17 +05:30
Rucha Mahabal
3847452b60 fix: Laboratory Module patch (#25436) 2021-04-22 16:11:01 +05:30
pateljannat
2004fec8eb fix: removed multicurrency 2021-04-22 14:52:36 +05:30
Saqib
19b73968d7 fix(pos): validations & minor ui issues (#25351)
* fix: pos print format

* fix: stock validation on pos invoice creation
2021-04-22 13:38:20 +05:30
pateljannat
ba6ad7f5be fix: escape for format and msg for working hours if not set 2021-04-22 11:19:44 +05:30
Mohammad Hasnain Mohsin Rajan
7f932cfb30 fix: display reconcile tool when closing balance 0 (#25417)
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-04-22 04:53:09 +05:30
Alan
157b388209 fix: change subcontracted item display (#25425) 2021-04-21 21:00:22 +05:30
pateljannat
485464d1f4 fix: added back a hook 2021-04-21 18:04:58 +05:30
Nabin Hait
db76612462 Merge branch 'version-13-pre-release' into version-13 2021-04-21 12:34:49 +05:30
Nabin Hait
29d4ac13ac Merge branch 'version-13' into develop 2021-04-21 12:34:49 +05:30
Nabin Hait
c3b7c1b998 bumped to version 13.1.0 2021-04-21 12:54:49 +05:50
pateljannat
a92560d79f Merge branch 'profitability-report' of https://github.com/pateljannat/erpnext into profitability-report 2021-04-21 12:32:31 +05:30
pateljannat
039a5a829d fix: dynamic values for tests 2021-04-21 12:32:25 +05:30
Nabin Hait
cb92ead061 fix: Added Change Log 2021-04-21 11:22:35 +05:30
Jannat Patel
d106db60ad Merge branch 'develop' into profitability-report 2021-04-21 09:10:49 +05:30
Deepesh Garg
e7895cea71 Merge pull request #25393 from deepeshgarg007/loan_manager_amend
fix: Add amend perm for loan and system manager for loan doctypes
2021-04-20 22:21:52 +05:30
Deepesh Garg
6d88cf9ede Merge branch 'develop' into loan_manager_amend 2021-04-20 19:08:31 +05:30
pateljannat
cbdcfb4873 fix: multicurrency 2021-04-20 17:53:41 +05:30
Syed Mujeer Hashmi
704ec132b7 feat:Inpatient Occupancy Table Editable for Healthcare Admin (#24989)
Make Admitted datetime and  Discharge Datetime editable along with
Inaptient Occupancy Service Unit, Check_In and Check_out time.

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-04-20 16:39:46 +05:30
gavin
59a2ebd2f4 Merge pull request #25156 from Alchez/feat-py3-dependencies
feat: manage Python 3 compatiblity with dependencies
2021-04-20 15:38:29 +05:30
Rohan Bansal
524b81abd9 feat: manage Python 3 compatiblity with dependencies 2021-04-20 14:13:55 +05:30
Marica
0278646fd8 fix: Cashier query in POS Opening/Closing Entry (#25399) 2021-04-20 12:53:33 +05:30
Marica
125c3d64a9 fix: Cashier query in POS Opening/Closing Entry (#25398) 2021-04-20 12:53:22 +05:30
Marica
b91fcbd70e fix: Ignore Customer Group Perm on AlL Products page (#25396) 2021-04-19 22:21:07 +05:30
Marica
846200d069 fix: Ignore Customer Group Perm on AlL Products page (#25397) 2021-04-19 22:20:01 +05:30
Rucha Mahabal
c221682373 fix: Bulk Salary Structure Assignment (#25389) 2021-04-19 21:11:27 +05:30
Rucha Mahabal
923fb008c7 fix: remove non-standard module cards from Home Workspace (#25391) 2021-04-19 21:09:47 +05:30
Deepesh Garg
047044f975 fix: Add amend perm for loan and system manager for loan doctypes 2021-04-19 18:27:37 +05:30
pateljannat
73896ce94c fix: conflicts 2021-04-19 16:50:39 +05:30
pateljannat
3b54b1e975 fix: report name and columns 2021-04-19 16:49:28 +05:30
Rucha Mahabal
5d7f7094d6 Merge branch 'develop' into employee-util-report 2021-04-19 16:24:55 +05:30
Hussain Nagaria
1f8326bb1f chore: Add Report to Dashboard 2021-04-19 16:19:13 +05:30
Deepesh Garg
cb718fce88 feat: Role to allow over billing, delivery, receipt (#24854)
* feat: Role to allow  over billing, delivery, receipt

* fix: Typo
2021-04-19 13:25:15 +05:30
Rakshith N
ceba5774be fix(pos): special character scanning in point of sale (#25353)
Co-authored-by: rakshith.n <rakshith.n@promantia.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-04-19 13:21:49 +05:30
Afshan
632166a933 fix: make filters for payroll entry (#25386) 2021-04-19 12:58:27 +05:30
Ankush Menat
edf3dfa5a4 fix: commit leave_allocation change to db (#25382) (#25383) 2021-04-19 12:47:41 +05:30
Jannat Patel
119b27b97f feat: Delayed Tasks Summary (#25024)
* feat: delayed deliverables summary

* fix: sider

* fix: renamed to delayed tasks

* fix: renamed test

* fix: test

* fix: sider

* fix: dates, validations and chart

* fix: space and column width

* feat: Sort tasks by descending order of delay

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-04-19 12:46:14 +05:30
Alan
ac8a467b0a fix: exclude spurious Stock Entry Types from 'consumed' calculation (#25352)
* fix: exclude spurious 'Stock Entry Type's from 'consumed' calculation

* fix: filter using purpose, make requested changes

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-04-19 12:38:25 +05:30
Ankush Menat
6c88ab07c7 fix: commit leave_allocation change to db (#25382) 2021-04-19 11:51:46 +05:30
Afshan
b6d2106184 fix: available employee for selection (#25378)
* fix: available employee for selection

* fix: available employee for selection

fix: available employee for selection
2021-04-19 11:48:43 +05:30
Afshan
9c9907cf8e fix: available employee for selection (#25377)
* fix: available employee for selection

* fix: available employee for selection

fix: available employee for selection
2021-04-19 11:48:28 +05:30
Marica
e8bc912ffc perf: Fetching exchange rate on every line item slows down PO (#25345)
* fix: Dont fetch exchange rates for each line item once fetched at parent
`

* perf: Use price list conversion rate from parent

- If price list conversion rate exists in args already from earlier call, use that
- `get_price_list_currency_and_exchange_rate` wont be called for each child row

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-19 11:05:21 +05:30
Jannat Patel
dcdd3bebbe feat: Timer in LMS Quiz (#24246)
* feat: new fields in quiz doctypes

* feat: timer in lms quiz

* fix: variable initialisation

* fix: context, exception fix

* fix:sider

* fix:sider

* fix: indentation

* fix: timer

* fix: sider

* fix: return value and format

* fix: show time taken only after all attempts are over

* fix: sider

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-04-19 10:36:40 +05:30
Ankush Menat
7eac4a250d fix: functions using mutable defaults (#25370) 2021-04-19 10:33:39 +05:30
Saqib
e782531529 fix: Apply single transaction threshold on net_total instead of supplier credit amount (#25243)
* fix: Apply single transaction threshold on net_total instead of supplier credit amount

* fix: Apply single transaction threshold on net_total instead of supplier credit amount

* fix: test

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-19 10:15:51 +05:30
Deepesh Garg
1e0d22a38f Merge pull request #24805 from alyf-de/improve_taxes_setup
refactor: Setup Taxes and Charges
2021-04-19 09:12:47 +05:30
Raffael Meyer
9ee6e4feb8 Merge branch 'develop' into improve_taxes_setup 2021-04-18 18:34:41 +02:00
barredterra
d397bb1b74 Merge branch 'improve_taxes_setup' of https://github.com/alyf-de/erpnext into improve_taxes_setup 2021-04-18 18:34:02 +02:00
barredterra
80d44cada4 fix: remove is_default from country wise tax 2021-04-18 18:33:34 +02:00
rohitwaghchaure
4ed5d994a4 Merge pull request #25374 from ankush/shipment_status_update
fix: commit  changes to shipment status in database
2021-04-18 17:56:22 +05:30
Ankush Menat
c28fcba779 ci(semgrep): add correctness rule for on_cancel
Changes done to doctype object in `on_submit` are not commited to
database. Add rule to catch similar bugs.
2021-04-18 13:22:19 +05:30
Ankush Menat
e972ceb798 fix: patch for updating shipment status 2021-04-18 13:22:19 +05:30
Ankush Menat
9229ee1745 fix: update shipment status in database
Caught by semgrep rule:
https://github.com/frappe/erpnext/blob/develop/.github/helper/semgrep_rules/frappe_correctness.yml#L4
2021-04-18 13:22:19 +05:30
rohitwaghchaure
72e3a81878 Merge pull request #25375 from ankush/minor_semgrep_fixes
fix: remove duplicate keys from dictionaries
2021-04-18 13:04:00 +05:30
Raffael Meyer
ef4c494b2b Merge branch 'develop' into improve_taxes_setup 2021-04-17 19:38:36 +02:00
barredterra
476fff149b Merge branch 'develop' into improve_taxes_setup 2021-04-17 18:41:31 +02:00
Ankush Menat
ad6a2657ae chore: minor translation fixes 2021-04-17 16:56:09 +05:30
Ankush Menat
dedf2c1b61 fix: remove duplicate keys from dictionaries 2021-04-17 16:56:08 +05:30
Saqib
75e13f7bb6 fix(e-invoicing): add company validation for e-invoicing (#25348)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-17 15:38:47 +05:30
Saqib
18c7815a1b fix: presentation currency in statement of accounts (#25367) 2021-04-17 15:37:40 +05:30
rohitwaghchaure
fbc0d16d8b Merge pull request #25372 from ankush/eq_assignment_fix
fix: equality check instead of assignment in cart
2021-04-17 13:43:54 +05:30
rohitwaghchaure
1254af502b Merge pull request #25362 from anupamvs/disable_rounded_total
feat: added Disable Rounded Total in sales transactions
2021-04-17 13:30:24 +05:30
Ankush Menat
d6be154ac2 fix: implicit string concatenation (#25371)
* fix: implicit string concatenations

* chore: rerun healthcare patch for company fields
2021-04-16 22:08:44 +05:30
Ankush Menat
67e647232c ci(semgrep): Add semgrep testing (#24871)
Adds semgrep testing in CI.

Refer to:
- https://github.com/frappe/frappe/pull/12524
- https://github.com/frappe/frappe/pull/12577
2021-04-16 21:44:49 +05:30
Ankush Menat
adf974810d fix: equality check instead of assignment in cart 2021-04-16 21:15:50 +05:30
Saqib
36247faf1a fix(e-invoicing): add company validation for e-invoicing (#25349)
* fix(e-invoicing): add company validation for e-invoicing

* fix: test
2021-04-16 18:45:19 +05:30
Nabin Hait
eeece59a17 Merge branch 'develop' into disable_rounded_total 2021-04-16 18:44:17 +05:30
Marica
ede339f80b fix: Serial No not updated correctly via Inter Company Stock Transfer (#25006)
* fix: Serial No not updated correctly via Inter Company Stock Transfer

* chore: Added More Test Cases for inter company Serial Transfer

* fix: Test for serial no duplication

- fixed serial no test
- made errors more meaningful on serial no validation

* fix: Stock Reco Test

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-04-16 18:42:54 +05:30
Jannat Patel
b1aad63a99 fix: leave policy in leave allocation (#25334)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-04-16 16:08:22 +05:30
Hussain Nagaria
2399e84052 Merge branch 'employee-util-report' of https://github.com/NagariaHussain/erpnext into employee-util-report 2021-04-16 15:41:25 +05:30
Hussain Nagaria
f1b4ce7430 feat: Add filtering by department
Also:

- Add department filter to js
- Add department column to report
- Fetch only those timesheets which have an Employee Linked
- Update unit tests
2021-04-16 15:36:43 +05:30
Anupam
9d9c256e70 feat: added Disable Rounded Total in sales transactions 2021-04-16 00:11:40 +05:30
Afshan
4b496b65b7 fix: filter for employees in salary slip (#25361) 2021-04-15 23:53:12 +05:30
Afshan
c0db286dc1 fix: filter for employees in salary slip (#25360) 2021-04-15 23:48:25 +05:30
Ankush Menat
799b3c26a4 Merge pull request #25359 from 18alantom/fix_shipment_pickup_to
fix: shipment pickup_to, pickup_from functionality.
2021-04-15 21:16:24 +05:30
Ankush Menat
5207edc188 Merge branch 'develop' into fix_shipment_pickup_to 2021-04-15 21:01:52 +05:30
18alantom
6179cc1311 fix: make pickup_to and pickup_from mandatory fields 2021-04-15 20:36:28 +05:30
18alantom
597bb8be18 fix: remove pickup_to, pickup_from and get_pickup_time
relies on server-side validation instead js controller
2021-04-15 20:32:45 +05:30
Rucha Mahabal
56c428663f fix: Additional Salary component amount not getting set (#25356) 2021-04-15 18:54:38 +05:30
Rucha Mahabal
39b1cd827a fix: Additional Salary component amount not getting set (#25355) 2021-04-15 18:54:29 +05:30
rohitwaghchaure
72929aab38 Merge pull request #24878 from anupamvs/planning
feat: add total available stock field in PO
2021-04-15 16:28:49 +05:30
Sun Howwrongbum
c50fbc6897 fix: list lookup with undefined variable (#25210)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-04-15 14:52:13 +05:30
rohitwaghchaure
640b5e00ce Merge pull request #25152 from ankush/customer_duplicates
fix: disable auto naming of customer during import
2021-04-15 14:46:11 +05:30
rohitwaghchaure
1bdc457777 Merge pull request #25304 from ankush/fix_sl_rounding
fix(stock_ledger): round off values near to zero
2021-04-15 14:44:09 +05:30
Saqib
593071bd53 fix: currency symbol in bank transaction list view (#25336) 2021-04-15 14:12:11 +05:30
Anupam Kumar
ee0dda6ba5 Merge branch 'develop' into planning 2021-04-15 12:48:25 +05:30
Marica
61f5f36c65 Merge pull request #24910 from AndyOverLord/patch-8
fix: copy_parent_value_in_all_row function error
2021-04-14 19:04:23 +05:30
Marica
f045fde9f4 Merge branch 'develop' into patch-8 2021-04-14 18:56:15 +05:30
Marica
24e45163d5 fix: Sider 2021-04-14 18:53:15 +05:30
Ganga Manoj
c4565651ff fix: Let Administrator delete company transactions (#25300)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-14 17:11:36 +05:30
Saqib
b54cc7c7f5 fix: pos print receipt (#25330) 2021-04-14 15:09:11 +05:30
Saqib
d4fd1038dc fix: pos print receipt (#25329) 2021-04-14 15:07:10 +05:30
Saqib
8798f30808 fix: pos print receipt (#25328) 2021-04-14 15:05:33 +05:30
rohitwaghchaure
ac6facda3d Merge pull request #25186 from rohitwaghchaure/fixed-incorrect-batch-selected-in-purchase-rceipt-develop
fix: incorrect batch picked in subcontracted purchase receipt
2021-04-14 14:35:12 +05:30
rohitwaghchaure
3d9d4e03de Merge pull request #25145 from rohitwaghchaure/fixed-incorrect-incoming-rate-for-sales-return-issue-develop
fix: incorrect incoming rate for the sales return
2021-04-14 14:34:46 +05:30
Nabin Hait
2535fe9b1e fix: Resolved merge conflict 2021-04-14 13:09:50 +05:30
Nabin Hait
b77793763a Merge branch 'version-13-pre-release' into version-13 2021-04-14 12:53:53 +05:30
Nabin Hait
88b3c52533 bumped to version 13.0.2 2021-04-14 13:13:53 +05:50
Nabin Hait
ece4c16d8f chore: Added change log 2021-04-14 12:53:25 +05:30
rohitwaghchaure
3f6ba12344 Merge pull request #24408 from rohitwaghchaure/custom-user-type-feat
feat: Employee Self Service
2021-04-14 11:54:25 +05:30
Nabin Hait
90df99e470 Merge branch 'develop' into fixed-incorrect-incoming-rate-for-sales-return-issue-develop 2021-04-14 11:23:25 +05:30
Nabin Hait
5931931c93 Merge branch 'develop' into customer_duplicates 2021-04-14 11:23:12 +05:30
Nabin Hait
f7441c4c0a Merge branch 'develop' into fixed-incorrect-batch-selected-in-purchase-rceipt-develop 2021-04-14 11:23:00 +05:30
Nabin Hait
b7b35734a7 Merge branch 'develop' into employee-util-report 2021-04-14 11:22:51 +05:30
Deepesh Garg
e2dc102bc6 fix: Zero amount completed delivery notes being shown in Sales Invocie get items (#25317) 2021-04-14 11:21:11 +05:30
Deepesh Garg
b67058869a fix: Round off final tax amount instead of current tax amount (#25188)
* fix: Round off final tax amount instead of current tax amount

* fix: Syntax error

* fix: Indentation

* fix: Round Off taxes order execution

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-14 11:20:27 +05:30
Deepesh Garg
b717420842 fix: Role to override maintain same rate check in transactions (#25193)
* feat: configurable action if the same purchase/selling rate is not maintained

* fix: Role to override maintain same rate check in transactions

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-04-14 10:43:45 +05:30
Nabin Hait
dd02b5abf1 Merge branch 'develop' into fix_sl_rounding 2021-04-14 10:36:40 +05:30
rohitwaghchaure
ce6c3b5b74 fix: incorrect incoming rate for the sales return (#25306) 2021-04-13 20:55:52 +05:30
Rohit Waghchaure
a8f78fabfd fix: patch failing while migrating from v7 to v13 2021-04-13 18:51:21 +05:30
Rohit Waghchaure
610ccd4c03 fix: modified permission 2021-04-13 18:51:21 +05:30
Rohit Waghchaure
03635fb0c4 feat: ESS User 2021-04-13 18:51:21 +05:30
Saqib
dbb76a7d00 fix(e-invoicing): validations & tax calculation fixes (#25314)
* fix: GST on freight charge in e-invoicing

* feat(india): bulk e-invoice generation (#24969)

* fix: cannot fetch e invoice settings

* fix: patch condition (#25301)

* fix: patch condition

* fix: except einvoice loading error seperately

* fix: json.loads error

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2021-04-13 18:49:03 +05:30
Deepesh Garg
ca412d37c8 Merge pull request #25290 from deepeshgarg007/gstr_1_taxable_value_update
fix: Taxable value including Freight and Forwarding charges in GSTR-1 Report
2021-04-13 17:49:56 +05:30
Nabin Hait
10c61376e3 fix: Backport missing commits to develop branch (#25305) 2021-04-13 15:46:01 +05:30
Marica
1f9d231acf Merge branch 'develop' into patch-8 2021-04-13 15:43:46 +05:30
Deepesh Garg
2fe3056fa2 Merge pull request #24993 from frappe/ishanloya-regional
Correct state code for 'Other Territory'
2021-04-13 15:37:29 +05:30
Deepesh Garg
9aad73b9f0 Merge pull request #25195 from ankush/use_isinstance_instead_of_type
fix: broken type check in stock ageing report
2021-04-13 15:24:53 +05:30
Deepesh Garg
0dcb48a6ee Merge pull request #25167 from ankush/escape_sql_credit_report
fix: escape sql filters in credit report
2021-04-13 15:24:15 +05:30
Deepesh Garg
3db8ba2d4a Merge pull request #25033 from anupamvs/se-add-to-transit
fix: unable to submit stock entry
2021-04-13 14:59:54 +05:30
Deepesh Garg
c05f4ee1aa Merge pull request #25082 from AfshanKhan/add-blank-for-status-issue-reports
fix: added blank option for status in report related to issue
2021-04-13 14:59:01 +05:30
Deepesh Garg
bb92929048 Merge pull request #25256 from nextchamp-saqib/italy-e-invoicing
feat(italy): add document type field for e-invoicing
2021-04-13 13:48:21 +05:30
Suraj Shetty
36083ff36c Merge pull request #25310 from rmehta/grid-field-fix 2021-04-13 12:40:27 +05:30
Suraj Shetty
82d0a1a13e style: Add missing semicolons
- & make formatting consistent
2021-04-13 12:35:42 +05:30
Rushabh Mehta
ff935b4586 fix(minor): fix dynamically changing grid properties 2021-04-13 12:09:36 +05:30
Rushabh Mehta
3c58fd4d5e fix(minor): fix dynamically changing grid properties 2021-04-13 12:05:10 +05:30
Rushabh Mehta
65f25c27b3 fix(minor): fix dynamically changing grid properties 2021-04-13 11:58:16 +05:30
Abdullah Abouzekry
20140425c8 fix: sales order not saving due type mismatch in promo scheme (#24748) (#25222) 2021-04-13 11:36:39 +05:30
Deepesh Garg
1f49335335 Merge branch 'develop' into gstr_1_taxable_value_update 2021-04-13 10:29:52 +05:30
Ankush Menat
34d00772e7 Merge pull request #25303 from ankush/fix_bom_test
test: ignore floating point errors in test_bom
2021-04-12 20:34:10 +05:30
Ankush Menat
6a014d12c1 fix(stock_ledger): round off values near to zero 2021-04-12 20:21:27 +05:30
Ankush Menat
c65751d97f test: ignore floating point errors in test_bom 2021-04-12 19:45:34 +05:30
Saqib
a19c98255f fix: patch condition (#25301) 2021-04-12 19:02:28 +05:30
Saqib
9320316462 feat(india): bulk e-invoice generation (#24969) 2021-04-12 17:55:46 +05:30
Andy Zhu
bffe933c22 Fix: attempts to add overrides function
Overrides parent_fieldname in outer form to all child rows's fieldname
2021-04-12 22:49:26 +12:00
rohitwaghchaure
913845e4ce Merge pull request #25295 from rohitwaghchaure/changed-scheduler-check-time-pre
fix: update scheduler check time
2021-04-12 16:15:33 +05:30
rohitwaghchaure
5e8ec48e7f Merge pull request #25294 from rohitwaghchaure/changed-scheduler-check-time
fix: update scheduler check time
2021-04-12 16:12:13 +05:30
Rohit Waghchaure
bda4c5cc52 fix: update scheduler check tim 2021-04-12 16:11:52 +05:30
Rohit Waghchaure
2339de7333 fix: update scheduler check tim 2021-04-12 16:09:55 +05:30
Deepesh Garg
719e0c1e60 fix: Taxxable value including Freight and Forwarding charges in GSTR-1 Report 2021-04-12 14:37:43 +05:30
Ankush Menat
53ce877ad9 Merge branch 'develop' into escape_sql_credit_report 2021-04-12 14:37:31 +05:30
Saqib
49336b8065 fix: consolidated sales invoice posting date (#25119) 2021-04-12 12:17:50 +05:30
Prssanna Desai
1fd1e0d4e9 Merge pull request #25287 from prssanna/invoice-timesheet-fix
fix: declare data before assigning
2021-04-12 12:07:29 +05:30
prssanna
42f4a00c88 fix: declare data before assigining 2021-04-12 12:01:20 +05:30
Marica
be26e59087 Merge pull request #25196 from noahjacob/UX
fix: Company field in Warehouse
2021-04-12 11:08:45 +05:30
Deepesh Garg
5f3d7f547c fix: Item wise tax rate for consolidated POS invoice (#25029)
* fix: Item wise tax rate for consolidated POS invoice

* fix: Do not alter item wise taxes for consolidated invoices

* fix: Add test case

* fix: Update

* fix: Set opening stock for test item

* fix: Add valuation rate for opening stock
2021-04-12 10:56:47 +05:30
Deepesh Garg
c36e48a869 fix: GST on freight charge in e-invoicing (#25000)
* fix: GST on freight charge in e-invocing

* fix: Add patch for taxable value field

* fix: Handle discounts on net total

* fix: Handle all types of discounts for e-invoicing

* fix: Absolute taxable values

* fix: Use correct tax amount
2021-04-12 10:55:43 +05:30
Marica
99522252c4 Merge branch 'develop' into UX 2021-04-12 10:51:24 +05:30
Anupam Kumar
9f73bd8040 fix: don't delete mode of payment account details while deleting company transactions (#25217) 2021-04-12 10:31:36 +05:30
Saqib
b8a270074e fix(pos): cannot set qty to less than zero (#25258) 2021-04-12 10:28:05 +05:30
Anoop
207166fe8b fix(patch): copy Lab Test / Template renamed field values (#25276)
reload_doc doctypes introduced since v11
2021-04-12 10:25:34 +05:30
Ankush Menat
d235fc75ad fix: remove nonexistent method from pick list (#25279)
This method is merged in calculate_rate_and_amount() during repost item
valuation refactoring.

Ref:
e10f0a5a6c (diff-a160e3a8907dcdf28ce7728bb7dd45914ad8ab033489ea3de4c80fb1c4ca7fe9)
2021-04-12 10:23:06 +05:30
Deepesh Garg
4d4d7074d0 Merge pull request #25053 from deepeshgarg007/delivery_note_gst_category
fix: Add GST category field in Delivery Note
2021-04-10 22:12:42 +05:30
Deepesh Garg
1466e2d758 Merge pull request #25271 from deepeshgarg007/loan_penalty_new_fix
fix: Consider paid repayment entries in subsequent loan repayments
2021-04-10 21:00:46 +05:30
Deepesh Garg
81ecd0b8b6 Merge branch 'develop' of https://github.com/frappe/erpnext into delivery_note_gst_category 2021-04-10 20:54:38 +05:30
Deepesh Garg
b58590251b fix: minor improvements and tests 2021-04-10 19:55:36 +05:30
rohitwaghchaure
5899477cbb Merge pull request #25015 from rohitwaghchaure/fixed-patch-item-reposting-for-incorrect-sl-and-gl-develop
fix: patch
2021-04-10 18:58:44 +05:30
Raffael Meyer
dc9ef51d97 Merge branch 'develop' into improve_taxes_setup 2021-04-10 15:09:41 +02:00
Deepesh Garg
f38a653a08 fix: Show exact error message in datetime 2021-04-10 18:34:51 +05:30
Deepesh Garg
e7efbc1d33 Merge branch 'develop' of https://github.com/frappe/erpnext into loan_penalty_new_fix 2021-04-10 18:33:38 +05:30
Deepesh Garg
37d6c19a34 fix: Consider paid repayment entries in subsequent loan repayments 2021-04-10 18:33:26 +05:30
Deepesh Garg
8a01dbe8e1 Merge pull request #25261 from ankush/issue_status_banner_fix
fix: condition for SLA status banner
2021-04-10 17:56:51 +05:30
Rohit Waghchaure
1db8c51749 fix: changed logic 2021-04-10 10:45:29 +05:30
Rohit Waghchaure
b9aa775f3b fix: pricing_rule test cases 2021-04-10 10:45:28 +05:30
Rohit Waghchaure
1358443cdb fix: patch 2021-04-10 10:42:08 +05:30
Deepesh Garg
c85c243f9c Merge pull request #25255 from nextchamp-saqib/issue-condition-fix
fix: condition for setting agreement status
2021-04-09 21:40:14 +05:30
Deepesh Garg
df9388aa8e Merge pull request #25086 from deepeshgarg007/advance_amount_precision
fix: Precision issues while allocating advance amount
2021-04-09 21:39:02 +05:30
noahjacob
110f28f869 Company field editable and is readonly after saving. 2021-04-09 20:01:47 +05:30
Saqib
14b98c1737 Merge branch 'develop' into issue-condition-fix 2021-04-09 18:29:01 +05:30
Anupam Kumar
986452107b fix: Lead Source's module (#24583)
* fix: Lead Source's module

* fix: patch fix
2021-04-09 18:15:51 +05:30
Anupam Kumar
a91d7bd4b5 Merge branch 'develop' into se-add-to-transit 2021-04-09 18:00:03 +05:30
Anupam Kumar
cd2aedd0c6 Merge branch 'develop' into planning 2021-04-09 17:59:47 +05:30
Ankush Menat
5451bbf7d2 fix: condition for SLA status banner
If the document is NOT in the closed state and fulfilled then there
won't be any banner. This bug was introduced while fixing a bug related
to buttons, so separated out code for showing buttons and showing
banners.
2021-04-09 17:19:02 +05:30
rohitwaghchaure
526f76c27d Merge pull request #25257 from rohitwaghchaure/travis-fix-for-project
fix: travis
2021-04-09 17:07:22 +05:30
Rohit Waghchaure
ca5e10892c fix: travis 2021-04-09 16:23:45 +05:30
Afshan
dc73a9995d Merge branch 'develop' into add-blank-for-status-issue-reports 2021-04-09 13:04:34 +05:30
Marica
c6b3766fb2 Merge pull request #24921 from Anurag810/item-dashboard-fixes
fix: precision and formatted document for stock level in item dashboard.
2021-04-09 12:43:06 +05:30
Saqib Ansari
032246dc2b feat(italy): add document type field for e-invoicing 2021-04-09 12:08:24 +05:30
Marica
d38618fc34 Merge branch 'develop' into item-dashboard-fixes 2021-04-09 11:57:56 +05:30
Marica
5467d7c3e3 fix: Use system precision instead of SLE precision 2021-04-09 11:56:49 +05:30
Marica
a7ac01153e fix: Remove redundant import and import cint 2021-04-09 11:55:44 +05:30
Marica
ad75944960 Merge pull request #25105 from Anuja-pawar/fix_picked_qty_in_DN
fix: Picked Qty conversion from Stock Qty to Qty while creating DN from Pick List
2021-04-09 11:48:56 +05:30
Saqib Ansari
e7813b69c4 fix: condition for setting agreement status 2021-04-09 11:46:16 +05:30
Marica
b89a40aa3c Merge branch 'develop' into fix_picked_qty_in_DN 2021-04-09 11:45:39 +05:30
Marica
7f0e92c9b9 Merge pull request #25232 from nextchamp-saqib/coa-importer-validate-fix
fix: keyerror while validating coa file
2021-04-09 11:44:40 +05:30
Deepesh Garg
63e6036d12 Merge pull request #25235 from ankush/remove_purch_inv_validation
fix: remove gst name validation for purchase Invoice
2021-04-09 10:48:34 +05:30
Saqib
4191e7999d chore: add error title
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-04-08 21:04:56 +05:30
Deepesh Garg
edb4663258 Merge pull request #25251 from nextchamp-saqib/einv-ack-no-fix
fix(india): set correct ack no. on irn generation
2021-04-08 20:48:01 +05:30
Saqib Ansari
30720d2139 fix: set correct ack no. on irn generation 2021-04-08 19:06:44 +05:30
Rucha Mahabal
b7aa658a51 refactor(HR): Add missing reports and doctypes to the Workspace (#24994)
* refactor(HR): Add missing reports and doctypes to the Workspace

* refactor: remove Employee Tax and Benefits from HR Workspace

Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
2021-04-08 18:13:21 +05:30
Jannat Patel
d9fa79de99 fix: serial no refresh issue (#25127)
* fix: serial no refresh issue

* fix: sider
2021-04-08 16:04:57 +05:30
Anupam Kumar
9d830255c1 Merge branch 'develop' into se-add-to-transit 2021-04-08 14:44:08 +05:30
rohitwaghchaure
f9fde054e1 Merge pull request #25242 from rohitwaghchaure/fixed-test-case-for-bom-cost
fix: bom cost test case
2021-04-08 14:39:08 +05:30
Marica
6a98d39201 Merge branch 'develop' into fixed-incorrect-batch-selected-in-purchase-rceipt-develop 2021-04-08 13:57:35 +05:30
HENRY Florian
e286750a0f fix: UOM length unit in global setup list is empty (#24855)
* When ERPNext is installed in localized language the category of UOM Conversion Factor is tranlasted into installed languaes. Filter must be locallized

* fix

* fix

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-04-08 13:56:29 +05:30
Marica
fb9fc944c5 Merge branch 'develop' into coa-importer-validate-fix 2021-04-08 13:46:42 +05:30
Rohit Waghchaure
fa8bb87a86 fix: bom cost test case 2021-04-08 13:38:22 +05:30
rohitwaghchaure
5d3f665cc5 Merge pull request #25240 from ankush/job_card_rounding
fix: round total quantity in job card
2021-04-08 13:10:09 +05:30
Ankush Menat
cb625d868c fix: round total quantity in job card 2021-04-08 12:05:52 +05:30
Saqib
f10d107a0a Merge branch 'develop' into coa-importer-validate-fix 2021-04-08 11:25:29 +05:30
Anupam Kumar
dfdf72cbb2 Merge branch 'develop' into planning 2021-04-08 10:58:05 +05:30
Anupam Kumar
8edf9d23c0 Merge branch 'develop' into se-add-to-transit 2021-04-08 10:57:50 +05:30
Ankush Menat
76c8521010 fix: remove gst name validation for purch Invoice 2021-04-07 16:28:13 +05:30
Afshan
e2da3cbc28 fix: payroll issues (#24540)
* fix: payroll issues

* fix: enhancements

* fix: rename variables and refactor

* fix: slider

* fix: added missing arguments

* fix: test cases

* fix: slider

* fix: slider

fix: slider

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-04-07 15:13:44 +05:30
Saqib Ansari
5541aeaa82 fix: keyerror while validating coa file 2021-04-07 12:34:20 +05:30
Walstan Baptista
c39720db50 fix: frappe.whitelist for doc methods (#25231) 2021-04-07 11:51:22 +05:30
Walstan Baptista
90e240c3e6 fix: frappe.whitelist for doc methods (#25230) 2021-04-07 11:32:51 +05:30
Saurabh
e0222723f0 Merge branch 'version-13-pre-release' into version-13 2021-04-07 11:13:40 +05:30
Saurabh
547fd31a37 bumped to version 13.0.1 2021-04-07 11:33:40 +05:50
Nabin Hait
aa809ceffe fix: Patch fixes for v13 upgrade (#25220) 2021-04-07 10:57:46 +05:30
Deepesh Garg
3d5a4ffd66 Merge pull request #24879 from deepeshgarg007/loan_fixes_phase_2
fix: Loan Repayment entry cancellation on salary slip cancel
2021-04-07 10:33:46 +05:30
Deepesh Garg
5af6aea9f9 fix: Posting Date check 2021-04-07 09:46:13 +05:30
Deepesh Garg
d551940dc5 fix: Remove comments 2021-04-06 23:55:48 +05:30
Deepesh Garg
a42194f3d5 Merge branch 'develop' of https://github.com/frappe/erpnext into loan_fixes_phase_2 2021-04-06 23:53:34 +05:30
Rucha Mahabal
d77ea7c88b Merge pull request #25190 from ruchamahabal/approver-perms
feat(HR): share doc with employee approvers if they don't have access
2021-04-06 14:32:34 +05:30
Rucha Mahabal
0bcd3c45ed fix: leave approver perms test 2021-04-06 13:46:53 +05:30
Hussain Nagaria
d2da7b673b fix: Sider Issues 2021-04-06 11:44:54 +05:30
Hussain Nagaria
33e0c8ed19 test: Unique Employee IDs for tests 2021-04-06 11:40:35 +05:30
Deepesh Garg
dfe91b5df3 Merge pull request #25212 from deepeshgarg007/loan_shortfall_preference
fix: Give first preference to loan security on repayment
2021-04-06 11:06:03 +05:30
Anupam Kumar
7b6c8bb3ab fix: error message compensatory leave request (#25206) 2021-04-06 10:20:10 +05:30
Rucha Mahabal
d1970d3c38 Merge branch 'develop' into approver-perms 2021-04-06 10:09:18 +05:30
Rucha Mahabal
084e90e5d3 fix(test): set user as Administrator 2021-04-06 10:07:50 +05:30
Deepesh Garg
015fd681ec fix: Give first preference to loan security on repayment 2021-04-06 00:49:46 +05:30
Hussain Nagaria
bb32f5a92a fix: Rename utilisation to utilization 2021-04-05 19:32:10 +05:30
Sagar Vora
c9cdf74dc5 test: remove print() (#25205) 2021-04-05 16:38:10 +05:30
Marica
4440ff7a0d Merge branch 'develop' into item-dashboard-fixes 2021-04-05 16:25:57 +05:30
Marica
bc50193702 Merge branch 'develop' into fix_picked_qty_in_DN 2021-04-05 16:24:53 +05:30
Sagar Vora
9967a7ce02 test: clear all existing quotations to avoid AssertionError (#25202) 2021-04-05 15:35:52 +05:30
Rucha Mahabal
9948525dd3 Merge branch 'develop' into approver-perms 2021-04-05 14:54:11 +05:30
Sagar Vora
9a0907131a test: create tax rule if it doesnt exist (#25199) 2021-04-05 14:50:09 +05:30
Walstan Baptista
8789ef16a1 test: uses _Test Item instead of _Test Item Home Desktop 100 (#25198) 2021-04-05 13:18:03 +05:30
Hussain Nagaria
ccb15de1c9 fix: Handle overtime edge case 2021-04-05 11:23:06 +05:30
Anoop
b27441b40c fix: failing patch - reload_doc new doctypes added in v13 (#25194) 2021-04-05 10:41:28 +05:30
Ankush Menat
36ff0748bf fix: broken type check in stock ageing report 2021-04-05 10:18:44 +05:30
Rucha Mahabal
b7436a04c3 fix: Ignore Permission for Leave Ledger Entry (#25172) 2021-04-04 20:09:00 +05:30
Rucha Mahabal
57ab3a5a88 Merge branch 'develop' into approver-perms 2021-04-04 19:57:58 +05:30
Rucha Mahabal
19c3286b06 fix: linter and sider issues 2021-04-04 19:54:00 +05:30
Rucha Mahabal
8c055b5469 fix: ignore share permission while sharing doc with approver 2021-04-04 18:45:06 +05:30
Rucha Mahabal
13c0a350af test: leave, expense, shift request approver permissions 2021-04-04 18:37:46 +05:30
Rucha Mahabal
ba10ef4403 feat(HR): share doc with employee approvers if they don't have access 2021-04-04 17:16:48 +05:30
Rohit Waghchaure
8b829711fc fix: incorrect batch picked in subcontracted purchase receipt 2021-04-04 12:43:38 +05:30
Sagar Vora
8aacd341c7 test: disable shopping cart before running Tax Rule tests (#25183) 2021-04-03 23:01:16 +05:30
Sagar Vora
993cf8c2cd test: cleanup BOM in test_routing and prevent overlap in test_job_card (#25180) 2021-04-03 20:25:19 +05:30
Walstan Baptista
37b826b988 fix: correct calculation for discount amount when margin is set (#25179) 2021-04-03 19:48:46 +05:30
Sagar Vora
cce3efe0c1 test: specify warehouse list to avoid error (#25174)
* test: specify warehouse list to avoid error

* test: get_all_warehouses of BOM company
2021-04-03 19:46:44 +05:30
Walstan Baptista
b7481633b1 test: adds role after setting user to Administrator (#25177) 2021-04-03 17:37:59 +05:30
Sagar Vora
f68f41d7a7 test: fix multiple tests in Leave Application (#25173) 2021-04-03 17:34:57 +05:30
Deepesh Garg
232c127295 Merge pull request #25107 from deepeshgarg007/stock_entry_serial_batch_selector
fix: Hide serial and batch selector in Stock Entry
2021-04-03 17:15:22 +05:30
Deepesh Garg
b7e7eeaf8d Merge pull request #25138 from deepeshgarg007/loan_shortfall_percentage
fix: Add shortfall ratio in Loan Security Shortfall
2021-04-03 17:13:27 +05:30
rohitwaghchaure
fe72e17a7b Merge pull request #25109 from ankush/po_to_pr_fixes
fix: incorrect status creating PR from PO after creating PI
2021-04-03 17:11:14 +05:30
Sagar Vora
f6b1fa0a1c test: clear tax rules before making POS Invoices (#25171) 2021-04-03 16:06:41 +05:30
Walstan Baptista
5d77f10baa test: docs are not deleted in tearDown (#25123)
* test: docs are not deleted in tearDown
2021-04-03 13:38:55 +05:30
Ankush Menat
87b2a51322 fix: escape sql filters in credit report
closes #24965
2021-04-03 12:34:34 +05:30
Saqib
a30d70e490 Merge branch 'develop' into customer_duplicates 2021-04-03 12:22:22 +05:30
Kaviya Periyasamy
2cef23d4c9 fix: object referencing the same address issue (#25159)
* fix: variable reference to same address

* fix: object referencing same address issue

* fix: value error
2021-04-03 11:30:49 +05:30
Hussain Nagaria
40abd2a2e1 test: Add test case for summary data 2021-04-02 19:55:54 +05:30
Hussain Nagaria
d27fc93edd feat: Add additional stats to report summary 2021-04-02 19:54:58 +05:30
Rucha Mahabal
2453b0cf6a fix: component amount calculation based on formula with abbr not working (#25117) 2021-04-02 17:00:28 +05:30
bhavesh95863
7535341016 fix(regional): remove shipping address GSTIN validation for e-invoice (#25153) 2021-04-02 15:04:48 +05:30
Ankush Menat
e41d48c7de fix: disable auto naming of customer during import 2021-04-02 14:22:04 +05:30
Marica
7f9fedf08a Merge branch 'develop' into fix_picked_qty_in_DN 2021-04-02 13:19:19 +05:30
Saqib
5447b250fe fix: place of supply of e-invoicing (#25148) 2021-04-02 12:16:19 +05:30
Deepesh Garg
7f10044195 fix: Typo 2021-04-02 12:04:42 +05:30
Jannat Patel
0353b0f5f6 Merge branch 'develop' into profitability-report 2021-04-02 10:15:28 +05:30
Rohit Waghchaure
9896907565 fix: incorrect incoming rate for the sales return 2021-04-02 00:27:08 +05:30
Saurabh
d05686d27d Merge branch 'version-13-pre-release' into version-13 2021-04-01 22:59:49 +05:30
Saurabh
e7b3047eca chore: Bump version to v13.0.0 2021-04-01 22:59:28 +05:30
Anuja Pawar
87dea3923b fix: Picked Qty conversion from Stock Qty to Qty while creating DN from Pick List (#25106)
* fix: picked qty from Stock Qty to Qty in DN

* fix: suggested changes and added test

* fix: sider changes

* fix: sider changes
2021-04-01 22:05:08 +05:30
Saurabh
f9b9298a6d fix: reload doc in patch (#25144) 2021-04-01 21:59:35 +05:30
Jannat Patel
c01b2caaa3 fix: serial no refresh issue (#25129) 2021-04-01 20:48:51 +05:30
Afshan
ace4ce64a0 fix: validation msg for TransDocNo e-invoicing (#25121) 2021-04-01 20:28:12 +05:30
Suraj Shetty
5921f434b6 Merge pull request #25142 from surajshetty3416/fix-get_route_options_for_new_doc-version-13-pre-release
fix: get_route_options_for_new_doc for Project
2021-04-01 19:59:51 +05:30
Suraj Shetty
c5347c4a34 fix: get_route_options_for_new_doc for project 2021-04-01 19:59:29 +05:30
Nabin Hait
db5f0f79b1 chore: added v13 change log (#25140) 2021-04-01 19:59:02 +05:30
Suraj Shetty
7b97d49a58 Merge pull request #25141 from surajshetty3416/fix-get_route_options_for_new_doc
fix: get_route_options_for_new_doc for Project
2021-04-01 19:58:01 +05:30
Suraj Shetty
67169ba2d3 fix: get_route_options_for_new_doc for project 2021-04-01 19:52:07 +05:30
Marica
f46fbcc1ad Merge pull request #25118 from marination/qc-back-update
fix: Query values incorrectly escaped while back updating Quality Inspection
2021-04-01 18:30:58 +05:30
Sagar Vora
d3ee8c7731 fix: customer creation from shopping cart (#25136) 2021-04-01 18:18:19 +05:30
Deepesh Garg
eea20f83ab fix: Add shortfall ratio in Loan Security Shortfall 2021-04-01 18:13:54 +05:30
Rucha Mahabal
0773d6772d fix(POS): local variable 'customer_currency' referenced before assignment (#25137) 2021-04-01 17:47:19 +05:30
Marica
913e7254cb Merge branch 'develop' into qc-back-update 2021-04-01 17:40:46 +05:30
Marica
f4e7e72f67 Merge pull request #25131 from marination/qc-back-update-pre-release
fix: Query values incorrectly escaped while back updating Quality Inspection
2021-04-01 17:39:56 +05:30
Walstan Baptista
446a6df662 test: set opening stock to fix NegativeStock errors (#25101)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-04-01 16:54:26 +05:30
Sagar Vora
98d250995d fix(India): create property setters for shorter naming series (#25134) 2021-04-01 16:52:28 +05:30
Sagar Vora
88f5c42b09 test: set formula in scorecard to avoid ValidationError (#25116) 2021-04-01 16:44:05 +05:30
Anuja P
7982688508 fix: sider changes 2021-04-01 16:04:28 +05:30
Walstan Baptista
58625674f4 test: correct naming series to avoid ValidationError (#25132) 2021-04-01 15:55:37 +05:30
marination
a3da206b64 fix: Don't string format args as they may not be escaped properly
- Append even conditional args to args list and send to query executer
- It will escape all values that are sent to it
- String formatting without escaping causes issues with % sign, etc.
2021-04-01 15:45:33 +05:30
Marica
9ef323fcfd Merge branch 'develop' into qc-back-update 2021-04-01 15:44:20 +05:30
Anuja P
45d0b9bce6 test: added tests for Pick List for item with multiple UOM 2021-04-01 15:38:13 +05:30
Sagar Vora
4c31fbb687 fix(India): create property setters for shorter naming series (as per GST Rules) (#25128) 2021-04-01 15:32:37 +05:30
Rucha Mahabal
6717773c28 fix: Travis (#25078)
* fix(test): set default accounts in mode of payment

* fix(test): import_doc params in shopify settings test

* fix: syntax error in salary slip test

* fix(test): use Temporary Opening account for Stock Reco opening entry

* fix(test): skip GST doc naming validations for tests

* fix(test): Salary Structure Assignment date edge case

* fix(test): GST doc naming validations

* fix: sider

* revert: skip GST doc naming validations for tests
2021-04-01 15:30:34 +05:30
Nabin Hait
7f7b3608bb fix: merge conflict 2021-04-01 15:05:53 +05:30
Nabin Hait
11eb30d082 fix: merge conflict 2021-04-01 15:03:11 +05:30
rohitwaghchaure
bee9c73730 Merge pull request #25125 from rohitwaghchaure/repost-not-completed-transactions-v13-pre
fix: repost not completed backdated transactions
2021-04-01 15:00:43 +05:30
Rohit Waghchaure
58ca5a7329 fix: repost not completed backdated transactions 2021-04-01 14:59:49 +05:30
Rucha Mahabal
53a1aaf33d fix: Salary Structure object has no attribute set_totals (#25113) 2021-04-01 14:40:15 +05:30
Rucha Mahabal
d765b21825 fix: Salary Structure object has no attribute set_totals (#25114) 2021-04-01 14:39:52 +05:30
marination
561fa6b530 fix: Don't string format args as they may not be escaped properly
- Append even conditional args to args list and send to query executer
- It will escape all values that are sent to it
- String formatting without escaping causes issues with % sign, etc.
2021-04-01 12:56:05 +05:30
Ankush Menat
1bdf9c4161 fix: patch for purchase receipt status 2021-04-01 11:58:34 +05:30
Ankush Menat
427a98d6cd fix: do not copy percent billed from PO to PR 2021-04-01 11:51:31 +05:30
Ankush Menat
8993ccb7d2 fix: update PR status in database 2021-04-01 11:51:31 +05:30
Ankush Menat
4198cf58e5 test: add tests for PO->PI, PO->PR workflow
Add failing test cases for PR status and PR percent billed.
2021-04-01 11:51:30 +05:30
Hussain Nagaria
1e772bb9a4 test: Basic report data testing 2021-04-01 00:44:35 +05:30
rohitwaghchaure
56bd4d71a9 Merge pull request #25112 from rohitwaghchaure/fixed-clear-source-warehouse
fix: not able to save material request
2021-03-31 23:58:44 +05:30
Rohit Waghchaure
825850a58f fix: not able to save material request 2021-03-31 23:55:06 +05:30
Marica
b4913e7db4 Merge pull request #23509 from AndyOverLord/patch-7
fix: Update Bin via Update Item on Purchase/Sales Order
2021-03-31 22:28:14 +05:30
Marica
bfc2590e3b Merge branch 'develop' into patch-7 2021-03-31 22:23:23 +05:30
Marica
8617c0ab99 Merge pull request #25070 from marination/update-items-bin
fix: Update Bin via Update Item on Purchase/Sales Order
2021-03-31 22:21:41 +05:30
Afshan
2fef245607 fix: don't set Company:company:default_currency as default for currency link fields (#25111) 2021-03-31 21:57:04 +05:30
Prssanna Desai
f3c34aa6ae fix: don't set "Company:company:default_currency" as default for currency link fields (#25095)
* fix: don't set Company:company:default_currency as default for currency link fields

* fix: Company:company:default_currency and refactor

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
Co-authored-by: Afshan <afshan13k@gmail.com>
2021-03-31 21:52:48 +05:30
marination
85a7ec91a1 fix: Run Patches to updated Reserved, Requested and Ordered Qty 2021-03-31 21:07:59 +05:30
marination
7665a85039 fix: Run Patches to updated Reserved, Requested and Ordered Qty 2021-03-31 21:03:55 +05:30
Marica
7d3eda47b4 Merge pull request #25063 from ankush/mr_stopped_validation
fix: do not fetch stopped MR in production plan
2021-03-31 20:10:54 +05:30
Deepesh Garg
9f7bb14ea1 fix: Remove console 2021-03-31 20:01:00 +05:30
Anuja P
a1d0932093 fix: suggested changes 2021-03-31 19:59:28 +05:30
Deepesh Garg
2d86eb3ab1 fix: Hide serial and batch selector in Stock Entry 2021-03-31 19:57:50 +05:30
Ankush Menat
777745f1e0 fix: do not fetch stopped MR in production plan
- Ignore stopped MR while using fetch button
- Add filter on field inside child table.

Related issue: ISS-20-21-10757
2021-03-31 19:53:19 +05:30
Anupam Kumar
1033cf72f6 fix: added flag for dont_fetch_price_list_rate in transaction (#25041) 2021-03-31 19:39:45 +05:30
Anupam Kumar
35415fa575 fix: added flag for dont_fetch_price_list_rate in transaction (#25083) 2021-03-31 19:39:33 +05:30
Anuja P
fb9ce3f37b fix: Picked Qty conversion from Stock Qty to item Qty in DN 2021-03-31 19:26:42 +05:30
Prssanna Desai
9920d4062c Merge pull request #25103 from prssanna/redesign-fixes-v13 2021-03-31 19:02:10 +05:30
Sagar Vora
27f48739d4 test: pass force parameter to avoid LinkExistsError (#25100) 2021-03-31 18:49:03 +05:30
Anupam Kumar
526497bc43 Merge pull request #25104 from anupamvs/purchase-side-margin-beta
feat: price margin in buying
2021-03-31 18:38:58 +05:30
Prssanna Desai
e9236ab60f Merge pull request #25102 from prssanna/pos-print-v13 2021-03-31 18:36:07 +05:30
Sagar Vora
4e07695a08 test: use insert instead of save (#25045)
* test: use insert instead of save

* test: use do_not_save
2021-03-31 18:33:27 +05:30
Anupam
ad520e08ba feat: price margin in buying 2021-03-31 18:31:12 +05:30
prssanna
bcd63f04da style: missing semicolon 2021-03-31 18:26:52 +05:30
prssanna
5cdb1cb7a9 fix: item variant dialog dropdown issue 2021-03-31 18:26:45 +05:30
prssanna
56ab3fb132 fix: issue web list style 2021-03-31 18:26:37 +05:30
prssanna
b5843dbdcd fix: print recepit dialog 2021-03-31 18:21:51 +05:30
prssanna
b6ce868199 fix: POS print receipt 2021-03-31 18:21:38 +05:30
Rucha Mahabal
75ce336c84 chore: add sider config (#24892) (#25098)
Co-authored-by: Sagar Vora <sagar@resilient.tech>

Co-authored-by: Mohammad Hasnain Mohsin Rajan <hasnain2808@gmail.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-31 16:27:20 +05:30
Jannat Patel
c814aab0b6 fix: delivery note print error (#25081) 2021-03-31 16:24:31 +05:30
Jannat Patel
11e9ae3841 fix: delivery note print error (#25080) 2021-03-31 16:24:08 +05:30
Prssanna Desai
c5ae9ee0e1 fix: do not set standard link in Sales Invoice as custom (#25097) 2021-03-31 16:16:12 +05:30
Prssanna Desai
45eccfafc1 fix: do not set standard link in Sales Invoice as custom (#25096) 2021-03-31 16:16:00 +05:30
Marica
116ac3cde7 Merge pull request #24863 from marination/drop-shipping
fix: PO not created against all selected suppliers (drop shipping)
2021-03-31 16:06:44 +05:30
Deepesh Garg
21a3ea462a fix: Purchase from registered composition dealer (#25040)
* fix: Purchase from registered composition dealer

* fix: Test case for GSTR 3b report
2021-03-31 16:05:12 +05:30
Deepesh Garg
c482c9592f fix: Purchase from registered composition dealer (#25057)
* fix: Purchase from registered composition dealer

* fix: Test case for GSTR 3b report
2021-03-31 16:04:46 +05:30
Marica
1b8d36634f Merge branch 'develop' into patch-7 2021-03-31 16:04:24 +05:30
Marica
8339987cf1 Merge branch 'develop' into drop-shipping 2021-03-31 16:03:14 +05:30
Saqib
fb4051bddd feat: discount configuration on early payments (#25089)
* feat: discount configuration on early payments

Co-authored-by: Nabin Hait <nabinhait@gmail.com>

* fix: remove duplicate patch call

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-03-31 15:52:51 +05:30
Saqib
4d0939de8d feat: introduce parameter group in quality inspection (#25094)
* feat: introduce parameter group in quality inspection

* chore: make parameter group optional
2021-03-31 15:51:48 +05:30
rohitwaghchaure
e353c84aa5 Merge pull request #25092 from rohitwaghchaure/fixed-multiply-issue-material-request-develop
fix: can't multiply sequence by non-int of type 'float'
2021-03-31 15:31:50 +05:30
rohitwaghchaure
968885af26 Merge pull request #25091 from rohitwaghchaure/fixed-multiply-issue-material-request
fix: can't multiply sequence by non-int of type 'float'
2021-03-31 15:31:30 +05:30
Rohit Waghchaure
1bc53a32bf fix: can't multiply sequence by non-int of type 'float' 2021-03-31 15:30:42 +05:30
Rohit Waghchaure
94c145f3c3 fix: can't multiply sequence by non-int of type 'float' 2021-03-31 15:28:26 +05:30
Rohan
99a8cb7143 fix: commit individual SLE rename for large datasets (#25084) 2021-03-31 15:22:00 +05:30
Saqib
f239dbdd03 feat: tax collected at source using tax withholding category (#25090)
* refactor: tax withholding category against customer

* feat: pan and tax withholding category fields for customer

* fix: test

* feat: charging tcs on sales invoice

* fix: tcs chargable amount

* fix: tcs amount calculation

* fix: sider
2021-03-31 15:15:29 +05:30
Marica
0af1aedf34 Merge branch 'develop' into drop-shipping 2021-03-31 15:05:11 +05:30
Saqib
0586b7db79 feat: discount configuration on early payments (#24586)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-03-31 15:03:53 +05:30
Marica
f4426c825e Merge pull request #25079 from marination/drop-ship-pre-release
fix: PO not created against all selected suppliers (drop shipping)
2021-03-31 14:36:34 +05:30
Saqib
df1ef6f8e5 fix: make round off GLE always non-opening (#25087) 2021-03-31 14:23:09 +05:30
Deepesh Garg
5d73d8281b fix: Remove unintentionally added field 2021-03-31 14:10:56 +05:30
Deepesh Garg
f54d596ae1 fix: Precision issues while allocating advance amoount 2021-03-31 14:06:02 +05:30
rohitwaghchaure
83b3e87497 Merge pull request #25076 from rohitwaghchaure/fixed-bom-stock-calculated-report
fix: bom stock calculated report
2021-03-31 13:51:32 +05:30
Afshan
b07de03ddb fix: added blank option for status in report related to issue 2021-03-31 13:39:04 +05:30
marination
59bff8a2f1 fix: Test
- Preserve order of supplier list while removing duplicates
- Dont use list of set, but list of dict with unique keys
2021-03-31 13:17:25 +05:30
marination
1b903e39c8 fix: Sider (unused variables) 2021-03-31 13:17:13 +05:30
marination
1999ae0a91 fix: PO not created against all selected suppliers (drop shipping)
- Return list of created POs instead of first doc
- test case added
2021-03-31 13:17:00 +05:30
Hussain Nagaria
39b75c63ad feat: Add chart generation 2021-03-31 13:13:25 +05:30
Marica
5a601ce851 Merge branch 'develop' into drop-shipping 2021-03-31 13:12:13 +05:30
Sagar Vora
e50324aed7 perf: reduce number of queries for checking if future SL entry exists (#25064) 2021-03-31 12:44:03 +05:30
Sagar Vora
368cb45147 fix(Italy): setup, validations, optimisations (#25065) 2021-03-31 12:43:33 +05:30
Walstan Baptista
d6360755b9 chore: frappe.whitelist for doc methods (#25068)
* chore: frappe.whitelist for doc methods

* fix: incorrect spelling

* fix: sider issue

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-31 12:30:32 +05:30
Marica
14c44e5e9e Merge branch 'develop' into drop-shipping 2021-03-31 12:27:32 +05:30
marination
120da991d0 fix: Test
- Preserve order of supplier list while removing duplicates
- Dont use list of set, but list of dict with unique keys
2021-03-31 12:27:57 +05:30
Hussain Nagaria
92c768972f fix: Missing quotation marks in SQL query 2021-03-31 12:26:37 +05:30
Hussain Nagaria
f5576d67dd feat: Add Report Summary generation 2021-03-31 12:25:36 +05:30
Walstan Baptista
353aa59c42 test: sets company while making a project (#25061) 2021-03-31 12:16:54 +05:30
Walstan Baptista
d65458d534 test: corrected item name (#25075) 2021-03-31 12:14:41 +05:30
Rohit Waghchaure
410d36beca fix: bom stock calculated report 2021-03-31 12:11:00 +05:30
Marica
8451da7924 Merge branch 'develop' into drop-shipping 2021-03-31 11:44:07 +05:30
Afshan
91a8a74d54 fix: column width in Recruitment Analytics report (#25074) 2021-03-31 11:30:04 +05:30
Anurag Mishra
720f69caaf fix: column width in Recruitment analytics report (#25003)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-03-31 11:23:34 +05:30
Anupam Kumar
08eaf3c6b8 Merge pull request #25071 from anupamvs/add-to-transit-prere
fix: unable to submit stock entry
2021-03-31 02:34:19 +05:30
Anupam
41229ba705 fix: unable to submit stock entry 2021-03-31 02:32:25 +05:30
marination
a5de6c779b fix: Cleaned up and fixed validation and bin updation on deletion
- Created separate smaller functions for validation and bin updation of deleted row
- Made sure previous doc (linked doc) was also updated after deletion of row
- Tests to check bin updation on add/update/delete
- Made reserved qty for subcontrating read only in bin
2021-03-31 02:03:26 +05:30
Andy Zhu
ba3578929e Update accounts_controller.py
Updating Bin quantity based on doctype to optimize running efficiency.
2021-03-31 02:03:16 +05:30
Andy Zhu
c0ba6eafd5 fix: Update Items on Purchase Order
1. set warehouse using `get_item_warehouse`
2. update "reserved_qty" for sales order
2021-03-31 02:03:10 +05:30
Andy Zhu
a21e347bf1 fix: Update Items on Purchase Order
If user add rows or remove rows to update items on purchase order, the quantity in bin won't get updated.
This fix is not mature yet but to give an tempopary solution for fixing this issue.
2021-03-31 02:03:02 +05:30
marination
0673f558c1 fix: Cleaned up and fixed validation and bin updation on deletion
- Created separate smaller functions for validation and bin updation of deleted row
- Made sure previous doc (linked doc) was also updated after deletion of row
- Tests to check bin updation on add/update/delete
- Made reserved qty for subcontrating read only in bin
2021-03-31 01:42:18 +05:30
Prssanna Desai
7e442c74b6 Merge pull request #25020 from prssanna/help-links-fix-v13 2021-03-30 19:29:30 +05:30
Hussain Nagaria
1a0229eb36 feat: Add report table data generation 2021-03-30 18:20:22 +05:30
Marica
c5739957de Merge branch 'develop' into patch-7 2021-03-30 18:07:32 +05:30
Deepesh Garg
6be78db62c Merge pull request #25052 from deepeshgarg007/gst_rounding_v13_beta
feat: Normal rounding for GST Taxes
2021-03-30 17:01:45 +05:30
Anurag Mishra
679177f9e0 Merge pull request #25022 from shariquerik/employee-profile-pic-access-fix
fix: Employee profile pic upload access for erpnext user
2021-03-30 14:32:21 +05:30
Hussain Nagaria
2b85a81a1c feat: Add filters to front end 2021-03-30 13:57:44 +05:30
Rucha Mahabal
469ef122aa Merge pull request #25059 from ruchamahabal/non-profit-fixes
fix: Non Profit fixes
2021-03-30 12:44:55 +05:30
Rucha Mahabal
30f67c3f57 fix: add filters to account link fields in Non Profit Settings (#25060)
- fetch memberships ordered by date in certificate
2021-03-30 12:39:56 +05:30
Rucha Mahabal
04c0296558 fix: add filters to account link fields in Non Profit Settings
- fetch memberships ordered by date in certificate
2021-03-30 12:30:40 +05:30
Hussain Nagaria
b7f2ba1556 feat: Add Report boilerplate 2021-03-30 12:19:16 +05:30
Anupam Kumar
9be11afbde feat: price margin in buying (#25058) 2021-03-30 12:09:46 +05:30
Rucha Mahabal
a54eecb230 fix: membership renewal validation (#24963) 2021-03-30 12:02:52 +05:30
Rucha Mahabal
146cbb10f8 fix: calculate 80g certificate amount on validate for memberships (#24925) 2021-03-30 12:02:28 +05:30
Rucha Mahabal
5f4a2bfc61 fix(Non Profit): Membership and Donation API fixes (#24900)
* fix: Donation fixes

- differentiate between subscription payment and payment

- issue with donation amount

* fix: existing membership validation

* fix: ignore subscription payments while capturing donations
2021-03-30 12:02:09 +05:30
Rucha Mahabal
170d2efd35 fix(Payroll): Exchange Rate not getting set in Salary Slip (#25013) 2021-03-30 11:02:46 +05:30
Sagar Vora
7f43c051df fix(Italy): setup, validations, optimisations 2021-03-29 21:18:26 +05:30
Deepesh Garg
f954ec7c78 fix: Add patch for GST category field in Delivery Note 2021-03-29 20:31:11 +05:30
Sagar Vora
ba76f87e44 fix(Italy): setup, validations, optimisations (#25054)
* fix(Italy): setup, validations, optimisations

* fix: remove unused import
2021-03-29 20:18:45 +05:30
Deepesh Garg
29997414ad fix: Add GST category field in Dellivery Note 2021-03-29 19:49:52 +05:30
Deepesh Garg
237033704f fix: Add test case 2021-03-29 16:42:59 +05:30
Deepesh Garg
c2548ddc75 feat: Normal rounding for GST Taxes 2021-03-29 16:42:47 +05:30
Saurabh
7366b5d3eb Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-03-28 15:54:56 +05:30
Saurabh
ceb026c5ab bumped to version 13.0.0-beta.14 2021-03-28 16:14:56 +05:50
rohitwaghchaure
b38ea0cc8b fix: patch (#25014)
* fix: patch

* fix: pricing_rule test cases
2021-03-28 15:51:32 +05:30
Sagar Vora
5c907fa7f0 test: make Stock Entry to avoid NegativeStockError (#25044) 2021-03-27 20:30:26 +05:30
rohitwaghchaure
f4901b4f22 Merge pull request #25034 from anupamvs/naming-pre-release
fix: unable to submit stock entry
2021-03-27 19:50:06 +05:30
Walstan Baptista
ee822a9dcd test: use different product attribute value; cleanup (#25043)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-27 19:42:25 +05:30
Raffael Meyer
1bbc8008eb Merge branch 'develop' into improve_taxes_setup 2021-03-27 15:02:58 +01:00
Anupam
d429138dcc fix: added flag for dont_fetch_price_list_rate in transaction 2021-03-27 19:31:23 +05:30
Walstan Baptista
d6c7d8e631 test: reset session user if test errors in test_sle (#25042) 2021-03-27 18:30:07 +05:30
Sagar Vora
868c0bf45b perf: reduce no of queries for checking if future sl entry exists (#24881) 2021-03-27 16:10:20 +05:30
walstanb
ab673d9e4b fix: minor changes 2021-03-27 12:54:49 +05:30
walstanb
225c64a1ad test: sets is_purchase_item while item creation 2021-03-27 12:54:49 +05:30
walstanb
52403c537b fix: check if gst account exists before appending 2021-03-27 12:54:49 +05:30
walstanb
9826ac4602 test: reset session user if test errors 2021-03-27 12:54:49 +05:30
walstanb
98dcf8a1fd fix: type casting for None type value 2021-03-27 12:54:49 +05:30
rohitwaghchaure
6c7f029597 Merge pull request #25016 from hasnain2808/fix-ams-error-v13-pre-release
fix: ams integration breaks when error raised
2021-03-27 09:59:51 +05:30
Anupam
4adaf7ed2e Merge branch 'version-13-beta-pre-release' of https://github.com/frappe/erpnext into naming-pre-release 2021-03-27 00:56:48 +05:30
Anupam
5d994d8aa1 fix: unable to submit stock entry 2021-03-27 00:54:19 +05:30
Anupam
096da429ed fix: unable to submit stock entry 2021-03-27 00:45:31 +05:30
rohitwaghchaure
d5759bab11 Merge pull request #24922 from rohitwaghchaure/feat-recursice-pricing-rule
feat: recursive pricing rule
2021-03-26 19:10:10 +05:30
rohitwaghchaure
e825d2ab51 Merge pull request #25027 from rohitwaghchaure/feat-recursice-pricing-rule-pre
Feat recursice pricing rule pre
2021-03-26 19:09:39 +05:30
Rohit Waghchaure
256b9c7bf9 fix: total weight not set for free items 2021-03-26 19:05:46 +05:30
Rohit Waghchaure
0486276789 fix: don't club same free item 2021-03-26 19:05:45 +05:30
Rohit Waghchaure
fce552b811 fix: nonetype object has no attribute options 2021-03-26 19:05:45 +05:30
Rohit Waghchaure
cd8422a840 feat: recursive product discount 2021-03-26 19:05:43 +05:30
rohitwaghchaure
2c191c105f Merge pull request #25026 from ruchamahabal/production-raw-material-enhancements-v13
feat(Production Plan): Enhancements in Material Request Plan Item
2021-03-26 18:59:34 +05:30
rohitwaghchaure
86628ea287 Merge pull request #25025 from ruchamahabal/production-raw-material-enhancements
feat(Production Plan): Enhancements in Material Request Plan Item
2021-03-26 18:59:23 +05:30
Rucha Mahabal
44853da7c2 feat: Show Required Qty as per BOM in Material Request Items 2021-03-26 18:55:16 +05:30
Rucha Mahabal
4cd68cdecb feat: Add more fields to raw material download 2021-03-26 18:55:08 +05:30
Rucha Mahabal
d74ff72527 fix: Ordered and Reserved Qty for Production not getting fetched in Items 2021-03-26 18:55:00 +05:30
Rucha Mahabal
28a885a3a9 feat: show ordered and reserved qty in Material Request Plan Item table 2021-03-26 18:54:51 +05:30
Rucha Mahabal
efe2b425b1 feat(Production Plan): Consider Safety Stock in Required Qty Calculation 2021-03-26 18:54:34 +05:30
Rucha Mahabal
87a70fe8cb feat: Show Required Qty as per BOM in Material Request Items 2021-03-26 18:37:50 +05:30
Rucha Mahabal
9dbabb92df feat: Add more fields to raw material download 2021-03-26 18:37:40 +05:30
Rucha Mahabal
07409990a0 fix: Ordered and Reserved Qty for Production not getting fetched in Items 2021-03-26 18:37:24 +05:30
Rucha Mahabal
1f86471656 feat: show ordered and reserved qty in Material Request Plan Item table 2021-03-26 18:36:52 +05:30
Rucha Mahabal
66bae19c16 feat(Production Plan): Consider Safety Stock in Required Qty Calculation 2021-03-26 18:36:33 +05:30
shariquerik
82d7986a2f fix: sider fix 2021-03-26 17:02:37 +05:30
Saqib
f66aab6d98 fix: e-invoicing option visible even if settings disabled (#25021) 2021-03-26 16:40:51 +05:30
shariquerik
1989375be4 fix: Employee profile pic upload access for erpnext user 2021-03-26 16:34:22 +05:30
Prssanna Desai
1bbd5c98d3 Merge pull request #24996 from prssanna/help-links-fix 2021-03-26 16:04:25 +05:30
prssanna
5243eea532 style: fix formatting 2021-03-26 15:47:08 +05:30
prssanna
0ae0368d34 fix: re-execute add_standard_navbar_items patch
- check that same items aren't appended again
2021-03-26 15:47:07 +05:30
prssanna
eeb3121622 fix: missing help links in navbar help dropdown 2021-03-26 15:47:07 +05:30
Prssanna Desai
3da2df55f4 Merge branch 'develop' into help-links-fix 2021-03-26 15:35:17 +05:30
Sagar Vora
0b569b3e43 fix: allow creating stock entry based on work order for customer provided items (#24885) 2021-03-26 14:40:15 +05:30
prssanna
dd2a315d06 style: fix formatting 2021-03-26 14:35:47 +05:30
hasnain2808@gmail.com
e9c801e4bd fix: ams integration breaks when error raised 2021-03-26 14:32:02 +05:30
Nabin Hait
2a39b74ad2 fix: Fixes on job card and salary slip (#25011)
* fix: map conversion factor while making stock entry from job card

* fix: fetch additional salary in salary slip
2021-03-26 10:49:39 +05:30
Marica
ffb4e3f280 Merge pull request #24937 from ankush/hide_alt_field
fix: hide alt tag if item is not shown in website
2021-03-25 20:14:52 +05:30
Anurag Mishra
344c14c9ca Merge pull request #25004 from ruchamahabal/fix-exchange-rate-in-salary-slip
fix(Payroll): Exchange Rate not getting set in Salary Slip
2021-03-25 18:12:11 +05:30
Deepesh Garg
74200bcd62 Merge pull request #24975 from frappe/revert-24039-fixed-incorrect-gstr-report-issue
Revert "fix: GSTR B2C report"
2021-03-25 16:50:10 +05:30
Deepesh Garg
7b8742bd70 Merge pull request #24998 from frappe/revert-24318-fix-currency-validation-for-party
Revert "fix: validating party currency with doc currency"
2021-03-25 16:49:50 +05:30
Rucha Mahabal
b2b12f303e fix(Payroll): Exchange Rate not getting set in Salary Slip 2021-03-25 14:48:08 +05:30
pateljannat
c0b4eea415 fix: sider 2021-03-25 14:39:05 +05:30
pateljannat
6597bf7dd7 feat: profitability report default working hours and tests 2021-03-25 13:31:43 +05:30
Mohammad Hasnain Mohsin Rajan
52701dcbbc fix: patch regional fields for old companies (#24988) 2021-03-25 12:56:33 +05:30
Mohammad Hasnain Mohsin Rajan
f29c075bc3 fix: patch regional fields for old companies (#24999)
* fix: patch regional fields for old companies

* chore: fix sider
2021-03-25 12:56:13 +05:30
Marica
36d125a720 Merge branch 'develop' into item-dashboard-fixes 2021-03-25 12:32:47 +05:30
Nabin Hait
d4499277b4 chore: Added change log 2021-03-25 12:18:22 +05:30
Marica
7c6f72fd39 Merge branch 'develop' into hide_alt_field 2021-03-25 12:15:58 +05:30
Nabin Hait
91026e026f chore: Added change log 2021-03-25 11:53:07 +05:30
Syed Mujeer Hashmi
f8b44e05c4 refactor: Add student mobile number to student attendance (#24990)
To setup SMS alert notification for student attendance we need student mobile
number in this doctype.

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>
2021-03-25 11:48:29 +05:30
Anupam Kumar
b4e842e25e fix: opportunity-quotation mapping order status (#25001) 2021-03-25 11:45:57 +05:30
Deepesh Garg
1a6e6320cf Revert "fix: validating party currency with doc currency (#24318)"
This reverts commit 02142c41bb.
2021-03-24 21:26:04 +05:30
Prssanna Desai
8a87ffc8f6 fix: POS print receipt (#24924)
* fix: POS print receipt

* fix: print recepit dialog
2021-03-24 19:52:39 +05:30
Saqib
dd39a6b47c fix(pos): mode of payments disappear on loading draft pos invoice (#24917) 2021-03-24 17:56:24 +05:30
rohitwaghchaure
d7d7df2fdd Merge pull request #24995 from rohitwaghchaure/incorrect-field-for-company
fix: incorrect fieldname
2021-03-24 16:45:41 +05:30
prssanna
194dd12882 fix: re-execute add_standard_navbar_items patch
- check that same items aren't appended again
2021-03-24 16:45:32 +05:30
prssanna
97aab3ac21 fix: missing help links in navbar help dropdown 2021-03-24 16:44:49 +05:30
Rohit Waghchaure
244f3eeedc fix: incorrect fieldname 2021-03-24 16:42:22 +05:30
Anurag Mishra
4217a4b1ff Merge branch 'develop' into item-dashboard-fixes 2021-03-24 15:35:33 +05:30
Anupam Kumar
d1bbb4c311 Merge branch 'develop' into planning 2021-03-24 15:12:04 +05:30
rohitwaghchaure
3c490088c4 Merge pull request #24991 from rohitwaghchaure/repost-not-completed-transactions-pre
fix: repost not completed backdated transactions
2021-03-24 12:38:42 +05:30
Ishan Loya
de774ae080 Correct state code for 'Other Territory'
Corrects state code for 'Other Territory' to match e-invoicing state codes list. Attempts to fix #24992
2021-03-24 12:30:51 +05:30
Rohit Waghchaure
9165327cf6 fix: repost not completed backdated transactions 2021-03-24 11:32:26 +05:30
rohitwaghchaure
575f8f226b fix: repost not completed backdated transactions (#24980) 2021-03-24 11:30:53 +05:30
Deepesh Garg
734f5c2533 Merge pull request #24971 from deepeshgarg007/loan_security_shortfall_process_update
fix: Pending shortfall update  on processing loan security shortfall
2021-03-24 11:24:49 +05:30
Anupam Kumar
5ce0569f80 fix: validate_series (#24984) 2021-03-23 21:13:41 +05:30
Anupam Kumar
5c172044d7 fix: validate_series (#24987) 2021-03-23 21:13:06 +05:30
Deepesh Garg
d26ed25c3e fix: Period list for exponential smoothing forecasting report (#24983) 2021-03-23 21:11:06 +05:30
Deepesh Garg
82983369fa fix: Period list for exponential smoothing forecasting report (#24982) 2021-03-23 21:11:01 +05:30
Jannat Patel
d7b139182b fix: serial no trim issue (#24981)
* fix: serial no trim issue

* fix: sider
2021-03-23 21:09:54 +05:30
Jannat Patel
12f0923a61 fix: serial no trim issue (#24949)
* fix: serial no trim issue

* fix: valid serial nos

* fix: sider

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-03-23 21:09:49 +05:30
Afshan
02142c41bb fix: validating party currency with doc currency (#24318)
* fix: validating supplier currency

* fix: compare current currency with company currency as well.

* fix: replaced or with add in condition

* fix: conditioning to get proper payment terms values

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-03-23 20:53:56 +05:30
Syed Mujeer Hashmi
f114da2f67 refactor: Make Discharge Schedule Date as Datetime (#24940)
* refactor: Make Discharge Schedule Date as Datetime

Like Admitted Datetime make discharge date as discharge datetime.

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

* fix: Add patch for renaming discharge_date to discharge_datetime

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

* fix: quote style

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-03-23 17:48:25 +05:30
Anupam
940c75f8ac fix: validate_series 2021-03-23 16:54:54 +05:30
Marica
5c7138c86b Merge pull request #24985 from ankush/allow_zero_valuation_SR_v13b_pr
fix: Allow zero valuation in stock reconciliation
2021-03-23 14:58:38 +05:30
Ankush Menat
2ba198576c fix: set valuation rate for customer items to zero
- In stock reconciliation always set valuation rate of customer provided
items to zero during validation.
- Let user know the valuation has been changed.
2021-03-23 14:03:09 +05:30
Ankush Menat
2a391298a7 test: customer item in stock reconciliation 2021-03-23 14:03:00 +05:30
Ankush Menat
6a534ea82b fix: Allow zero valuation in stock reconciliation
Stock reconciliation can not be done for customer provided item as they
have zero valuation. This change adds a checkbox in item table to allow
such items.

Related issue: ISS-20-21-10248
2021-03-23 14:02:52 +05:30
Marica
23b32381e7 Merge pull request #24888 from ankush/allow_zero_valuation_SR
fix: Allow zero valuation in stock reconciliation
2021-03-23 13:58:46 +05:30
Ankush Menat
e76ecb8f74 fix: set valuation rate for customer items to zero
- In stock reconciliation always set valuation rate of customer provided
items to zero during validation.
- Let user know the valuation has been changed.
2021-03-23 13:01:21 +05:30
Ankush Menat
714b780868 test: customer item in stock reconciliation 2021-03-23 12:43:02 +05:30
pateljannat
453e07e32a fix: exclude cancelled salary slips 2021-03-23 11:18:57 +05:30
Ankush Menat
762d6e38f7 fix: Allow zero valuation in stock reconciliation
Stock reconciliation can not be done for customer provided item as they
have zero valuation. This change adds a checkbox in item table to allow
such items.

Related issue: ISS-20-21-10248
2021-03-23 11:18:04 +05:30
Marica
e6ad39038e chore: Allow changing Work Stations in WO. (#24897) 2021-03-23 10:46:03 +05:30
Marica
4ccda9f799 chore: Allow changing Work Stations in WO. (#24898) 2021-03-23 10:45:57 +05:30
Deepesh Garg
ad9b65fcf2 fix: TDS check getting checked after reload (#24972) 2021-03-23 10:45:20 +05:30
Deepesh Garg
d1f15b2a88 fix: TDS check getting checked after reload (#24973) 2021-03-23 10:45:06 +05:30
Rohit Waghchaure
bde159a77d fix: total weight not set for free items 2021-03-22 23:36:48 +05:30
Deepesh Garg
48d5a65ef5 fix: Add test for pending shortfall update 2021-03-22 21:19:19 +05:30
Deepesh Garg
ea487b6c2e Revert "fix: GSTR B2C report" 2021-03-22 20:54:07 +05:30
Deepesh Garg
f112ce14cf fix: Pending shortfall update on processing loan security shortfall 2021-03-22 18:33:55 +05:30
Anupam
661b1e59c1 Merge branch 'develop' of https://github.com/frappe/erpnext into planning 2021-03-22 11:48:11 +05:30
Anupam
4980dd616b fix: resolving commits 2021-03-22 11:23:47 +05:30
Anuja Pawar
c7c921495b fix: payment reference on adding cost center in PE and Issue Summary Report error fixes (#24951) 2021-03-22 11:21:15 +05:30
Rucha Mahabal
dffa647071 fix: membership renewal validation (#24963) (#24964) 2021-03-20 22:24:55 +05:30
Rucha Mahabal
5e1cb5e4bc fix: membership renewal validation (#24963) 2021-03-20 22:22:01 +05:30
Sagar Vora
a85959f574 fix: remove unwanted parameter in calculate_rate_and_amount (#24883)
* fix: remove unwanted parameter in calculate_rate_and_amount

* fix: translation syntax
2021-03-20 16:37:33 +05:30
Walstan Baptista
22054044a3 test: created a new user to test warehouse user perms (#24954)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-20 16:35:14 +05:30
Jannat Patel
08855182a3 test: fix test_loan for payroll module (#24946)
* test: fix test_loan for payroll module

* fix: minor style changes
2021-03-19 16:34:14 +05:30
rohitwaghchaure
98a40d81d5 Merge pull request #24957 from rohitwaghchaure/revert-stock-balance-value-calculation-v13-pre
fix: revert stock balance value calculation
2021-03-19 16:22:51 +05:30
rohitwaghchaure
081499c0c0 Merge pull request #24956 from rohitwaghchaure/revert-stock-balance-value-calculation-develop
fix: revert stock balance value calculation
2021-03-19 16:22:13 +05:30
Rohit Waghchaure
67d94ac0cc fix: revert stock balance value calculation 2021-03-19 16:21:30 +05:30
Rohit Waghchaure
f21a55c8ef fix: revert stock balance value calculation 2021-03-19 16:19:34 +05:30
Deepesh Garg
23af1ed372 Merge pull request #24947 from deepeshgarg007/multi_currency_lcv_issues_v13
fix: Allow user to update exchange rate in Multi-currency LCV
2021-03-18 21:21:57 +05:30
Deepesh Garg
b75cbeee4d fix: Allow user to update exchange rate in Multi-currency LCV 2021-03-18 21:20:44 +05:30
Deepesh Garg
9b0a9cc2c0 Merge pull request #24912 from deepeshgarg007/multi_currency_lcv_issues
fix: Allow user to update exchange rate in Multi-currency LCV
2021-03-18 21:20:06 +05:30
Deepesh Garg
adcf9a42bd Merge pull request #24916 from deepeshgarg007/nil_exempt_gstr_3b
fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report
2021-03-18 21:02:51 +05:30
Deepesh Garg
a5de22cb8e Merge pull request #24918 from deepeshgarg007/nil_exempt_gstr_3b_v13
fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report
2021-03-18 21:02:41 +05:30
Walstan Baptista
6df61d217f test: created a new user to test child perms (#24943)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-18 19:23:59 +05:30
Sagar Vora
6ac11a04b0 test: added warehouse for TCS Item as it is a Stock Item (#24942) 2021-03-18 18:07:21 +05:30
Sagar Vora
8ee1146f72 test: add stock to avoid NegativeStockError (#24941) 2021-03-18 17:45:25 +05:30
Mohammad Hasnain Mohsin Rajan
192ab05869 ci: use ubuntu 18 specifically (#24904) 2021-03-18 17:12:12 +05:30
Afshan
a04091aaf7 fix: exclude current doc while validation. (#24914) 2021-03-18 16:40:43 +05:30
Sagar Vora
b134b89fb0 test: fix NegativeStockError (#24936) 2021-03-18 16:36:40 +05:30
pateljannat
a2068d9b98 feat: profitability report 2021-03-18 15:25:22 +05:30
Sagar Vora
78e576ee6a fix: default total_estimated_cost to zero (#24939)
Co-authored-by: walstanb <walstanb@gmail.com>
2021-03-18 15:23:52 +05:30
Ankush Menat
c0a9c391eb fix: hide alt tag if item is not shown in website 2021-03-18 14:07:24 +05:30
Deepesh Garg
d39055785a Merge pull request #24934 from Anuja-pawar/fix_report_issue_summary
fix: Report Issue Summary fix for zero issues
2021-03-18 12:24:43 +05:30
Anuja Pawar
9bf1083d9e fix: payment references from disappearing on selecting cost center (#24831)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-03-18 11:22:24 +05:30
Rushabh Mehta
14c3c5172d fix(minor): rearrange the cards on home workspace 2021-03-18 10:45:38 +05:30
Anuja P
2c8a38d9fa fix: report issue summary fix for zero issues 2021-03-18 10:36:46 +05:30
Sagar Vora
500f54e515 test: fix shift type not found (#24929) 2021-03-17 23:25:04 +05:30
Sagar Vora
52bbd4e182 test: clear Leave Period before running Leave Allocation tests (#24928) 2021-03-17 22:37:59 +05:30
Mohammad Hasnain Mohsin Rajan
7f906f9aaa chore: add sider config (#24892)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-17 20:06:35 +05:30
Sagar Vora
c647b6088a ci: update badge in README and add push event trigger (#24911) 2021-03-17 20:04:59 +05:30
Sagar Vora
19bb8c1137 ci: get branch name from GITHUB_REF if GITHUB_BASE_REF not available (#24913) 2021-03-17 20:03:54 +05:30
Sagar Vora
7645315424 test: set correct qty when creating subcontract transfer entry (#24903) 2021-03-17 20:01:21 +05:30
Sagar Vora
95e9b2fd6e refactor(payroll): simplified logic for additional salary (#24907) 2021-03-17 19:58:56 +05:30
Sagar Vora
f4a6c7823a test: create new item instead of using _Test Item to prevent error (#24915) 2021-03-17 19:57:53 +05:30
Sagar Vora
cf3fc99b12 test: fix salary component not found; other optimisation (#24920) 2021-03-17 19:54:08 +05:30
Rucha Mahabal
bacfaa4396 fix: calculate 80g certificate amount on validate for memberships (#24925) (#24926) 2021-03-17 19:51:59 +05:30
Rucha Mahabal
cbd67e662f fix: calculate 80g certificate amount on validate for memberships (#24925) 2021-03-17 19:49:27 +05:30
Anurag Mishra
abf974daee fix: precision and formated document 2021-03-17 18:55:04 +05:30
Rohit Waghchaure
77add49c6a fix: don't club same free item 2021-03-17 18:49:54 +05:30
Deepesh Garg
438d9cad90 fix: Remove print statement 2021-03-17 18:04:05 +05:30
Deepesh Garg
f9519c7e13 fix: Group nil exempted and non gst items separately 2021-03-17 18:03:58 +05:30
Deepesh Garg
f9f0e347ed fix: Remove print statement 2021-03-17 18:03:17 +05:30
Deepesh Garg
084ec9773e fix: Group nil exempted and non gst items separately 2021-03-17 18:00:08 +05:30
Anurag Mishra
23b6294f5c Merge pull request #24842 from resilient-tech/allow-duplicate-additional
fix(payroll): allow duplicate additional salaries
2021-03-17 17:39:52 +05:30
Deepesh Garg
a5987782bd fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report 2021-03-17 15:49:44 +05:30
Deepesh Garg
56c20fb79f fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report 2021-03-17 15:47:03 +05:30
Rohit Waghchaure
a9b1347600 fix: nonetype object has no attribute options 2021-03-17 14:30:34 +05:30
Rohit Waghchaure
ff70e61d7a feat: recursive product discount 2021-03-17 14:30:34 +05:30
Deepesh Garg
22f5ff8492 fix: Allow user to update exchange rate in Multi-currency LCV 2021-03-17 10:56:52 +05:30
Sagar Vora
68aaf12902 test: use _Test Company to avoid Holiday List error (#24902) 2021-03-17 10:06:05 +05:30
Sagar Vora
bce904cf97 test: fix Employee Not Found errors (#24906) 2021-03-17 10:03:30 +05:30
Sagar Vora
65d7f2c798 fix(Project): get correct holiday list when calculating dates; test fixes (#24901) 2021-03-17 10:00:35 +05:30
Andy Zhu
6117ac5aff fix: copy_parent_value_in_all_row function error 2021-03-17 13:53:02 +13:00
Raffael Meyer
344cb11a21 Merge branch 'develop' into improve_taxes_setup 2021-03-16 18:38:16 +01:00
Anurag Mishra
8fbb043190 Merge pull request #24824 from resilient-tech/fix-salary
refactor(payroll): simplified logic for additional salary
2021-03-16 21:42:10 +05:30
Rucha Mahabal
00cce433a5 fix(Non Profit): Membership and Donation API fixes (#24900) (#24905)
* fix: Donation fixes

- differentiate between subscription payment and payment

- issue with donation amount

* fix: existing membership validation

* fix: ignore subscription payments while capturing donations
2021-03-16 20:52:53 +05:30
Rucha Mahabal
1482b2883f fix(Non Profit): Membership and Donation API fixes (#24900)
* fix: Donation fixes

- differentiate between subscription payment and payment

- issue with donation amount

* fix: existing membership validation

* fix: ignore subscription payments while capturing donations
2021-03-16 20:08:51 +05:30
Prssanna Desai
b74436d535 Merge pull request #24896 from prssanna/redesign-fixes 2021-03-16 16:08:15 +05:30
prssanna
1cdef8bd97 style: missing semicolon 2021-03-16 15:39:16 +05:30
prssanna
b8b89a02af fix: item variant dialog dropdown issue 2021-03-16 14:16:22 +05:30
prssanna
f1dbc021fc fix: issue web list style 2021-03-16 14:15:59 +05:30
Deepesh Garg
65165fcc80 Merge pull request #24894 from deepeshgarg007/add_account_method_v13
fix: Add method for regional round off account back
2021-03-16 13:25:24 +05:30
Deepesh Garg
d4a3cf1395 Merge branch 'version-13-beta-pre-release' of https://github.com/frappe/erpnext into add_account_method_v13 2021-03-16 13:24:33 +05:30
Anurag Mishra
5cc322e01d Merge pull request #24877 from Anurag810/settings_for_eanbling_leave_notificstion
feat: Add checkbox for disabling leave notification in HR Settings
2021-03-16 13:23:16 +05:30
Deepesh Garg
635c480771 fix: Add method for regional round off account back 2021-03-16 13:22:20 +05:30
Afshan
46eb4b2f90 Merge branch 'develop' into settings_for_eanbling_leave_notificstion 2021-03-16 13:15:55 +05:30
Deepesh Garg
4470291243 Merge pull request #24893 from deepeshgarg007/add_account_method
fix: Add method for regional round off account back
2021-03-16 13:13:50 +05:30
Deepesh Garg
004f9e6b0c fix: Add method for regional round off account back 2021-03-16 13:09:59 +05:30
Anurag Mishra
6bafbffee0 fix: added also for leave applier as requested 2021-03-16 13:01:39 +05:30
Anurag Mishra
54482fd83f feat: added for disabling leave notification in HR settings 2021-03-16 13:01:39 +05:30
Marica
3f14aafa67 Merge pull request #24891 from marination/pos-opening-entry-pre-release
fix: POS Opening Entry with empty balance detail rows
2021-03-16 12:44:22 +05:30
Rushabh Mehta
45735b35c4 fix(minor): login: set as Login to ERPNext 2021-03-16 12:22:31 +05:30
marination
dd7d71ca2e fix: POS Opening Entry with empty balance detail rows 2021-03-16 12:05:37 +05:30
Rushabh Mehta
6ef213e5c6 fix(minor): patch add_state_code_for_ladakh 2021-03-16 11:59:54 +05:30
Marica
4d869906b6 Merge branch 'develop' into drop-shipping 2021-03-16 11:43:46 +05:30
Deepesh Garg
7f2e45e0f4 fix: Unequal debit and credit issue on RCM Invoice (#24838)
* fix: Unequal debit and credit issue on RCM Invoice

* fix: Travis
2021-03-15 18:04:47 +05:30
Deepesh Garg
93f925fb98 fix: Unequal debit and credit issue on RCM Invoice (#24836)
* fix: Unequal debit and credit issue on RCM Invoice

* fix: Travis

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-03-15 18:04:42 +05:30
Raffael Meyer
db24b13a7d Merge branch 'develop' into improve_taxes_setup 2021-03-15 13:27:56 +01:00
rohitwaghchaure
e838d1c7f0 Merge pull request #24882 from rohitwaghchaure/fixed-validation-for-job-card-v13-beta
fix: validation of job card in stock entry
2021-03-15 17:35:35 +05:30
Anurag Mishra
4f6f224544 Merge pull request #24622 from Anurag810/suplier_portal_fixes
fix: supplier was not able to Submit RFQ due to insufficient permission
2021-03-15 16:33:49 +05:30
Anurag Mishra
5e475f85b9 Merge branch 'develop' into suplier_portal_fixes 2021-03-15 16:21:55 +05:30
Raffael Meyer
6d5ea4cee8 Merge branch 'develop' into improve_taxes_setup 2021-03-15 11:40:39 +01:00
Rohit Waghchaure
00a0e8da10 fix: validation of job card in stock entry 2021-03-15 14:15:10 +05:30
Marica
3575314260 Merge branch 'develop' into drop-shipping 2021-03-15 12:53:45 +05:30
Marica
4ceea333a7 fix: POS Opening Entry with empty balance detail rows (#24876) 2021-03-15 12:49:14 +05:30
Mohammad Hasnain Mohsin Rajan
46d5431bad fix: Github Action not failing when tests fail (#24867)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-15 11:17:19 +05:30
Anupam Kumar
ed42afc5e8 feat: price margin in buying (#24685) 2021-03-15 11:11:28 +05:30
Marica
5499401fcb Merge branch 'develop' into drop-shipping 2021-03-15 11:09:04 +05:30
Deepesh Garg
a2e4564464 fix: Prevent non sequential repayment entries 2021-03-15 10:32:38 +05:30
Anupam
d8f7a75eae feat: add total available stock field 2021-03-15 10:31:53 +05:30
Deepesh Garg
5165859e51 Merge pull request #24873 from GangaManoj/filter-bank-reconciliation
fix(Bank Reconciliation Tool): Filter Bank Account drop-down list
2021-03-15 10:21:14 +05:30
Deepesh Garg
61fb9bf869 fix: Loan Repayment entry cancellation on salary slip cancel 2021-03-14 21:25:21 +05:30
Ganga Manoj
ca03997ab5 fix(Bank Reconciliation): Filter Bank Account drop-down list 2021-03-13 22:21:07 +05:30
Deepesh Garg
e196be4d8a Merge pull request #24866 from resilient-tech/fix-test-import
test: fix import_doc call in test_shopify_settings
2021-03-13 19:12:15 +05:30
Sagar Vora
c5869d5b47 test: fix import_doc call in test_shopify_settings 2021-03-12 16:21:45 +05:30
Marica
51c500d446 fix: Don't throw exception on invoice lines when there is no item_code (fixes #24640) (#24864)
Co-authored-by: casesolved-co-uk <richard@casesolved.co.uk>
2021-03-12 15:51:45 +05:30
Afshan
5d66a2b326 fix: added correct path in hooks (#24862) 2021-03-12 15:51:34 +05:30
Afshan
9ab3bedd0a fix: added correct path in hooks (#24865) 2021-03-12 15:51:23 +05:30
marination
e685c787d2 fix: Sider (unused variables) 2021-03-12 14:24:09 +05:30
marination
86725a6580 fix: PO not created against all selected suppliers (drop shipping)
- Return list of created POs instead of first doc
- test case added
2021-03-12 14:12:46 +05:30
Mohammad Hasnain Mohsin Rajan
0f60f08f3e ci: Port CI test from Travis to Github Actions (#24846) 2021-03-12 14:09:52 +05:30
rohitwaghchaure
90ea17fbd6 Merge pull request #24825 from rohitwaghchaure/allow-to-set-item-in-batch-naming-pre
fix: allow to select item code in batch naming
2021-03-12 11:52:43 +05:30
Sagar Vora
6727792aaf test: fix syntax error 2021-03-11 18:12:01 +05:30
Raffael Meyer
fb68aba30d Merge branch 'develop' into improve_taxes_setup 2021-03-11 13:17:44 +01:00
Sagar Vora
514122bf6f refactor(payroll): simplified logic for additional salary 2021-03-11 17:22:11 +05:30
Nabin Hait
fe3529b194 fix: merge conflict 2021-03-11 16:45:41 +05:30
Nabin Hait
b5792872e9 Merge branch 'Anurag810-gratuity' into develop 2021-03-11 16:14:45 +05:30
Nabin Hait
6e3668dc30 fix: merge conflict 2021-03-11 16:14:27 +05:30
Ankush Menat
2b61491adb fix: use account_name only in consolidated report (#24840)
Don't use account_number and only rely on account_name for preparing
consolidated financial statement.

Related issue: ISS-20-21-10217
2021-03-11 16:05:58 +05:30
Rucha Mahabal
0b29f87fa2 feat(Non Profit): 80G Certificates and Donations (#24848)
* feat(Non Profit): 80G Certificates and Donations

* fix(Membership): Generate Invoice for membership webhook only if automation is enabled (#24849)
2021-03-11 16:02:23 +05:30
Rucha Mahabal
d1e331f77f fix(Membership): Generate Invoice for membership webhook only if automation is enabled (#24849) 2021-03-11 15:27:22 +05:30
Rucha Mahabal
be2c1fca7b feat(Non Profit): 80G Certificates and Donations (#24657)
* feat: 80G Certificates

* feat: add non-profit custom fields for India

* feat: 80G Certificate print format for memberships

* feat: Donation doctype and API endpoint to capture donations via razorpay

* chore: Rename Membership Settings to Non Profit Settings

* chore: clean up Non Profit Settings

- Rename fields, better labels

- patch for renaming

* feat: Webhook secret generation for Razorpay donations in Non-Profit Settings

* feat: Payment Entry for donations

- added Donor as Party Type

- setting for automating payment entries for donations created via web form

* fix: linter and sider issues

* fix: translation syntax

* feat: PAN Details custom field for Indian donors

* feat: 80G certificates for Donations with Print Format

* fix: sider

* feat: validations for donor and donation

- create donor for website user from donations

- validate donor email

* feat: extract member name from subscription notes

* test: Donation

* test: Tax Exemption 80G Certificate

* chore: styling fixes

* fix: tests

* fix: sider

* feat: extract PAN number from additional subscription notes

* feat: Add creation user field in Non Profit Settings

fix: Payment Entry not generating for memberships and donations

* feat: update desk page

* fix: tests
2021-03-11 13:19:44 +05:30
Marica
63eb6bdb3c Merge pull request #24643 from CaseSolvedUK/sinvfix-v13
fix: Don't throw exception on invoice lines when there is no item_code
2021-03-11 10:47:24 +05:30
Sagar Vora
5822b6d76f fix(payroll): allow duplicate additional salaries 2021-03-10 21:45:32 +05:30
casesolved-co-uk
a780306ec7 fix: Don't throw exception on invoice lines when there is no item_code (fixes #24640) 2021-03-10 15:50:45 +00:00
Anupam Kumar
6f0fabc54e fix: gle issue in internal transfer(Purchase) (#24830) 2021-03-10 18:36:46 +05:30
rohitwaghchaure
a2063b1337 Merge pull request #24832 from ankush/consolidated_report_acc_name_fix
fix: use account_name only in consolidated report
2021-03-10 17:41:19 +05:30
Ankush Menat
59fdee4dfa Merge branch 'develop' into consolidated_report_acc_name_fix 2021-03-10 16:35:59 +05:30
Raffael Meyer
fbd810c2ae Merge branch 'develop' into improve_taxes_setup 2021-03-10 11:38:52 +01:00
Rucha Mahabal
c7fff34cf5 fix(travis): Customer Testcase Failing (#24833) 2021-03-10 15:51:44 +05:30
Ankush Menat
000fa824d3 fix: use account_name only in consolidated report
Don't use account_number and only rely on account_name for preparing
consolidated financial statement.

Related issue: ISS-20-21-10217
2021-03-10 15:23:48 +05:30
rohitwaghchaure
a0e7787f7b fix: removed show cancelled entries checkbox from the stock ledger report (#24826) 2021-03-10 13:46:42 +05:30
Anupam Kumar
77eaf2939a fix: rate of stock uom division by zero error (#24829) 2021-03-10 12:04:54 +05:30
Raffael Meyer
20cc2bb0d8 fix: autoname for Item Tax Template
* fix: autoname for Item Tax Template

Use title + company abbreviation instead of just title.

* fix: test records of Item Tax Template

* fix: rename item tax templates in test records

* Revert "fix: test records of Item Tax Template"

This reverts commit 53875c54ff.

* fix: rename hardcoded item tax templates in tests

* fix: rename hardcoded Item Tax Templates in tests

(2)

* fix: delete Item Tax Template with company
2021-03-10 10:24:43 +05:30
Marica
6ccd64c2ec Merge pull request #24464 from sgtpepper9907/feat-make-patient-age-translateable
feat: Make patient age translateable
2021-03-10 10:15:38 +05:30
Afshan
0623a34210 fix: added supplier warehouse field back again (#24827) 2021-03-10 09:46:38 +05:30
David Angulo
fe0f46c5b3 fix sider 2021-03-09 13:28:08 -06:00
David Angulo
06e99dfe7b fix sider 2021-03-09 13:23:48 -06:00
David Angulo
358153b04b fix sider 2021-03-09 13:19:12 -06:00
Francisco Roldán
894cff5aa4 fix: lms program and index missing context variables when is no data available (#24828)
* fix: program and index

* fix: moved default value to  get_course_progress
2021-03-09 23:35:24 +05:30
Afshan
27bcb2a064 fix: renamed "supplier_warehouse" to "set_from_warehouse" (#24816)
* fix: reverting and adding new field for supplier warehouse
2021-03-09 22:25:48 +05:30
Anupam Kumar
832098f042 fix: In-Transit Feature enhancements (#24652) 2021-03-09 21:14:25 +05:30
Syed Mujeer Hashmi
ec829786e9 fix: Add student category to student applicant (#24779)
* fix: Add student category to student applicant

Student category will be automatically fetched during program
enrollment while importing students into the system.

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

* fix: Allow student category during program enrollment

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>
2021-03-09 21:04:55 +05:30
Rohan
db2d196296 fix: do not send emails to disabled users from Employee Onboarding (#24795) 2021-03-09 21:03:45 +05:30
Rohit Waghchaure
535406cb0c fix: allow to select item code in batch naming 2021-03-09 21:01:12 +05:30
Jannat Patel
d7ac2394e8 fix: error in bulk attendance (#24806)
* fix: error in bulk attendance

* fix: no date selected scenario

* fix: translation and sider
2021-03-09 20:41:58 +05:30
Sagar Vora
78777d6ed4 fix: fetch Material Requests of type Customer Provided in Stock Entry using Get Items From (#24756)
Co-authored-by: walstanb <walstanb@gmail.com>
2021-03-09 20:35:08 +05:30
Afshan
e314b8b209 fix: general ledger report (#24770) 2021-03-09 20:31:57 +05:30
Afshan
9f6015a4e9 fix: batch no in POS (#24771)
* fix: batch no in list

* fix: check for batch no to be list
2021-03-09 20:31:14 +05:30
Shariq Ansari
261c42186f fix: updating phone icon setup logic for readonly fields (#24787)
* fix: updating phone icon setup logic for readonly fields

* fix: sider fix
2021-03-09 20:28:00 +05:30
Jannat Patel
fa73074250 fix: salary structure assign to employee (#24798)
* fix: salary structure assign to employee

* fix: pass data from dialog
2021-03-09 20:27:29 +05:30
Raffael Meyer
79b5be1830 fix: Group German VAT Accounts (#24804)
* fix: group account for tax assets and liabilities (germany)

* fix: spacing
2021-03-09 20:26:43 +05:30
Deepesh Garg
06a6ee37cb fix: Ignore mandatory fields in opening invoice via Opening Invoice Creation tool (#24821) 2021-03-09 20:23:26 +05:30
Deepesh Garg
47c6d2e00f Merge pull request #24814 from AfshanKhan/fix-tds-computation-summary
fix: sending proper arguments for TDS Computation Summary report
2021-03-09 20:01:30 +05:30
Deepesh Garg
6249798d84 Merge pull request #24801 from ankush/dont_update_pe_title
fix: do not update PE title during data import
2021-03-09 19:47:21 +05:30
Deepesh Garg
79005a4a76 Merge pull request #24820 from resilient-tech/fix-company-breadcrumbs
fix: breadcrumbs for company
2021-03-09 19:46:39 +05:30
Marica
dfc5c45e50 Merge pull request #24701 from shariquerik/item-attribute-fix
fix: item attributes not editable until refresh
2021-03-09 18:44:59 +05:30
Marica
e1ee9034ef Merge branch 'develop' into item-attribute-fix 2021-03-09 18:35:44 +05:30
Marica
916b75a3a3 Merge pull request #24768 from ankush/salary_slip_error
chore: improve error message for missing fields.
2021-03-09 18:23:09 +05:30
Marica
5accf8adf5 Merge branch 'develop' into salary_slip_error 2021-03-09 18:20:54 +05:30
Ankush Menat
9b4e5bfa87 chore: improve error message for missing fields. 2021-03-09 13:59:14 +05:30
Marica
9d0a93dd92 Merge pull request #24761 from danielchalmers/patch-6
fix: Remove obsolete section titles from Quality Meeting doctype
2021-03-09 13:36:38 +05:30
Marica
5471265f92 Merge branch 'develop' into patch-6 2021-03-09 13:32:23 +05:30
walstanb
be98ee26cd fix: breadcrumbs for company 2021-03-09 13:03:52 +05:30
Marica
baa406e99f Merge pull request #24794 from alyf-de/set_value_instead_of_sql
fix: use set_value instead of sql
2021-03-09 11:54:31 +05:30
barredterra
99c8b8efcf Merge branch 'develop' into improve_taxes_setup 2021-03-08 20:00:59 +01:00
barredterra
ebd1d08e55 refactor: taxes setup
Better structure of input data.
2021-03-08 19:53:50 +01:00
Afshan
d1fb363a37 Merge branch 'develop' into fix-tds-computation-summary 2021-03-08 22:50:04 +05:30
Deepesh Garg
98cc7b1751 Merge pull request #24817 from AfshanKhan/fix-get_round_off_applicable_accounts-arguments
fix: call get_round_off_applicable_accounts() function when arguments available
2021-03-08 22:20:25 +05:30
Afshan
d95b59e90c fix: call function when arguments available 2021-03-08 18:19:53 +05:30
Ankush Menat
afc766bbf1 Merge branch 'develop' into dont_update_pe_title 2021-03-08 15:44:15 +05:30
Ankush Menat
5571b988dd fix: make title field read only 2021-03-08 15:43:03 +05:30
Ankush Menat
cc46866cd9 fix: do not update PE title during data import
Related issue: ISS-20-21-10132
2021-03-08 15:42:39 +05:30
Afshan
1002e36c53 fix: removed unused import 2021-03-08 14:39:19 +05:30
Afshan
fa932e2a3e fix: sending proper arguments for report 2021-03-08 14:36:40 +05:30
Deepesh Garg
48b0f0da96 Merge pull request #24776 from ankush/gst_invoice_validation
fix: Add warning for invalid GST invoice numbers
2021-03-07 18:09:00 +05:30
rohitwaghchaure
15c0199e07 Merge pull request #24811 from rohitwaghchaure/minor-fixes-for-work-order
fix: minor changes in work order
2021-03-07 12:53:29 +05:30
Rohit Waghchaure
4c089b5852 minor fixes 2021-03-07 12:17:59 +05:30
Deepesh Garg
45870317f2 Merge pull request #24797 from UrvashiKishnani/patch-1
fix: total row in AR/AP summary report
2021-03-06 21:28:04 +05:30
Saqib
92b0691c68 fix: einvoice button visiblity condition (#24800) 2021-03-06 19:00:08 +05:30
Deepesh Garg
36a0085905 Merge pull request #24799 from danielchalmers/patch-8
fix: typo in Charts of Account doctype
2021-03-06 13:11:26 +05:30
Deepesh Garg
3e0a9383b4 Merge pull request #24789 from ankush/track_settings
fix: track setting changes
2021-03-06 13:09:58 +05:30
Deepesh Garg
9cbdfe17e4 Merge pull request #24793 from alyf-de/tax_category_quick_entry
fix: make quick entry for Tax Category work
2021-03-06 13:04:58 +05:30
Saurabh
202ef92fa1 Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-03-05 09:34:01 +05:30
Saurabh
4e1206bf21 bumped to version 13.0.0-beta.13 2021-03-05 09:54:01 +05:50
barredterra
25afad3dc1 refactor: extend taxes and charges setup
Add option to specify taxes and charges template depending on the CoA used. Differentiate between purchase, sales and item taxes. Maintain flexibility by using wildcards.
2021-03-04 21:11:31 +01:00
barredterra
dcfc3d7d12 fix: remove redundant calls to create_sales_tax 2021-03-04 19:29:55 +01:00
Saqib Ansari
49e4693abf fix(patch): updating pos closing reference in merge log 2021-03-04 11:58:45 +05:30
Daniel Chalmers
9b4a258c89 Chart Of Accounts -> Chart of Accounts 2021-03-04 00:15:46 -06:00
UrvashiKishnani
27ea23223d fix: total row in AR/AP summary report 2021-03-04 09:21:25 +04:00
Raffael Meyer
f1d13a4ff3 Merge branch 'develop' into track_settings 2021-03-03 12:40:37 +01:00
barredterra
1521b31795 fix: use set_value instead of sql 2021-03-03 12:33:48 +01:00
barredterra
53d261702a fix: make quick entry for Tax Category work 2021-03-03 11:52:48 +01:00
Ankush Menat
7c4c42ad67 refactor: move regex patterns to global variables 2021-03-03 14:56:19 +05:30
Ankush Menat
7c78220eac Merge branch 'develop' into gst_invoice_validation 2021-03-03 13:38:14 +05:30
Ankush Menat
9b3f5d5f67 test: add tests for gst invoice name checks 2021-03-03 13:36:59 +05:30
Ankush Menat
a44df63a91 fix: Add warning for invalid GST invoice numbers
GST Invoice numbers should be 16 characters alphanumeric with dash(/) or
slash(-) only. Add check for doc.name before saving and warn about
naming series.
2021-03-03 11:26:12 +05:30
Deepesh Garg
82c6223196 Merge pull request #24745 from ankush/no_team_updates
fix(HR): hide "more" button from team updates
2021-03-02 18:55:34 +05:30
Deepesh Garg
ecde26409b Update team_updates.js 2021-03-02 18:54:50 +05:30
Deepesh Garg
846500e8bc Merge pull request #24751 from danielchalmers/patch-2
chore: Add description field & enable quick entry
2021-03-02 18:53:51 +05:30
Deepesh Garg
11092d0824 feat: Additon of leave details in Salary Slip (#24674)
* feat: Additon of leave details in Salary Slip

* fix: Change leaves to leave
2021-03-02 18:38:31 +05:30
Deepesh Garg
a5c4558f8b feat: Additon of leave details in Salary Slip (#24674)
* feat: Additon of leave details in Salary Slip

* fix: Change leaves to leave
2021-03-02 18:36:48 +05:30
Deepesh Garg
7a5b6021b9 Merge pull request #24772 from anupamvs/si-timesheet
feat: provision to pull timesheet in sales invoice
2021-03-02 18:05:42 +05:30
Ankush Menat
7d892438f0 fix: track setting changes 2021-03-02 17:50:58 +05:30
Deepesh Garg
f06c166ee4 Merge pull request #24773 from UrvashiKishnani/patch-1
fix: GL Entries for AP/AR Summary
2021-03-02 17:49:13 +05:30
Jannat Patel
b27d4f6095 fix: salary slip working hours increment (#24784) 2021-03-02 17:44:42 +05:30
Nabin Hait
d96be3f9f1 Reposting patch and earned leave rounding (#24783)
* fix: rounding of earned leave is optional (#24782)

* fix: reposting patch fixes (#24775)
2021-03-02 17:02:47 +05:30
Nabin Hait
190106a8b8 fix: rounding of earned leave is optional (#24782) 2021-03-02 13:38:14 +05:30
Nabin Hait
bd10d7c028 fix: reposting patch fixes (#24775) 2021-03-02 13:37:45 +05:30
Anupam
47ce85484b feat: provistion to pull timesheet in sales invoice 2021-03-02 11:31:26 +05:30
UrvashiKishnani
810a36105c fix: GL Entries for AP/AR Summary without SQL join
SQL query modified to fetch only those GL Entries for Accounts Payable Summary and Accounts Receivable Summary reports where the corresponding payment entry is not in cancelled state.
2021-03-02 08:20:03 +04:00
Deepesh Garg
f45756d821 Merge pull request #24735 from FHenry/fix_create_item_tax_with_salespurchasetax
fix: add item taxes at the same times as sales and purchase taxes
2021-03-01 20:52:42 +05:30
Deepesh Garg
236a232de0 Merge pull request #24769 from rohitwaghchaure/allow-to-set-item-in-batch-naming
fix: allow to select item code in batch naming
2021-03-01 20:25:14 +05:30
Daniel Chalmers
2efdfa26b4 fix: Change FieldType from Text to Text Editor in Non-Conformance DocType (#24760)
* Enable Text Editors

Enable rich Text Editors for Corrective Action and Preventive Action fields. Closes #24759

* Update non_conformance.json
2021-03-01 15:44:16 +05:30
UrvashiKishnani
10e4b9d4e8 fix: GL Entries for AP/AR Summary
SQL query modified to fetch only those GL Entries for Accounts Payable Summary and Accounts Receivable Summary reports where the corresponding payment entry is in submitted state.
2021-03-01 12:50:07 +04:00
Rohit Waghchaure
eb6b3cfe6d fix: allow to select item code in batch naming 2021-03-01 11:32:39 +05:30
Anuja Pawar
8755339cba fix: to update sales person's incentives on save (#24179) 2021-03-01 10:44:13 +05:30
Saqib
fa777555b7 fix(india): inflated item tax rate for e-invoicing (#24752) 2021-02-28 20:46:23 +05:30
Deepesh Garg
d7a81be56d Merge pull request #24742 from deepeshgarg007/project_filter_search_fields
fix: Add searchfields in project query
2021-02-27 18:20:56 +05:30
Deepesh Garg
6fdd859a10 Merge pull request #24700 from deepeshgarg007/rounding_issue_fix
fix: Issue on posting inter-warehouse transfer invoice
2021-02-27 17:30:01 +05:30
Deepesh Garg
b5819c74c8 Merge branch 'develop' of https://github.com/frappe/erpnext into project_filter_search_fields 2021-02-27 17:29:11 +05:30
Daniel Chalmers
28da945ecd Update quality_meeting.json 2021-02-26 21:14:12 -06:00
Daniel Chalmers
56f6dbb666 Remove obsolete section titles 2021-02-26 21:11:56 -06:00
Daniel Chalmers
aa09628358 Skill fields: enable allow_in_quick_entry 2021-02-26 15:24:34 -06:00
rohitwaghchaure
630ce6e531 Merge pull request #24754 from rohitwaghchaure/fixed-repost-item-valuation-patch
fix: reposting patch
2021-02-26 23:58:29 +05:30
rohitwaghchaure
0e89d71d34 Merge pull request #24755 from rohitwaghchaure/fixed-repost-item-valuation-patch-v13-pre
fix: reposting patch
2021-02-26 23:58:10 +05:30
Rohit Waghchaure
9f13a060f0 fix: reposting patch 2021-02-26 17:44:54 +05:30
Rohit Waghchaure
c603fd638b fix: reposting patch 2021-02-26 17:42:52 +05:30
Saqib
3dfa017f1d refactor: (coa importer) create coa tree with account no & account name (#23601) 2021-02-26 16:50:22 +05:30
Saqib
2a1b1537f9 fix(pos): rounded total and search fixes (#24738) 2021-02-26 16:49:28 +05:30
Daniel Chalmers
9803835436 Add "description" field to Skill doctype
Lets us describe a skill past just the title. Closes #23592
2021-02-26 00:33:48 -06:00
Deepesh Garg
28ca4ec79d Merge branch 'develop' into fix_create_item_tax_with_salespurchasetax 2021-02-26 10:43:15 +05:30
Deepesh Garg
f8a7e000f5 Merge pull request #24746 from deepeshgarg007/unique_remove
fix: Remove unique check from represents company field
2021-02-25 22:41:22 +05:30
Deepesh Garg
27da2bb63a fix: Remove unique check from represents company field 2021-02-25 22:39:47 +05:30
Ankush Menat
027db0b41e fix(HR): hide "more" button from team updates 2021-02-25 21:29:00 +05:30
Deepesh Garg
b85fb0c3a4 Merge branch 'develop' into rounding_issue_fix 2021-02-25 20:17:35 +05:30
Ankush Menat
dca307e7cc feat: track changes to HR settings (#24739)
related issue: FR-ISS-259927
2021-02-25 19:05:07 +05:30
Syed Mujeer Hashmi
286e00bdf2 fix: Fetch Task subject from Task (#24729) 2021-02-25 19:02:54 +05:30
Afshan
1be997beb4 fix: reference variable in pricing rule (#24711) 2021-02-25 19:01:32 +05:30
Deepesh Garg
2d0b277ce0 Merge pull request #24054 from gwhitney/other_app_acc_dims
feat(Accounting Dimension): accounting dimension doctypes for other apps
2021-02-25 18:48:42 +05:30
Anurag Mishra
02f50a93e5 fix: copy variants property and Attributes whil duplicatinh item Tamplate (#24662) 2021-02-25 18:47:17 +05:30
Anuja Pawar
118a4ffb08 fix: rounding error in finished goods qty (#24653) 2021-02-25 18:44:44 +05:30
Mohammad Hasnain Mohsin Rajan
8cdba8ab64 fix: ams integration breaks when error raised (#24383) 2021-02-25 18:36:19 +05:30
Deepesh Garg
6af3c3fa2a Merge pull request #24722 from danielchalmers/patch-1
fix: Allow renaming skills
2021-02-25 15:44:44 +05:30
Deepesh Garg
2e320cfdc3 Merge pull request #24588 from deepeshgarg007/subscription_fix_new
fix: Multiple fixes in subscription
2021-02-25 15:41:51 +05:30
Deepesh Garg
7a837170ea Merge branch 'develop' of https://github.com/frappe/erpnext into other_app_acc_dims 2021-02-25 15:41:03 +05:30
Deepesh Garg
b990e71b4c fix: Add search field in project query 2021-02-25 14:01:22 +05:30
Deepesh Garg
834a8b740d Merge branch 'develop' into subscription_fix_new 2021-02-25 11:24:27 +05:30
Deepesh Garg
409c37ebeb Merge pull request #24723 from ankush/opening_round_gl
fix: make round off GLE always non-opening
2021-02-25 09:04:45 +05:30
Ankush Menat
325a461c34 Merge branch 'develop' into opening_round_gl 2021-02-25 07:53:48 +05:30
Daniel Chalmers
d3e122259d Update skill.json 2021-02-24 17:13:48 -06:00
Florian HENRY
e11ce57f3c fix: add item taxes at the same times as sales and purchase taxes 2021-02-24 21:45:29 +01:00
Afshan
684fc4e27b fix: asset category name disappear (#24728) 2021-02-24 19:08:56 +05:30
Afshan
6bd2bbc953 fix: show custom button for saved projects (#24730)
* fix: show custom button for saved projects

* fix: slider
2021-02-24 18:13:10 +05:30
rohitwaghchaure
d0baa90b50 Merge pull request #24715 from rohitwaghchaure/fixed-patch-item-reposting-develop
fix: patch failing because of incorrect gl entries
2021-02-24 17:18:43 +05:30
Afshan
84184559bc fix: currency symbol in update items (#24726) 2021-02-24 16:51:11 +05:30
Saurabh
d713ac4505 Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-02-24 15:01:19 +05:30
Saurabh
fefacced13 bumped to version 13.0.0-beta.12 2021-02-24 15:21:19 +05:50
Shariq Ansari
1dba7d2161 fix: Added parent task expected end date validation (#24611)
* fix: Added parent task expected end date validation

* fix: implemented suggested code

* fix: updated test case
2021-02-24 12:39:23 +05:30
rohitwaghchaure
8212b62598 Merge pull request #24724 from rohitwaghchaure/change-log-for-v13-beta-12
chore: change log
2021-02-24 12:31:05 +05:30
Rucha Mahabal
402fcbd489 Merge pull request #24716 from pateljannat/issue-custom-buttons
fix: custom buttons in issue
2021-02-24 11:47:29 +05:30
Rohit Waghchaure
f613d41408 chore: change log 2021-02-24 11:20:29 +05:30
Ankush Menat
23c30e43f0 fix: make round off GLE always non-opening
Opening GL entries can not be for profit and loss accounts. Round off
accounts are by default P&L account. Hence when making opening entry,
make round off entries as non-opening.

Related issue: ISS-20-21-09677
2021-02-24 11:03:24 +05:30
Daniel Chalmers
c04ed62863 Allow renaming skills 2021-02-23 22:02:09 -06:00
rohitwaghchaure
8faf8e4b25 Merge pull request #24718 from rohitwaghchaure/fixed-patch-item-reposting-pre-release
fix: patch failing because of incorrect gl entries
2021-02-24 00:43:16 +05:30
Rohit Waghchaure
39b5ad8e69 fix: patch failing because of incorrect gl entries 2021-02-23 18:35:36 +05:30
Rohit Waghchaure
bc8c9de26d fix: patch failing because of incorrect gl entries 2021-02-23 18:26:48 +05:30
Deepesh Garg
231aec9257 Merge pull request #24478 from nextchamp-saqib/tcs_calculation
feat: tax collected at source using tax withholding category
2021-02-23 18:04:38 +05:30
pateljannat
1e2772d389 fix: custom buttons in issue 2021-02-23 17:55:51 +05:30
Ankush Menat
d5656f4b76 fix(india): Escape json characters in text fields (#24699)
Escape all text fields and add helpful error message if JSON decode
error does happen.
2021-02-23 17:26:37 +05:30
Nabin Hait
d46b23699c fix: optimize reposting of gle and sle (#24702)
* fix(india): escape for special characters in JSON (#24695)

JSON does not accept special whitespace characters like tab, carriage
return, line feed

Ref: https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

Related issue: ISS-20-21-09811

* fix: Accounting Dimension creation background job timeout

* fix(regional): vehicle no is mandatory for ewaybill generation (#24679)

* fix: vehicle no required for e-invoice

* fix: ewaybill generation dialog condition

* fix: excluding unidentified accounts from gstr-1

* fix: optimize reposting of sle and gle (#24694)

* fix: optimize update_gl_entries_after method

* fix: Optimized reposting patch

* fix: accounting dimensions

* added reload_doc in patch

* Update item_reposting_for_incorrect_sl_and_gl.py

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>

* fix: Replaced spaces with tabs

* fix: merge conflict

* fix: test cases

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
Co-authored-by: pateljannat <pateljannat2308@gmail.com>
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2021-02-23 16:38:52 +05:30
Saqib
eb1233425e Merge branch 'develop' into tcs_calculation 2021-02-23 15:58:18 +05:30
Saqib Ansari
85c91ca2db Merge branch 'develop' into tcs_calculation 2021-02-23 15:56:29 +05:30
Saqib Ansari
2fb3647a4c Merge branch 'develop' into tcs_calculation 2021-02-23 15:55:36 +05:30
Deepesh Garg
c532b99a4c Merge pull request #24708 from AfshanKhan/fix-column-name-BOM-Stock-Calculated-report
fix: column names in report BOM Stock Calculated
2021-02-23 13:56:14 +05:30
Afshan
ae63d66b8f fix: column names 2021-02-23 13:38:52 +05:30
Deepesh Garg
3dd0e49525 Merge pull request #24703 from deepeshgarg007/loan_test_precision_fix_new
fix: Precision fixes in loans
2021-02-23 11:22:52 +05:30
Deepesh Garg
8f8d9744f1 Merge pull request #24629 from deepeshgarg007/loan_dashboard
feat: Loans Dashboard
2021-02-23 11:22:32 +05:30
Deepesh Garg
b5a2320b33 fix: Precision fixes in loans 2021-02-22 23:04:48 +05:30
Nabin Hait
19f8fa59d3 fix: optimize reposting of sle and gle (#24694)
* fix: optimize update_gl_entries_after method

* fix: Optimized reposting patch

* fix: accounting dimensions

* added reload_doc in patch

* Update item_reposting_for_incorrect_sl_and_gl.py

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2021-02-22 22:27:22 +05:30
Mohammad Hasnain Mohsin Rajan
07f40596bc feat(Bank Reconciliation): Redesign (#24273)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-22 22:19:47 +05:30
Nabin Hait
866cf70d3a fix: validate pan 2021-02-22 21:35:00 +05:30
shariquerik
f5d6bd77e5 fix: item attributes not editable until refresh 2021-02-22 21:27:14 +05:30
Deepesh Garg
c839177f8e fix: Issue on posting inter-warehouse transfer invoice 2021-02-22 21:04:51 +05:30
Marica
214951a9c6 Merge pull request #24631 from AfshanKhan/fix-valuation-errror-customer-provided
fix: check if customer provided item while setting opening stock
2021-02-22 20:10:27 +05:30
Nabin Hait
69a6bed106 fix: Replaced spaces with tabs 2021-02-22 20:03:23 +05:30
Shridhar Patil
58399f6524 fix: next follow up date should be always greater then current time (#24308) 2021-02-22 19:37:38 +05:30
Nabin Hait
0ca74ce04b fix: Fixes related to client script renaming (#24698) 2021-02-22 19:32:51 +05:30
Ankush Menat
98a0feab89 fix(india): escape for special characters in JSON (#24695)
JSON does not accept special whitespace characters like tab, carriage
return, line feed

Ref: https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

Related issue: ISS-20-21-09811
2021-02-22 19:30:02 +05:30
Deepesh Garg
bb8cd1cdaa feat: Basic validation for indian PAN No. in Supplier (#24687) 2021-02-22 19:28:45 +05:30
Shariq Ansari
8676bedd18 fix: Add phone icon on read only phone fields (#24680)
* fix: Add phone icon on read only phone fields

* fix: sider fix
2021-02-22 19:28:01 +05:30
Saqib
14472f6bab fix(regional): vehicle no is mandatory for ewaybill generation (#24679)
* fix: vehicle no required for e-invoice

* fix: ewaybill generation dialog condition
2021-02-22 19:27:23 +05:30
Afshan
fdafb55fba fix: error message when making reverse journal entry (#24665) 2021-02-22 19:25:57 +05:30
Marica
28c834ac95 Merge branch 'develop' into fix-valuation-errror-customer-provided 2021-02-22 16:00:28 +05:30
rohitwaghchaure
311bb6452f Merge pull request #24691 from deepeshgarg007/accounting_dimension_timeout
fix: Accounting Dimension creation background job timeout
2021-02-22 15:29:41 +05:30
Deepesh Garg
0c15f75524 Merge pull request #24696 from frappe/revert-24505-loan_exposure_report_fix
Revert "fix: Error handling in loan reports and precision fixes"
2021-02-22 15:13:11 +05:30
Deepesh Garg
d780f56ba8 Revert "fix: Error handling in loan reports and precision fixes" 2021-02-22 15:12:35 +05:30
Afshan
133ebc1d51 Merge branch 'develop' into fix-valuation-errror-customer-provided 2021-02-22 14:16:33 +05:30
Marica
ed1c7649cd Merge pull request #24553 from nextchamp-saqib/quality-inspection-parameter-group
feat: introduce parameter group in quality inspection
2021-02-22 13:53:14 +05:30
Marica
4a1ffcf742 Merge branch 'develop' into quality-inspection-parameter-group 2021-02-22 11:34:34 +05:30
Afshan
01b4ee8a3c Merge branch 'develop' into fix-valuation-errror-customer-provided 2021-02-22 11:17:45 +05:30
Deepesh Garg
aa46def745 fix: Accounting Dimension creation background job timeout 2021-02-21 21:54:23 +05:30
Deepesh Garg
e4964a0c6c fix: Update color in charts 2021-02-21 21:03:42 +05:30
Deepesh Garg
e53fd87669 fix: Rearrange cards 2021-02-21 20:57:56 +05:30
Deepesh Garg
cbb4fe2cce fix: Add cards 2021-02-21 20:57:30 +05:30
Deepesh Garg
a6d0610730 Merge pull request #24505 from deepeshgarg007/loan_exposure_report_fix
fix: Error handling in loan reports and precision fixes
2021-02-20 17:57:09 +05:30
Deepesh Garg
e12398e75e Merge pull request #24682 from frappe/michellealva-leave
fix: typo in Leave Balance Report
2021-02-20 17:53:04 +05:30
Deepesh Garg
75b01e3d72 Merge pull request #24683 from frappe/michellealva-patch-1
fix: Typo in Leave Application
2021-02-20 17:52:38 +05:30
Deepesh Garg
bbadebcf64 Merge branch 'develop' into loan_exposure_report_fix 2021-02-20 17:32:17 +05:30
Deepesh Garg
6f29f67a83 Merge pull request #24667 from pateljannat/gstr-1-unidentified-accounts-issue
fix: excluding unidentified accounts from gstr-1
2021-02-20 17:27:56 +05:30
Michelle Alva
43f126ed13 fix: Typo in Leave Application
Change "Leaves" to "Leave"
2021-02-20 10:46:22 +05:30
Michelle Alva
ab149f196e fix: typo in Leave Balance Report
Change Leaves to Leave
2021-02-20 10:43:47 +05:30
rohitwaghchaure
1aad27a539 Merge pull request #24612 from rohitwaghchaure/fixed-validation-for-job-card
fix: [minor] validation of job card in stock entry
2021-02-19 21:22:57 +05:30
Saqib Ansari
8c7c682f17 chore: make parameter group optional 2021-02-19 20:35:23 +05:30
Deepesh Garg
6a5ef261f2 feat: Normal rounding for GST Taxes (#24488)
* feat: Normal rounding for GST Taxes

* fix: Add test case

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-19 14:30:23 +05:30
Deepesh Garg
811ff5c397 Merge pull request #24669 from deepeshgarg007/transaction_delete_fix
fix: Do not delete GST Accounts from GST Settings on clearing transactions from Company Master
2021-02-19 10:54:56 +05:30
Deepesh Garg
7efbbcf3aa fix: Do not delete GST Accounts from GST Settings on clearing transactions from Company Master 2021-02-19 10:53:58 +05:30
Marica
a43aea0dc1 Merge pull request #24482 from pateljannat/rfq-contact-email-set
fix: RFQ contact email set
2021-02-19 10:23:07 +05:30
Deepesh Garg
bc857522ad fix: Loan Interest Accrual Chart 2021-02-19 10:13:56 +05:30
Ankush Menat
3248da9089 fix(India): Add GST state code for Ladakh 2021-02-18 21:32:48 +05:30
Anupam Kumar
b1997da488 feat: capture Rate of stock UOM in purchase (#24315)
* feat: capture Rate of stock UOM in purchase

* fix: review changes

* added server side code

* added stock uom rate in sales transactions

* fix: review changes

* fix: resolving conflicts

* adding patch

* fix: removing patch
2021-02-18 21:32:05 +05:30
Jannat Patel
4cef0f5983 fix: salary slip attribute error (#24455)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-02-18 21:30:13 +05:30
Ankush Menat
d9c84dff0f fix(selling): cancel sales order with cancelled PE
Allow cancelling sales order with cancelled payment entry. Ignoring GL
entries while cancelling the document is required to cancel it, reverse
entries are created by accounts controller.

Related issue: ISS-20-21-09586
2021-02-18 21:29:12 +05:30
Ankush Menat
3508ed176b test(selling): add test for cancelling sales order
Add failing test to reproduce bug in cancelling sales order with advance
payments

Related issue: ISS-20-21-09586
2021-02-18 21:29:03 +05:30
Nabin Hait
186a045e28 fix: update qty in future sle (#24649)
* fix: update qty in future sle

* fix: validate cancellation due to ongoing reposting

* fix: process sle against current timestamp
2021-02-18 21:28:28 +05:30
Nabin Hait
deddcc513d fix: stock and account balance syncing (#24644)
* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: minor fix
2021-02-18 21:28:16 +05:30
Rohit Waghchaure
83f5468ca1 fix: patch 2021-02-18 21:28:03 +05:30
rohitwaghchaure
7797e9d3ac fix: added patch to fix incorrect stock qty and account value (#24628) 2021-02-18 21:27:01 +05:30
Nabin Hait
f2be0805f7 fix: formatting query args (#24627) 2021-02-18 21:25:59 +05:30
rohitwaghchaure
76f616565e fix: Consolidated Financial Statement report not works if child company account not present in parent company (#24580)
Fixed conflicts
2021-02-18 21:25:40 +05:30
Ankush Menat
4b2cbdc2dd fix: update total in words after updating items (#24602)
* fix: Update total in words after Updating items

Update total in words after Updating items in sales/purchase orders.
Port of #24592

Closes ISS-20-21-09425

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

Add test for total & words after updating items in sales order.
2021-02-18 21:25:00 +05:30
rohitwaghchaure
83792ec009 fix: reposting issue with same posting date and posting time (#24570)
* fix: reposting issue with same posting date and posting time

* Update erpnext/stock/stock_ledger.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 21:24:48 +05:30
Nabin Hait
56e6ca6285 fix: couple of travis fixes (#24554)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-02-18 21:24:31 +05:30
Afshan
33f4419a78 fix: StopIteration error when e-invoice not enabled (#24548)
* fix: StopIteration error when e-invoice not enabled

* chore: update message

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-02-18 21:23:38 +05:30
Deepesh Garg
d60a40ae82 fix: Add accounts user role permission for accounting dimension filter 2021-02-18 21:23:20 +05:30
Afshan
83768b68c1 fix: emp disappear (#24525)
* fix: emp disappear

* fix: renamed set_totals_call to set_totals

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 21:20:14 +05:30
Saqib
90ff48baa3 refactor: POS Invoice merging and cancellation (#24351)
* feat: pos invoice merging with background jobs

* fix: invoice threshold for queueing job

* refactor: cancellation flow of point of sale

* feat: tests for cancellation of pos closing

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-02-18 21:00:34 +05:30
Saqib
e965d0ff90 fix: discount amount calculation on net total (#24497) 2021-02-18 20:59:46 +05:30
Saqib
fd4bed1a38 fix(e-invoice): do not validate gstin for exports (#24561) 2021-02-18 20:59:26 +05:30
Saqib
ade96589b4 fix(e-invoice): skip e-invoice generation for non-taxable invoices (#24568) 2021-02-18 20:58:54 +05:30
Saqib
18c7c45cfe fix: NoneType has no len() (#24600) 2021-02-18 20:55:53 +05:30
Saqib
4fb547179d fix: customer_currency referenced before assignment (#24607) 2021-02-18 20:53:49 +05:30
Saqib
a439d19917 feat(pos): mpesa related fixes & additions (#24306)
* fix: switching of mode of payments

* feat: transaction limit for mpesa integration

* feat: resend payment request if one fails

* feat: make new request only for failed ones

* fix: invalid amount for mpesa request

* fix: payment successful message not shown

* fix: url and business shortcode for live env

* fix: duplicate items validation for pos invoices

* fix: pos closing entry queued status

* fix: peroid end date for amended pos closing
2021-02-18 20:53:26 +05:30
Saqib
57c2e07c45 fix: validate cancellation only if irn generated (#24608) 2021-02-18 20:45:27 +05:30
Anupam Kumar
4dad1f01ba fix: contact permmission issue (#24503) 2021-02-18 20:26:39 +05:30
Rucha Mahabal
73c2d23a9a feat: Department Wise Appointment Type charges (#24572)
* feat: Appointment Type Service Items

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* fix: set practitioner service item charges mandatory on item selection

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* feat: use charges from appointment type during billing

* feat: handle appointment charges priority for invoice automation

* test: patient appointment auto invoicing scenarios

* fix: sider

* fix: minor fixes

Co-authored-by: muhammad <muhammadmp@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 20:22:41 +05:30
Anupam Kumar
6485eeb302 fix: portal permission issue (#24577) 2021-02-18 20:21:39 +05:30
pateljannat
4858b40813 fix: excluding unidentified accounts from gstr-1 2021-02-18 18:44:29 +05:30
Marica
77d72d59ef Merge branch 'develop' into quality-inspection-parameter-group 2021-02-18 16:55:44 +05:30
Marica
f3ca4bcb70 Merge branch 'develop' into rfq-contact-email-set 2021-02-18 16:51:50 +05:30
Rucha Mahabal
ccc80927f6 feat: Department Wise Appointment Type charges (#24572)
* feat: Appointment Type Service Items

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* fix: set practitioner service item charges mandatory on item selection

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* feat: use charges from appointment type during billing

* feat: handle appointment charges priority for invoice automation

* test: patient appointment auto invoicing scenarios

* fix: sider

* fix: minor fixes

Co-authored-by: muhammad <muhammadmp@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 16:41:10 +05:30
Raffael Meyer
d44e60f17c feat: add Print Language to Lead and Opportunity (#24317)
* fix: move "Print Language" to "More Information"

* feat: add "Print Language" in "More Information"

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-02-18 16:24:37 +05:30
Rucha Mahabal
e7bf87cc84 fix: POS return for Serialized Items (#24292)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-02-18 16:04:35 +05:30
Jannat Patel
ef5c714de2 fix: salary slip attribute error (#24455)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-02-18 15:52:29 +05:30
Rohit Waghchaure
c697cb8b2d fix: validation of job card in stock entry 2021-02-18 15:10:12 +05:30
Nabin Hait
d826bee13a fix: update qty in future sle (#24649)
* fix: update qty in future sle

* fix: validate cancellation due to ongoing reposting

* fix: process sle against current timestamp
2021-02-18 14:14:21 +05:30
Anurag Mishra
5ec592d09c fix: supplier was not able to Submit RFQ due to in sufficient permission 2021-02-18 13:42:04 +05:30
Deepesh Garg
c5b94adc87 Merge pull request #24651 from ankush/ignore_gl_while_cancelling_so
fix(selling): cancel sales order with cancelled PE
2021-02-17 18:39:35 +05:30
rohitwaghchaure
03a1484aed Merge pull request #24621 from rohitwaghchaure/fixed-consolidated-report-not-working-develop
fix: Consolidated Financial Statement report not works if child compa…
2021-02-17 16:35:43 +05:30
Marica
208d1942c3 Merge branch 'develop' into quality-inspection-parameter-group 2021-02-17 12:56:35 +05:30
Marica
a9de890993 Merge pull request #24534 from pateljannat/item_group_on_update_items
fix: item_group on update items
2021-02-17 11:17:49 +05:30
Marica
7de7bb5202 Merge branch 'develop' into item_group_on_update_items 2021-02-16 23:06:20 +05:30
Marica
b43c2e5d7c Merge pull request #24613 from marination/shopping-cart
fix: Shopping cart breaks without Payment Gateway Account
2021-02-16 23:05:19 +05:30
Marica
4441cebbb3 Merge branch 'develop' into shopping-cart 2021-02-16 20:55:00 +05:30
Ankush Menat
3f16902b00 fix(selling): cancel sales order with cancelled PE
Allow cancelling sales order with cancelled payment entry. Ignoring GL
entries while cancelling the document is required to cancel it, reverse
entries are created by accounts controller.

Related issue: ISS-20-21-09586
2021-02-16 18:53:40 +05:30
Ankush Menat
f9d4d9a095 test(selling): add test for cancelling sales order
Add failing test to reproduce bug in cancelling sales order with advance
payments

Related issue: ISS-20-21-09586
2021-02-16 18:45:39 +05:30
prssanna
9c36dc3798 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2021-02-16 16:17:32 +05:30
prssanna
7166b6740f fix: duplicate css property 2021-02-16 16:17:17 +05:30
Nabin Hait
9b178bcd10 fix: stock and account balance syncing (#24644)
* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: minor fix
2021-02-16 14:57:00 +05:30
Prssanna Desai
f1c0f680f4 Merge pull request #24645 from prssanna/hub-image
fix: broken image style
2021-02-16 12:02:28 +05:30
prssanna
7e8113c7e8 fix: broken image style 2021-02-16 12:00:35 +05:30
rohitwaghchaure
29878e5c3b Merge pull request #24642 from rohitwaghchaure/fixed-patch-item_reposting_for_incorrect_sl_and_gl
fix: patch
2021-02-16 10:39:31 +05:30
Rohit Waghchaure
9a40c1b2e1 fix: patch 2021-02-16 10:35:10 +05:30
rohitwaghchaure
d60ff83b6f fix: added patch to fix incorrect stock qty and account value (#24628) 2021-02-16 09:12:27 +05:30
Deepesh Garg
79f63526cb Merge pull request #24632 from ankush/ladakh_gst_addition
fix(India): Add GST state code for Ladakh
2021-02-15 21:11:54 +05:30
Deepesh Garg
e2324c77fe fix: Test Cases 2021-02-15 20:01:32 +05:30
Nabin Hait
243661b37b fix: formatting query args (#24627) 2021-02-15 19:27:49 +05:30
Rushabh Mehta
8cc6a2d62c fix(typo): erpnext-logo.png 2021-02-15 17:40:50 +05:30
Rushabh Mehta
b0735732f9 fix(minor): add erpnext-logo.png 2021-02-15 17:38:55 +05:30
Deepesh Garg
df4eed4c0d Merge pull request #24615 from ruchamahabal/packed-item-fixes_v13
fix: Issues with packing items
2021-02-15 16:44:10 +05:30
Deepesh Garg
47f5f4757a Merge branch 'develop' into fixed-consolidated-report-not-working-develop 2021-02-15 16:35:31 +05:30
Deepesh Garg
b6cd97e5fc Merge pull request #24320 from pateljannat/ldc-validations
fix: validation for ldc against supplier and section code
2021-02-15 16:33:41 +05:30
Deepesh Garg
535dc4aea2 fix: Do not round off per day interest 2021-02-15 15:54:25 +05:30
Ankush Menat
57c3d373a7 fix(India): Add GST state code for Ladakh 2021-02-15 15:03:50 +05:30
Afshan
e963362dfd fix: check if customer provided item while setting opening stock 2021-02-15 15:00:37 +05:30
Deepesh Garg
429fb3bba8 Merge branch 'develop' of https://github.com/frappe/erpnext into loan_exposure_report_fix 2021-02-15 14:10:10 +05:30
Deepesh Garg
9bf05ad927 feat: Loans Dashboard 2021-02-15 13:32:50 +05:30
Richard Case
fd4e7bdbb1 fix: plaid client version to support latest API (#24531) 2021-02-15 11:58:27 +05:30
Marica
45db1c5d74 Merge branch 'develop' into shopping-cart 2021-02-15 10:35:05 +05:30
rohitwaghchaure
164ffac4ef fix: Consolidated Financial Statement report not works if child company account not present in parent company (#24580)
Fixed conflicts
2021-02-12 17:33:07 +05:30
Nabin Hait
85252e7aef Merge branch 'develop' into packed-item-fixes_v13 2021-02-12 12:39:38 +05:30
Afshan
c44d6b9546 fix: NoneType object has no attribute len() (#24616) 2021-02-12 12:24:41 +05:30
Marica
87fcae4efd Merge branch 'develop' into shopping-cart 2021-02-12 12:16:13 +05:30
Rucha Mahabal
ad1f2b41f4 fix: Issues with packing items 2021-02-12 11:29:24 +05:30
Saqib Ansari
138e98fef2 Merge branch 'develop' into quality-inspection-parameter-group 2021-02-12 11:19:25 +05:30
Nabin Hait
1e6cce3593 Merge branch 'develop' into item_group_on_update_items 2021-02-11 21:59:38 +05:30
Jannat Patel
bb0d8f8038 Update accounts_controller.py 2021-02-11 20:59:28 +05:30
Anupam Kumar
7e1dcf911d feat: capture Rate of stock UOM in purchase (#24315)
* feat: capture Rate of stock UOM in purchase

* fix: review changes

* added server side code

* added stock uom rate in sales transactions

* fix: review changes

* fix: resolving conflicts

* adding patch

* fix: removing patch
2021-02-11 20:19:30 +05:30
Afshan
ee87484134 fix: calculated discount percentage (#24510)
* fix: calculated discount percentage

* fix: slider

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 20:11:58 +05:30
Jannat Patel
0a7939277c fix: dynamic links for reports (#24462)
* fix: dynamic links for reports

* fix: revert changes for payment period report

* fix: link doctypes
2021-02-11 20:11:06 +05:30
marination
e2d0715cdf fix: Server side validation for missing payment gateway account 2021-02-11 19:06:10 +05:30
marination
8615227090 fix: Shopping cart breaks without Payment Gateway Account 2021-02-11 18:51:35 +05:30
Saqib
f25ab6f826 fix: validate cancellation only if irn generated (#24608) 2021-02-11 17:50:57 +05:30
Jannat Patel
6756d3b561 Merge branch 'develop' into item_group_on_update_items 2021-02-11 16:29:34 +05:30
Marica
819b8d0266 Merge branch 'develop' into rfq-contact-email-set 2021-02-11 14:45:09 +05:30
Saqib
0681a480c2 feat(pos): mpesa related fixes & additions (#24306)
* fix: switching of mode of payments

* feat: transaction limit for mpesa integration

* feat: resend payment request if one fails

* feat: make new request only for failed ones

* fix: invalid amount for mpesa request

* fix: payment successful message not shown

* fix: url and business shortcode for live env

* fix: duplicate items validation for pos invoices

* fix: pos closing entry queued status

* fix: peroid end date for amended pos closing
2021-02-11 14:06:15 +05:30
Shariq Ansari
a46a83b476 fix: Assignment Rule Unassign Condition doesn't work (#24551)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 13:41:10 +05:30
Nabin Hait
aa235b36e0 Update erpnext/controllers/accounts_controller.py
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-02-11 13:26:53 +05:30
Marica
a5039e8f85 Merge branch 'develop' into rfq-contact-email-set 2021-02-11 13:23:56 +05:30
Shariq Ansari
47f784aa9c fix: Lead not getting linked to call logs (#24593)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 13:23:51 +05:30
rohitwaghchaure
aa00eb9898 fix: reposting issue with same posting date and posting time (#24570)
* fix: reposting issue with same posting date and posting time

* Update erpnext/stock/stock_ledger.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 13:23:01 +05:30
Saqib
e37a5c2646 fix: customer_currency referenced before assignment (#24607) 2021-02-11 13:10:52 +05:30
Saqib
e07eb86498 Merge branch 'develop' into tcs_calculation 2021-02-11 12:13:47 +05:30
Saqib
15f4672ffa fix: pos closing valdation (#24605) 2021-02-11 12:11:44 +05:30
Jannat Patel
30c8873f24 fix: validation for disabled warehouse (#24539)
* fix: validation for disabled warehouse

* fix: better function name

* fix: validation in stock ledger entry
2021-02-11 11:46:48 +05:30
Kanchan Chauhan
bb05acb60d fix(Leave Application): List view fix (#24550) 2021-02-11 11:18:59 +05:30
Nabin Hait
9d3f242f39 Update subscription.js 2021-02-11 11:17:33 +05:30
Nabin Hait
b58b8ec2fb Merge branch 'develop' into quality-inspection-parameter-group 2021-02-11 11:14:02 +05:30
Anupam Kumar
e816ed89e6 fix: portal permission issue (#24577) 2021-02-11 11:12:13 +05:30
Anuja Pawar
e3c72a3d71 fix: fix filters for the report (#24594) 2021-02-11 11:06:12 +05:30
Afshan
8609d31430 fix: amend cancelled job offer (#24589) 2021-02-11 11:05:48 +05:30
Ankush Menat
df6e20887d fix: update total in words after updating items (#24602)
* fix: Update total in words after Updating items

Update total in words after Updating items in sales/purchase orders.
Port of #24592

Closes ISS-20-21-09425

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

Add test for total & words after updating items in sales order.
2021-02-11 11:04:39 +05:30
Nabin Hait
79ba299abc Merge branch 'develop' into subscription_fix_new 2021-02-11 11:03:45 +05:30
Suraj Shetty
969d37da4c Merge pull request #24598 from surajshetty3416/fix-favicon 2021-02-10 22:18:10 +05:30
Saqib
7b2afaf349 fix: NoneType has no len() (#24600) 2021-02-10 17:21:12 +05:30
Prssanna Desai
161e3954a8 Merge branch 'develop' into fix-favicon 2021-02-10 16:37:13 +05:30
Rucha Mahabal
3237f5bb88 fix: Inpatient Medication Orders report test (#24596) 2021-02-10 16:36:49 +05:30
Prssanna Desai
a751b6bb7a Merge pull request #24599 from frappe/product-query-fix
fix: also fetch item variants if hide variants is disabled
2021-02-10 16:36:40 +05:30
prssanna
fd0e8a4e23 fix: also fetch item variants if hide variants is disabled 2021-02-10 16:31:41 +05:30
Suraj Shetty
5f27c9e100 chore: Remove unnecessary image files 2021-02-10 15:48:58 +05:30
Suraj Shetty
6fa44fefc3 fix: Use new favicon 2021-02-10 15:48:32 +05:30
Marica
bb87950e96 Merge branch 'develop' into rfq-contact-email-set 2021-02-10 12:02:14 +05:30
pateljannat
1ab95413be fix: conditions simplified 2021-02-09 17:35:17 +05:30
Deepesh Garg
516b3ae1bc fix: get company attribute 2021-02-09 16:47:55 +05:30
Deepesh Garg
45cec6928b fix: get company attribute 2021-02-09 16:44:12 +05:30
Deepesh Garg
5006a2065e fix: Comment 2021-02-09 16:38:11 +05:30
Anurag Mishra
5164223b99 fix: error on group by filter (#24587)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-02-09 16:22:28 +05:30
pateljannat
637ddff6e9 fix: code cleanup 2021-02-09 16:17:30 +05:30
Deepesh Garg
e56daeb347 fix: Multiple fixes in subscription 2021-02-09 16:13:45 +05:30
Suraj Shetty
1016ff48fc fix: Create new call popup if call popup does not exists 2021-02-09 12:17:29 +05:30
Marica
6330e20d16 Merge pull request #24565 from marination/stock-dashboard-font-weight
fix: (ui) Empty State text font weight in Item Dashboard
2021-02-09 11:03:18 +05:30
Deepesh Garg
236c9ae453 Merge pull request #24578 from marination/acc-dimension-update-fix
fix: Avoid changing Ref. Doctype in Accounting Dimension after creation
2021-02-09 06:51:58 +05:30
Suraj Shetty
fbc3988037 Merge pull request #24581 from surajshetty3416/fix-telephony 2021-02-08 20:27:04 +05:30
Saqib
8991d4ed0b fix: fetching of standalone cr/dr notes for reconciliation (#24575) 2021-02-08 20:19:11 +05:30
Suraj Shetty
dcc9947d10 fix: Update call_popup
- Setup missed & call ended listeners
- Show contacts based on links
2021-02-08 20:13:23 +05:30
Suraj Shetty
c5248b30eb fix: Do not re-use call popup if call ID is different 2021-02-08 18:50:05 +05:30
Suraj Shetty
ba26020a82 fix: Show audio interface in call log which has recording URL
- Also, remove unneccesary column & section break in call log doctype
2021-02-08 18:45:55 +05:30
Suraj Shetty
723e6dd73f fix: Update style of call log shown in timeline 2021-02-08 18:43:26 +05:30
Suraj Shetty
c4d67c2afe refactor: Move call_popup style from less to scss
- Add style for audio
2021-02-08 18:42:27 +05:30
marination
5a7ddba9a3 fix: Avoid changing Ref. Doctype in Accounting Dimension after creation 2021-02-08 17:06:23 +05:30
Afshan
53dbe39d12 fix: StopIteration error when e-invoice not enabled (#24548)
* fix: StopIteration error when e-invoice not enabled

* chore: update message

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-02-08 12:32:42 +05:30
Saqib
9490122abb fix(e-invoice): skip e-invoice generation for non-taxable invoices (#24568) 2021-02-08 11:40:56 +05:30
Marica
0aef0fd764 Merge branch 'develop' into stock-dashboard-font-weight 2021-02-08 10:34:17 +05:30
marination
a97eb6a052 fix: Empty State text font weight in Item Dashboard 2021-02-07 22:27:40 +05:30
Saqib
f29b811a56 fix(e-invoice): do not validate gstin for exports (#24561) 2021-02-06 17:55:20 +05:30
Anuja Pawar
ffb36aac8f fix: fixing item_code not found error in the report (#24483) 2021-02-05 23:35:47 +05:30
Nabin Hait
c4a1bb0e1c fix: couple of travis fixes (#24554)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-02-05 23:34:18 +05:30
prssanna
4742a25942 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2021-02-05 17:35:29 +05:30
prssanna
91b41db9e3 fix: check if product_info exists before setting price 2021-02-05 17:34:56 +05:30
Prssanna Desai
ec337f64d9 Merge pull request #24556 from anupamvs/s-c-changes 2021-02-05 17:26:55 +05:30
Anupam
d7f4aefd00 feat: added continue-shopping button on cart 2021-02-05 16:17:20 +05:30
Prssanna Desai
b8f4cdfbce Merge pull request #24555 from prssanna/product-query-fix
fix: check if product_info exists
2021-02-05 14:54:23 +05:30
prssanna
a7820f310c fix: check if product_info exists 2021-02-05 14:52:31 +05:30
Afshan
b814b002ce fix: creating salary slip from timesheet (#24541) 2021-02-05 11:34:55 +05:30
Saqib Ansari
8c3da162ba feat: introduce parameter group in quality inspection 2021-02-04 19:39:41 +05:30
Saqib
0f2dc0eb73 Merge branch 'develop' into tcs_calculation 2021-02-04 18:38:26 +05:30
Deepesh Garg
eff675f45b Merge pull request #24536 from deepeshgarg007/accounts_user_perm
fix: Add accounts user role permission for accounting dimension filter
2021-02-03 12:10:12 +05:30
Deepesh Garg
dce73d1881 fix: Add accounts user role permission for accounting dimension filter 2021-02-03 12:06:36 +05:30
pateljannat
0701f08ab6 fix: item_group on update items 2021-02-03 11:53:14 +05:30
Nabin Hait
7177579051 fix: Dependant sle logic fixes (#24489)
* fix: Dependant sle logic fixes

* fix: negative qty validation

* fix: Travis fixes
2021-02-02 22:03:07 +05:30
Saurabh
df589594cd Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-02-02 20:58:26 +05:30
Saurabh
7645e5319d bumped to version 13.0.0-beta.11 2021-02-02 21:15:21 +05:50
Afshan
c0f8f32801 fix: fetch query for employee (#24529) 2021-02-02 20:27:23 +05:30
Saurabh
17433d2c90 fix: version number 2021-02-02 17:40:11 +05:30
Nabin Hait
243d59b0c3 Reposting logic fixes (#24520)
* fix: Dependant sle logic fixes

* fix: negative qty validation

* fix: Travis fixes

* fix: test fix
2021-02-02 16:55:13 +05:30
Afshan
10b00f9d0d fix: separation of salary creation from payroll (#24528)
* fix: separation of salary creation from payroll

* fix: removed unnecessary veriable

* fix: check existing sal slips

* fix: existing checks

* style: refactoring query
2021-02-02 16:24:01 +05:30
Saqib Ansari
ef65d6463e Merge branch 'develop' into tcs_calculation 2021-02-02 13:53:20 +05:30
Anupam Kumar
7d64a291b8 fix: contact permmission issue (#24503) 2021-02-02 12:43:13 +05:30
Afshan
91a02868cb fix: emp disappear (#24525)
* fix: emp disappear

* fix: renamed set_totals_call to set_totals

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-02 11:04:25 +05:30
Afshan
8676089794 fix: emp disappear (#24524)
* fix: emp disappear

* fix: renamed set_totals_call to set_totals

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-02 11:02:22 +05:30
Nabin Hait
bf97eb2d3b core: Added change log (#24526) 2021-02-02 10:57:55 +05:30
Suraj Shetty
54a253616a Merge pull request #24508 from frappe/rebrand-ui 2021-02-02 09:07:35 +05:30
rohitwaghchaure
f9642eb333 Merge pull request #24522 from rohitwaghchaure/fixed-pricing-rule-travis-issues-develop
fix: test cases for pricing rule
2021-02-01 23:07:37 +05:30
Rohit Waghchaure
d4d639c7ed fix: test cases for pricing rule 2021-02-01 23:01:18 +05:30
rohitwaghchaure
6d462e058b Merge pull request #24521 from rohitwaghchaure/fixed-pricing-rule-travis-issues
fix: test cases for pricing rule
2021-02-01 23:00:24 +05:30
Rohit Waghchaure
5c28416daa fix: test cases for pricing rule 2021-02-01 22:58:22 +05:30
Suraj Shetty
d809de6579 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 22:40:46 +05:30
Suraj Shetty
852e67c5ee fix(patch): Use db_set to ignore validation 2021-02-01 22:40:40 +05:30
prssanna
6f1664223d style: missing semicolon 2021-02-01 20:43:30 +05:30
prssanna
44a055b52f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:39:20 +05:30
Marica
0ea2587679 fix: Numeric/Non-numeric QI UX (#24516)
* chore: Show 1 field each of both types of Insoections in grid view

* fix: Make QI check Numeric by default and make checkbox "Numeric"

- Reducing cognitive load
2021-02-01 20:38:53 +05:30
Marica
003ae90e12 fix: Numeric/Non-numeric QI UX (#24517)
* chore: Show 1 field each of both types of Insoections in grid view

* fix: Make QI check Numeric by default and make checkbox "Numeric"

- Reducing cognitive load
2021-02-01 20:38:32 +05:30
prssanna
73d60aa498 style: fix formatting 2021-02-01 20:38:17 +05:30
Suraj Shetty
cfb5f58141 style: Fix formatting issues 2021-02-01 20:37:18 +05:30
Saurabh
9dcb286c31 fix: consider select perm while setting party details (#24518) 2021-02-01 20:36:15 +05:30
Suraj Shetty
723bd9676d style: Fix formatting issues 2021-02-01 20:34:21 +05:30
prssanna
62442d1c52 style: fix formatting 2021-02-01 20:26:09 +05:30
rohitwaghchaure
bf7317d4e2 fix: multiple pricing rule issue (#24509) 2021-02-01 20:22:14 +05:30
rohitwaghchaure
68edf749ec fix: multiple pricing rule issue (#24515) 2021-02-01 20:22:02 +05:30
Saurabh
081f506992 fix: consider select perm while setting party details (#24514) 2021-02-01 20:18:44 +05:30
prssanna
9a69c0e21e Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:13:01 +05:30
prssanna
526ea46ae2 fix: formatting issues 2021-02-01 20:12:47 +05:30
Suraj Shetty
159063db29 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:09:58 +05:30
Suraj Shetty
8586c08639 chore: Update translation syntax checker 2021-02-01 20:09:42 +05:30
Suraj Shetty
f57efd1150 style: Fix invalid translation syntax usages 2021-02-01 20:09:20 +05:30
Marica
2fa840e5d4 chore: Use sql to set naming series in older projects (#24513)
* chore: Use sql to set naming series in older projects

* fix: Remove unncessary db.commit()
2021-02-01 20:07:00 +05:30
Marica
fb016edb7a chore: Use sql to set naming series in older projects (#24512)
* chore: Use sql to set naming series in older projects

* fix: Remove unncessary db.commit()
2021-02-01 20:05:29 +05:30
prssanna
53225f5cbb Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:01:54 +05:30
prssanna
11eae6d51a fix: add default product-image css class 2021-02-01 20:01:37 +05:30
Suraj Shetty
8fef3a3814 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 19:52:12 +05:30
Suraj Shetty
1ab79da7d1 style: Fix formatting issues 2021-02-01 19:51:25 +05:30
prssanna
ba54c4f1b3 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 19:50:46 +05:30
prssanna
a3585e40f7 style: fix formatting 2021-02-01 19:50:27 +05:30
Suraj Shetty
8030abe1bd Merge branches 'rebrand-ui' and 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 19:41:03 +05:30
Suraj Shetty
f67bf7ae98 chore: Fix formatting issues 2021-02-01 19:40:44 +05:30
prssanna
1d346702ed chore: add .stylelintrc file 2021-02-01 19:07:32 +05:30
prssanna
7863118994 fix: docs link for store page in shopping cart settings 2021-02-01 18:57:30 +05:30
Saqib Ansari
cee3670167 chore: clean up sales invoice form 2021-02-01 15:45:26 +05:30
Suraj Shetty
13d48a0c20 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 15:11:07 +05:30
Suraj Shetty
055b81da7b Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 15:10:52 +05:30
Saqib
beebaf6e1e refactor: assets form cleanup with rebrand ui (#24494) 2021-02-01 11:22:57 +05:30
Deepesh Garg
ab88ec208e fix: Error handling in loan reports 2021-01-31 12:31:46 +05:30
Deepesh Garg
a67daefb41 Merge pull request #24496 from frappe/template-task-parent-child-deadlock
fix: Template task parent child deadlock
2021-01-30 18:50:24 +05:30
prssanna
2aebf99968 fix: add removed get_employee_emails function 2021-01-29 15:55:21 +05:30
Saqib
fb75f0935f Merge branch 'develop' into tcs_calculation 2021-01-29 14:26:48 +05:30
Saqib
77d5f59376 fix: discount amount calculation on net total (#24497) 2021-01-29 14:24:08 +05:30
pateljannat
fd91973ac1 fix: template task parent child deadlock 2021-01-29 13:18:39 +05:30
pateljannat
290f02acdb Merge branch 'version-13-beta-pre-release' of https://github.com/frappe/erpnext into version-13-beta-pre-release 2021-01-29 12:37:49 +05:30
rohitwaghchaure
275e29c819 Merge pull request #24495 from rohitwaghchaure/fixed-extra-trasnferred_qty_issue-develop-pre
fix: extra transferred qty has not consumed against work order
2021-01-29 12:34:18 +05:30
Rohit Waghchaure
aeba3d311c fix: extra transferred qty has not consumed against work order 2021-01-29 12:33:09 +05:30
rohitwaghchaure
cf3e0cf271 Merge pull request #24365 from rohitwaghchaure/fixed-extra-trasnferred_qty_issue-develop
fix: extra transferred qty has not consumed against work order
2021-01-29 12:28:28 +05:30
Saqib Ansari
3b2327ba8d fix: sider 2021-01-29 12:08:35 +05:30
Suraj Shetty
ba599f7676 chore: Update eslintrc - add cur_pos as global 2021-01-29 09:05:32 +05:30
Suraj Shetty
0a8939e1c1 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-29 08:56:22 +05:30
Deepesh Garg
989c853e3b Merge pull request #24490 from deepeshgarg007/report_ltv_ratio_fix
fix: LTV ratio in interest report
2021-01-28 23:28:40 +05:30
Deepesh Garg
7e3f5e04ab fix: LTV ration in interest report 2021-01-28 23:25:23 +05:30
Saqib
675a8330a4 refactor: POS Invoice merging and cancellation (#24351)
* feat: pos invoice merging with background jobs

* fix: invoice threshold for queueing job

* refactor: cancellation flow of point of sale

* feat: tests for cancellation of pos closing

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-01-28 18:42:43 +05:30
leela
3234df5581 feat: improved call log doctype
* Added links and some more fields into Call Log Doctype
* Display call info in the call log link pages
2021-01-28 18:34:58 +05:30
Saqib
62dfff5dde Merge branch 'develop' into tcs_calculation 2021-01-28 18:08:13 +05:30
Saqib Ansari
4d9b6066a2 fix: tcs amount calculation 2021-01-28 18:07:08 +05:30
Saqib
ac9e6ff704 fix(pos): multiple pos fixes and additions (#24227)
* fix: make custom fields in pos invoice similar to sales invoice

* feat: allow/disallow rate & discount change

* fix: any pos profile can be selected while creating pos opening

* fix: cannot add item to cart

* fix: validate phone payment only if payment request exists

* fix: replace pos payment method patch

* chore: rearrange item & customer group filter

* fix: allow/disallow invoice level discount

* fix: updating qty of item with uom having space char

* fix: move configuration checbox to config section

* fix: invalid item rate trigger

* fix: cannot remove item from draft invoices

* fix: customer currency not set in pos invoice

* fix: duplicate item error message

* fix: sales uom not fetched in pos invoice

* fix: cannot add taxes to pos invoice for uae region

* fix: cannot merge pos invoice into credit note

* fix: tax calculation while merging pos invoices

* feat: delete draft orders from order list

* fix: merging of pos invoice with pricing rules
2021-01-28 17:58:55 +05:30
Nabin Hait
a6213ccd61 Merge branch 'develop' into version-13-beta-pre-release 2021-01-28 17:36:08 +05:30
Anupam Kumar
0d9a8ae4d2 feat: shopping portal changes (#24445)
* feat: shopping portal changes

* fix: review changes

* review changes
2021-01-28 17:32:57 +05:30
Anupam
e6f925e5e6 review changes 2021-01-28 15:58:03 +05:30
Marica
56c6805d79 Merge branch 'develop' into fixed-extra-trasnferred_qty_issue-develop 2021-01-28 15:03:15 +05:30
Marica
26f6fa326c Merge pull request #24451 from marination/project-naming-series-patch
fix: Patch to Add Naming Series to old projects
2021-01-28 14:50:25 +05:30
Marica
9580adad0c Merge branch 'develop' into project-naming-series-patch 2021-01-28 14:32:11 +05:30
Marica
a16ad3063f Merge pull request #24127 from deepeshgarg007/lcv_multicurrency
feat: Multi currency in landed cost voucher
2021-01-28 13:35:37 +05:30
Marica
7aa16bafff Merge branch 'develop' into lcv_multicurrency 2021-01-28 13:29:36 +05:30
Deepesh Garg
b4be292217 fix: Item valuation for internal stock transfers (#24200)
* fix: Item valuation for internal stocktransfers

* fix: Consider conversion factor for invoices

* fix: Add missing set warehouse fields

* fix: Add validations and other fixes

* fix: Fixes in flow

* fix: Internal sales item link in Purchase Invoice

* fix: Debugging

* fix: Debug travis

* fix: Remove commented code

* fix: Rate forcing in sales order

* fix: Unreallized profit in Sales Register

* fix: Item wise gst sales register fix

* fix: From warehouse in Purchase Order

* fix: Target field in Sales Invoice

* fix: remove self

* fix: GST Purchasse register and other fixes

* fix: Add shipping_address to no field map

* fix: Ref doc map

* fix: Test Cases

* fix: address mapping between sales and purchase document

* fix: Import Error

* fix: Tax updation for internal invoices

* fix: Purchase Order and Invoice linking

* fix: Internal Party validation fix

* fix: validation

* fix(india): GST Taxes for intra state transfer

* fix(india): GST Taxes for intra state transfer

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-28 13:09:56 +05:30
Marica
465974cff0 Merge branch 'develop' into project-naming-series-patch 2021-01-28 13:01:28 +05:30
Marica
ed6368d782 Merge pull request #24481 from marination/stock-entry-indicator
chore: Set Stock Entry Form Indicators in setup
2021-01-28 13:00:24 +05:30
Marica
9e11521764 Merge pull request #24466 from marination/stock-entry-qi
fix: Always show QI Template in Item
2021-01-28 12:45:49 +05:30
Mohamed Almubarak
f7ea340181 fix(template): cards on second row overlaps the one before (#23454)
* Update macros.html

fix second row of cards overlapps with the one before

* Update macros.html

fix(template): second row of cards overlaps with the one before

* Update macros.html

fix(template): second row of cards overlaps with the one before
2021-01-28 12:32:13 +05:30
Jannat Patel
9f8cbe9101 Material request wrong status issue (#24019)
* fix: material request status fix

* fix: changing precision to global defaults for material request status

* fix: adding back the removed flt

* fix: sider issues fixed

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
2021-01-28 12:29:52 +05:30
Saqib
8e55677f10 feat: deleting account & stock entries on deletion of transaction (#24298)
* feat: control for deleting account & stock entries on deletion of a transaction

* chore: change label & fieldname

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-28 12:26:45 +05:30
Jannat Patel
3914aca647 fix: check for tax rate (#24376) 2021-01-28 12:25:15 +05:30
Anurag Mishra
5756bf50e6 fix: removed all day event from shift assignment calendar (#24397)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-28 12:24:39 +05:30
Afshan
e5529ad461 fix: validate tax template for tax category (#24402)
* fix: validate tax template for tax category

* Update sales_taxes_and_charges_template.py
2021-01-28 12:22:39 +05:30
Raffael Meyer
f6f4376463 feat: remove german sales invoice validation (#24441)
This can be better achieved via Customize Form
(mandatory and mandatory_depends_on)
2021-01-28 12:16:26 +05:30
Marica
cc22814df5 Merge branch 'develop' into lcv_multicurrency 2021-01-28 12:15:09 +05:30
Marica
cdccf4be52 Merge branch 'develop' into stock-entry-qi 2021-01-28 12:12:03 +05:30
Deepesh Garg
16bcd01f6d feat: Provision to disable serial no and batch selector (#24398)
* feat: feat: Provision to disbale serial no and batch selector

* fix: Sider issues

* fix: Linting issues
2021-01-28 12:09:35 +05:30
Deepesh Garg
bd9bdc5797 feat: Batch wise item pricing (#24470)
* feat: Batch wise item pricing

* fix: Rate for items with no batch

* fix: Add test case for batch pricing

* fix: Sider Issues

* fix: Add item filter for batch
2021-01-28 12:05:57 +05:30
marination
27bac2aaec fix: Missing semi-colon 2021-01-28 12:04:14 +05:30
pateljannat
55e7c5644c fix:rfq contact email set 2021-01-28 12:00:18 +05:30
marination
bc370b3ee5 chore: Set Stock Entry Form Indicators in setup
- Makes it easier to override via customisations
- Style consistency with other forms that set indicator in setup as well
2021-01-28 11:44:26 +05:30
Marica
ea7c2dbfaf Merge branch 'develop' into stock-entry-qi 2021-01-28 11:31:43 +05:30
Saqib
31eb740aef Merge branch 'develop' into tcs_calculation 2021-01-27 19:47:19 +05:30
Saqib Ansari
ae9a9a2167 fix: tcs chargable amount 2021-01-27 19:36:29 +05:30
Saqib Ansari
ff12f91486 feat: charging tcs on sales invoice 2021-01-27 19:17:38 +05:30
prssanna
74feaf85dc fix: website order page style 2021-01-27 17:41:15 +05:30
Saqib Ansari
6db14d02d2 fix: test 2021-01-27 17:11:34 +05:30
Saqib Ansari
58250aac10 feat: pan and tax withholding category fields for customer 2021-01-27 16:59:36 +05:30
Saqib Ansari
6f718a31f0 refactor: tax withholding category against customer 2021-01-27 16:59:07 +05:30
Afshan
907e2990d0 fix: remove function to get earning deduction components (#24465)
* fix: remove function to get earning deduction components

* fix: slider
2021-01-27 15:34:42 +05:30
Saqib
5ba2f58355 fix: e_invoice print format not showing other charges (#24474) 2021-01-27 12:34:08 +05:30
prssanna
2d1d900c88 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-27 10:58:17 +05:30
prssanna
72053cc4ab fix: cart address overflow 2021-01-27 10:57:34 +05:30
Deepesh Garg
dade7a4583 fix: Translation Syntax 2021-01-26 21:11:55 +05:30
Deepesh Garg
a0d61524c1 fix: Add distribute manually option in LCV 2021-01-26 17:05:00 +05:30
Deepesh Garg
ff3adfd1cf Merge pull request #24468 from deepeshgarg007/lse_report_fix
fix: Division by 0 error in security exposure reports
2021-01-26 10:13:39 +05:30
Deepesh Garg
7a4db2214a fix: Division by 0 error in security exposure reports 2021-01-26 10:10:35 +05:30
Deepesh Garg
224fdf34e4 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2021-01-25 22:16:02 +05:30
Raffael Meyer
1991ba7910 feat: temporary against account (#24086)
* feat: add temporaray against account nmber to datev settings

* feat: use temporary against account in datev report

* test: add temp against account number to test data

* test: include temp against aaccount in filters
2021-01-25 21:22:10 +05:30
Marica
35455d2de6 Merge branch 'develop' into project-naming-series-patch 2021-01-25 21:16:02 +05:30
marination
b0ef8fb7c5 fix: Always show QI Template in Item 2021-01-25 21:00:24 +05:30
David Angulo
e1e4810a46 feat: Make patient age translateable 2021-01-25 08:29:11 -06:00
rohitwaghchaure
fa3ec3c346 Merge pull request #23969 from marination/putaway
feat: Putaway
2021-01-25 16:42:04 +05:30
Suraj Shetty
0c34a711eb Merge branch 'develop' of github.com:frappe/erpnext into version-13-beta-pre-release 2021-01-25 16:06:38 +05:30
Anupam
8541d9738f fix: review changes 2021-01-25 14:18:26 +05:30
Marica
62a1caf6c4 Merge branch 'develop' into lcv_multicurrency 2021-01-25 12:39:16 +05:30
Marica
ec4f42d4a9 Merge branch 'develop' into project-naming-series-patch 2021-01-25 11:29:23 +05:30
Deepesh Garg
164079127f Merge pull request #24446 from deepeshgarg007/patch-fix-1-new
fix: Project Template patch
2021-01-25 10:37:43 +05:30
Deepesh Garg
befe32cbe1 Merge pull request #24456 from deepeshgarg007/ltv_in_report
fix: Add loan to value field in Loan Interest Report
2021-01-24 19:18:42 +05:30
Deepesh Garg
91eb9bb5c2 fix: Add loan to value field in Loan Interest Report 2021-01-24 19:15:57 +05:30
Kaviya Periyasamy
c680547be3 fix(einvoice): QRCode generation (#24412) 2021-01-24 10:59:37 +05:30
rohitwaghchaure
13df7a0ca6 Merge pull request #24033 from ruchamahabal/patient-history-enhancements
feat: Patient History Enhancements
2021-01-23 18:19:16 +05:30
Rucha Mahabal
8dc9d2f103 Merge pull request #24410 from ruchamahabal/service-units-in-appointment
feat: Allow selecting admission service unit in Patient Appointment for inpatients
2021-01-23 15:14:17 +05:30
Rucha Mahabal
ab920b55a7 Merge branch 'develop' into service-units-in-appointment 2021-01-23 13:27:03 +05:30
Rucha Mahabal
edf5da3394 Merge branch 'develop' into patient-history-enhancements 2021-01-23 13:26:36 +05:30
Rucha Mahabal
ee28328006 fix(travis): Issue Analytics Report Test (#24453) 2021-01-23 13:26:24 +05:30
Rucha Mahabal
6f4ad3b73d fix: sider 2021-01-23 12:52:41 +05:30
Rucha Mahabal
cb1da4d07c fix: doctype meta not loading while setting up fields 2021-01-22 19:26:56 +05:30
Marica
6b0d334d25 Merge pull request #24399 from pateljannat/item-wise-purchase-registry-item-name-error
fix: Item wise purchase registry item_name error
2021-01-22 19:20:51 +05:30
Deepesh Garg
5b4ece5054 fix: Update patch 2021-01-22 17:12:35 +05:30
marination
7ba60570e7 fix: Spaces to Tabs 2021-01-22 16:55:06 +05:30
marination
c908deea61 fix: Patch to Add Naming Series to old projects 2021-01-22 16:10:01 +05:30
Rucha Mahabal
75a93d9057 feat: fetch date field for custom doctypes 2021-01-22 15:51:25 +05:30
Afshan
217440952f fix: slider 2021-01-22 15:39:59 +05:30
Afshan
02d495f1fb fix: added query for fetching salary component 2021-01-22 15:39:59 +05:30
prssanna
2aa1efb70e fix: broken image style 2021-01-22 15:31:38 +05:30
Anurag Mishra
dfa78eb27d fix(HR): Remove payroll card from HR workspace
fix(HR): Remove payroll card from HR workspace
2021-01-22 13:56:09 +05:30
Rucha Mahabal
6058ea88e8 fix: SLA not applied automatically when priority is missing (#24447) 2021-01-22 13:35:08 +05:30
Marica
5631d014a7 Merge branch 'develop' into item-wise-purchase-registry-item-name-error 2021-01-22 12:35:35 +05:30
Deepesh Garg
0d26d24164 Merge pull request #24414 from Alchez/dev-irs-1099-year
fix: use supplied year for IRS 1099 forms
2021-01-22 12:17:43 +05:30
Deepesh Garg
cf7209f3d4 fix: Project Template patch 2021-01-22 11:47:13 +05:30
Anupam
988ea8d61d feat: shopping portal changes 2021-01-22 10:53:50 +05:30
Jannat Patel
02a7af1e6c fix: full form for opportunity in crm dashboard (#24436)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-22 10:03:29 +05:30
Rucha Mahabal
858ad20dd0 Merge branch 'develop' into service-units-in-appointment 2021-01-22 09:09:29 +05:30
Rucha Mahabal
7201498801 Merge branch 'develop' into patient-history-enhancements 2021-01-22 09:04:37 +05:30
Rucha Mahabal
b9a21c4824 feat: added search to the Select fields dialog in Patient History Settings 2021-01-22 09:00:40 +05:30
Rucha Mahabal
ded08245cc fix: duplicate filters added on patient change 2021-01-22 08:52:17 +05:30
rohitwaghchaure
3afc6b1333 Merge pull request #24437 from AfshanKhan/fix-stock-ageing
fix: stock ageing should not take cancelled stock entries.
2021-01-21 23:09:41 +05:30
Rucha Mahabal
8d60d301c8 Merge pull request #23865 from scmmishra/membership-enhancements-2
feat: enhancements to erpnext membership
2021-01-21 21:10:53 +05:30
Rucha Mahabal
7a21e40527 Merge branch 'develop' into membership-enhancements-2 2021-01-21 20:21:17 +05:30
Rucha Mahabal
02e424fae2 chore: Add description for settings 2021-01-21 20:16:17 +05:30
Rucha Mahabal
bcc0674d37 fix: test 2021-01-21 19:52:13 +05:30
Abhishek Balam
ea30e0a37d fix: change modified date 2021-01-21 19:38:37 +05:30
Abhishek Balam
ae3a9c1ead fix: remove payroll card from HR workspace 2021-01-21 19:33:19 +05:30
Suraj Shetty
f0ff23eac3 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 19:07:57 +05:30
Saqib
577d2bed6e fix: failing einvoice test (#24434) 2021-01-21 18:43:55 +05:30
Suraj Shetty
bed55bb7ba fix: Use multisql to support postgres 2021-01-21 18:36:50 +05:30
Afshan
96edfd93c9 fix: stock ageing should not take cancelled stock entries. 2021-01-21 18:22:35 +05:30
Rucha Mahabal
eee71f37d8 fix: test 2021-01-21 17:47:20 +05:30
Suraj Shetty
5f52f8d473 fix: Temporarily comment out help article link in issue timeline 2021-01-21 16:50:47 +05:30
Suraj Shetty
8670dda5b7 fix: Use abbr method for abbr 2021-01-21 16:47:04 +05:30
Rucha Mahabal
f1cca59d80 feat: update expiry for memberships 2021-01-21 16:36:15 +05:30
Suraj Shetty
2dcdeb8231 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 15:33:42 +05:30
Suraj Shetty
17ed3fc270 fix: Set css_style fallback 2021-01-21 15:33:36 +05:30
prssanna
f3d321fb82 fix: remove console.log 2021-01-21 15:31:42 +05:30
Rucha Mahabal
b9781a4675 fix: membership test cases 2021-01-21 15:13:29 +05:30
Suraj Shetty
0c0155e885 fix: Make birthday messages translatable 2021-01-21 14:59:19 +05:30
Suraj Shetty
8b1a720ae8 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 14:32:45 +05:30
Suraj Shetty
164fe37fa0 fix: Employee birthday reminder 2021-01-21 14:32:35 +05:30
Rucha Mahabal
f3e3f80102 Merge branch 'develop' into membership-enhancements-2 2021-01-21 13:24:39 +05:30
Rucha Mahabal
d98b506478 fix: patch 2021-01-21 13:23:59 +05:30
prssanna
9f1a156307 Merge branch 'shopping-cart' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 13:04:58 +05:30
Rucha Mahabal
b48eab972e fix: sider issues 2021-01-21 13:00:10 +05:30
Marica
d1e6303d67 Merge branch 'develop' into item-wise-purchase-registry-item-name-error 2021-01-21 12:14:47 +05:30
Rucha Mahabal
3af46cc6cc fix: show custom buttons after save 2021-01-21 11:59:34 +05:30
Rucha Mahabal
4284ad880b fix: create member from membership for website users only 2021-01-21 11:54:14 +05:30
Rucha Mahabal
53d0eebbe8 fix: patch for renaming field in Membership Settings 2021-01-20 23:22:08 +05:30
Rucha Mahabal
bc49815d54 refactor: missing validations, code clean-up 2021-01-20 23:14:27 +05:30
Rucha Mahabal
fa4b3ba505 fix: basic validations for Membership Type Linked Item 2021-01-20 21:59:27 +05:30
Rucha Mahabal
3575939386 fix: sider issues 2021-01-20 20:48:51 +05:30
pateljannat
f110759897 fix: date validation 2021-01-20 18:12:48 +05:30
prssanna
b00eb1b0cc feat: shopping cart page 2021-01-20 17:52:54 +05:30
prssanna
706eae7cac fix: product page fixes 2021-01-20 17:47:25 +05:30
prssanna
ac7bc78afe fix: show product price in item card 2021-01-20 17:46:19 +05:30
prssanna
599322871a fix: product query issues 2021-01-20 17:44:08 +05:30
Afshan
b8b23663e6 fix: query for salary component in salary structure
fix: query for salary component in salary structure
2021-01-20 17:42:06 +05:30
Afshan
36e3e05a0e fix: query for salary componet in salary structure 2021-01-20 16:48:42 +05:30
Afshan
53edb872c7 Merge pull request #24424 from AfshanKhan/fix-add-stat-comp-in-sal-struct
fix: allow statistical component in salary structure.
2021-01-20 15:21:04 +05:30
Afshan
912647f4f2 fix: allow statistical component in salary structure. 2021-01-20 13:58:32 +05:30
Saqib
e2ed2324c3 fix: (e-invoicing) qrcode image generation (#24395)
* fix: invalid taxable value of item for e-invoice

* fix: qrcode image duplicate error

* fix: net total discount calculation

* fix: auto fetch auth token
2021-01-20 13:17:42 +05:30
Rucha Mahabal
bd02a42904 Merge branch 'develop' into membership-enhancements-2 2021-01-20 12:49:37 +05:30
Afshan
0ff9acfc9f Merge pull request #24415 from AfshanKhan/sal-comp-err
fix: select sal comp while making sal struct
2021-01-20 12:37:53 +05:30
Deepesh Garg
60a8ba5cbd Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2021-01-20 10:30:52 +05:30
Suraj Shetty
2e67a41c27 fix: Update birthday avatar code 2021-01-20 10:12:01 +05:30
Afshan
c69ab6d184 fix: select sal comp while making sal struct 2021-01-19 19:29:31 +05:30
Rohan Bansal
97b9995f8f fix: use supplied year for IRS 1099 forms 2021-01-19 19:10:03 +05:30
rohitwaghchaure
c474caba70 Merge pull request #24354 from rohitwaghchaure/fixed-incorrect-key-in-subcontract-develop
fix: incorrect serial no in the subcontracted purchase receipt
2021-01-19 15:08:53 +05:30
Rucha Mahabal
a28579a130 fix: sider issues 2021-01-19 14:16:44 +05:30
Rucha Mahabal
f39cbd3a1d test: appointment booking for admission service unit 2021-01-19 13:59:03 +05:30
Suraj Shetty
c858bb8122 fix: Rename patch 2021-01-19 10:47:50 +05:30
Jannat Patel
953960b193 Merge branch 'develop' into item-wise-purchase-registry-item-name-error 2021-01-19 10:44:49 +05:30
Deepesh Garg
6fb66f9428 Merge pull request #24362 from ruchamahabal/year-to-date-in-salary-components
feat(Payroll): compute Year to Date for Salary Slip components
2021-01-19 09:40:47 +05:30
Suraj Shetty
bbc6bfd3c3 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-19 09:34:06 +05:30
marination
957615bec8 fix: Stricter validations
- Validation for overreceipt on Purchase Invoice, Stock Entry, Purchase Receipt & Stock Reconciliation
- Every incoming stock transaction must be checked to avoid overcapacity
- However application of rule and splitting only on certain doctypes
- Validate capacity < stock balance on save in putaway rule, irrespective
2021-01-18 23:47:24 +05:30
Marica
6ac51edc56 Merge branch 'develop' into putaway 2021-01-18 17:47:25 +05:30
Saqib
7b8eac958e feat: re-linking bank accounts with plaid (#24392) 2021-01-18 16:44:41 +05:30
Suraj Shetty
e560d7428e fix: Update split issue & help article 2021-01-18 16:43:22 +05:30
pateljannat
6bec696396 fix: item_group fallback 2021-01-18 16:21:56 +05:30
pateljannat
fa2b0d43bd fix: handled invoices with no item_code 2021-01-18 15:27:40 +05:30
Rucha Mahabal
20e5315480 feat: Allow selecting admission service unit in Patient Appointment for inpatients 2021-01-18 14:56:55 +05:30
Rucha Mahabal
ea19434af4 feat: Issue Analytics Script Report (#23604)
* feat: Issue Analytics Report

* feat: add more filters, code clean-up

* fix: add report link to desk page

* test: Issue Analytics Report

* fix: sider issues

* fix: test

* debug: travis

* debug: travis

* fix: travis

* fix: travis

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-18 13:53:52 +05:30
Deepesh Garg
c3d82a889a Merge pull request #24370 from deepeshgarg007/loan_report_and_enhancements
feat: Loan report and enhancements
2021-01-18 12:26:45 +05:30
Deepesh Garg
52172252b4 fix: Interest calculations in Loan Interest Report 2021-01-18 12:07:54 +05:30
Deepesh Garg
2cb12e6f70 fix: Loan Security name fetch 2021-01-17 18:38:21 +05:30
Deepesh Garg
dd25ecb70d fix: Add reports in Desk Page 2021-01-17 17:52:02 +05:30
Deepesh Garg
ec60063155 fix: Auto Loan Write Off 2021-01-17 17:39:51 +05:30
Deepesh Garg
914ab7e4b0 fix: Add filters and currency in reports 2021-01-17 14:40:32 +05:30
Deepesh Garg
addea9697d feat: Loan Exposure report 2021-01-17 11:36:51 +05:30
Deepesh Garg
7976d12ed0 fix: Applicant-Wise Loan Security Exposure report 2021-01-16 18:10:01 +05:30
Deepesh Garg
b015934644 Merge pull request #23912 from deepeshgarg007/accounting_dimension_filters
feat: Configurable accounting dimension filters and validations
2021-01-16 13:57:12 +05:30
Deepesh Garg
1564d6ee1f fix: Test Case 2021-01-15 19:51:15 +05:30
Deepesh Garg
0c4d61269a fix: test case 2021-01-15 15:57:18 +05:30
Deepesh Garg
e30b33a3b8 fix: Linting issues 2021-01-15 15:47:15 +05:30
Deepesh Garg
cbed6f970a Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2021-01-15 15:43:59 +05:30
Suraj Shetty
cde1566606 fix: Typo 2021-01-15 15:28:50 +05:30
Suraj Shetty
f75d1bb043 fix: Typo 2021-01-15 14:53:51 +05:30
Suraj Shetty
22cdfbea87 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-15 14:48:35 +05:30
Suraj Shetty
3d00e25232 refactor: Employee birthday reminder 2021-01-15 14:48:28 +05:30
Kanchan Chauhan
d2c71350cd refactor(Job Application): New fields in Job Applicant and webform (#23326)
* refactor(Job Application): New fields in Job Applicant and webform

* fix: translation syntax

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-15 13:56:03 +05:30
Rohan
b1d08126b0 feat: add "Sync Now" to Plaid Settings (#23602) 2021-01-15 12:56:30 +05:30
Rucha Mahabal
004e51ed9f Merge branch 'develop' into patient-history-enhancements 2021-01-15 12:09:53 +05:30
Rucha Mahabal
1873c389e5 feat: Only allow submittable doctypes for Patient Medical Record 2021-01-15 02:12:57 +05:30
Rucha Mahabal
b15a19c6e0 test: Medical Record creation for custom doctypes 2021-01-15 01:27:30 +05:30
Rucha Mahabal
060d647248 fix: travis 2021-01-15 00:19:14 +05:30
Deepesh Garg
923af36979 Merge pull request #24378 from Anuja-pawar/fix_payment_period_based_on_invoice_date_report
fix: Payment Period based on invoice date report fix/refactor
2021-01-14 22:24:23 +05:30
Anuja P
47b42e6441 fix: Translation fixes 2021-01-14 21:20:00 +05:30
Anuja P
5ead7ee6cf fix:Payment Period based on invoice date report fix/refactor 2021-01-14 20:58:34 +05:30
Deepesh Garg
c96ea002a0 Merge pull request #24375 from deepeshgarg007/plv_cost_center_ignore_v13
fix: Ignore group cost center validation for period closing voucher
2021-01-14 19:47:56 +05:30
Deepesh Garg
847c706d2f fix: Ignore group cost center validation for period closing voucher 2021-01-14 19:44:41 +05:30
Anuja Pawar
4569e52b45 fix: fix for not having fiscal year while creating new company (#24130)
* fix: Fiscal year fix while creating new company

* fix: for failing Travis

* fix: suggested changes

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-14 19:24:30 +05:30
Mohammad Hasnain Mohsin Rajan
00981206ad fix: last purchase rate not updating when voucher cancelled if only one voucher is present (#24322)
* fix: last purchase rate not updating

* chore: use orm for updating

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-14 19:23:18 +05:30
Deepesh Garg
660d4a1097 Merge pull request #24346 from GangaManoj/timesheet-linking
fix: Link timesheets with corresponding projects
2021-01-14 18:49:40 +05:30
Deepesh Garg
3f015f7142 fix: Update fieldnames 2021-01-14 18:44:14 +05:30
Marica
5a1c469bf4 Merge pull request #23210 from michellealva/naming-series-proj
chore: Add Naming Series for Project DocType
2021-01-14 17:19:16 +05:30
Marica
3c878505cb Merge branch 'develop' into naming-series-proj 2021-01-14 16:34:51 +05:30
Marica
2b75342811 Merge pull request #24294 from marination/mr-se-warehouse-validation
fix: Don't validate warehouse values between Material Request and Stock Entry
2021-01-14 15:09:00 +05:30
Rucha Mahabal
5495c3789f Merge pull request #24355 from ruchamahabal/inpatient-visits-billing
feat(Healthcare Settings): Do Not Bill Patient Encounters for Inpatients
2021-01-14 14:45:49 +05:30
Rucha Mahabal
751719ea0d Merge branch 'develop' into patient-history-enhancements 2021-01-14 14:08:50 +05:30
marination
bc9eaac342 fix: Clear merge conflicts
- 'get_project_template' was removed a month back
- in 'make_project' insert the project directly as a check for it is there in the beginning.
2021-01-14 13:47:40 +05:30
Rucha Mahabal
6c90e26982 feat: add descriptions for YTD and MTD fields 2021-01-14 13:42:40 +05:30
Marica
17614c9860 Merge branch 'develop' into mr-se-warehouse-validation 2021-01-14 13:02:45 +05:30
Rucha Mahabal
6b9efa894f Merge branch 'develop' into inpatient-visits-billing 2021-01-14 12:31:43 +05:30
marination
814858061f fix: test for raising MR-SE mismatch error
- Make test add mismatched item code instead of warehouse, since warehouse can be different.
2021-01-14 12:13:08 +05:30
Rucha Mahabal
49702c1487 test: year to date computation for salary slip components 2021-01-14 11:57:24 +05:30
Rohit Waghchaure
56c7b554a6 fix: extra transferred qty has not consumed against work order 2021-01-14 11:54:32 +05:30
Rucha Mahabal
2c315a738e feat: Salary Slip with Year to Date Print Format 2021-01-14 10:06:24 +05:30
Rucha Mahabal
fdad94f983 feat(Payroll): compute Year to Date for Salary Slip components 2021-01-14 00:40:58 +05:30
Anuja Pawar
e62ce4b172 fix: Add button PO, PI, SI, DN and, Quotation Dashboard (#24187) 2021-01-13 21:13:12 +05:30
Anupam Kumar
4a649a4fce fix: removing payment_field from loan repayment closuer (#24291) 2021-01-13 21:10:49 +05:30
Afshan
33fac19bce fix: calculation of remaining_sub_periods if relieving date before month start date (#24319) 2021-01-13 21:06:04 +05:30
Anuja Pawar
0b04e23f6d fix: BOM Stock Report UoM correction (#24339) 2021-01-13 21:04:03 +05:30
Jannat Patel
00ccec7314 fix: subscription prepaid date validation (#24356) 2021-01-13 21:02:15 +05:30
Saqib
53cb9f9f47 fix(e-invoicing): ux issues (#24358)
* fix: overseas invoice rounding adjustment

* fix: overseas shipping address

* fix: qrcode for document name having forward slash

* feat: sandbox mode toggle

* fix: cannot delete sales invoice if linked to e invoice req log
2021-01-13 21:00:44 +05:30
Kanchan Chauhan
511434190d fix(work order): Actual start and end dates update (#24360)
Currently, even when the Work Order (without Operations) is completed and Stock Entries are there, the Actual Start Date and Actual End Date is not updated. 

For some reason need to db_set, then it updates the Actual Start Date and Actual End Date
2021-01-13 20:59:43 +05:30
Rucha Mahabal
ef5f0c0461 feat: Issue Summary Script Report (#23603)
* feat: Issue Summary Report

* feat: Add Issue Metrics to Issue Summary Report

* fix: code clean-up

* feat: Added Report Summary

* feat: Add SLA status fields

* fix: add report link to desk page

* fix: sider issues

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-13 19:59:16 +05:30
Anurag Mishra
5ef50d3914 fix: validated GST state
fix: validated GST state
2021-01-13 15:27:29 +05:30
Anurag Mishra
1e396dcb2a fix: validated GST state 2021-01-13 14:01:57 +05:30
Jannat Patel
8aeadc743e fix: assessment plan error handling for course field (#23961)
* fix: assessment plan error handling for course field

* fix: message rectification

* fix(travis): clean-up tests

* fix: travis

* fix: tests

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-13 12:56:04 +05:30
Marica
1ff7743d81 Merge branch 'develop' into naming-series-proj 2021-01-13 10:40:24 +05:30
rohitwaghchaure
1c362c81f2 Merge pull request #24324 from marination/bom-rm-rate-company-based
fix: Company Wise Valuation Rate for RM in BOM
2021-01-13 10:39:39 +05:30
Rucha Mahabal
0f05925ff4 test: Do Not Bill Patient Encounters for Inpatients 2021-01-13 09:46:33 +05:30
Rucha Mahabal
1354197c72 feat(Healthcare Settings): Do Not Bill Patient Encounters for Inpatients 2021-01-13 09:12:50 +05:30
Rohit Waghchaure
7cd7bf7f96 fix: incorrect key 2021-01-13 00:13:57 +05:30
rohitwaghchaure
bc465a3045 Merge pull request #24332 from rohitwaghchaure/fixed-payment-entry-multi-currency-issue-develop
fix: payment entry multi-currency issue
2021-01-13 00:13:14 +05:30
Marica
7edb69498c Merge pull request #24338 from marination/batch-selector
fix: Batch/Serial Selector for Scanned Batched Item
2021-01-12 21:10:13 +05:30
Marica
b8c5cd7331 Merge branch 'develop' into mr-se-warehouse-validation 2021-01-12 20:16:58 +05:30
Marica
30cc040d50 Merge branch 'develop' into batch-selector 2021-01-12 20:14:35 +05:30
Marica
cb079cd8c4 Merge branch 'develop' into naming-series-proj 2021-01-12 19:57:55 +05:30
Marica
98e3dcac2a Merge pull request #24293 from anupamvs/qi-reading-status
fix: added empty value in Quality Inspection Reading status
2021-01-12 19:43:57 +05:30
Marica
69f66664ce Merge branch 'develop' into qi-reading-status 2021-01-12 19:32:47 +05:30
Anurag Mishra
7ff06d6ee5 Merge pull request #24349 from Anurag810/dunning_fixes
fix: not able to create dunning from sales invoice
2021-01-12 18:40:10 +05:30
Anurag Mishra
36fa0512d2 fix: not able to create dunning from sales invoice 2021-01-12 17:02:19 +05:30
Deepesh Garg
59e2114419 Merge pull request #24311 from wojosc/patch-14
fix: Update item_tax_template_dashboard.py
2021-01-12 13:09:35 +05:30
Rushabh Mehta
b6c7ba2eea fix(minor): Rename loan workspace to loan management for naming 2021-01-12 11:34:11 +05:30
Deepesh Garg
7fd2b35a7d Merge pull request #24092 from pateljannat/project-template-and-tasks
feat: Project template with dependent tasks
2021-01-12 11:28:35 +05:30
Marica
69abc27316 Merge branch 'develop' into qi-reading-status 2021-01-12 11:15:36 +05:30
Anupam
c53ad88503 fix: resolved commit 2021-01-12 10:51:29 +05:30
Rushabh Mehta
37aa81526a fix(minor): clear merge conflicts 2021-01-12 10:29:00 +05:30
Marica
0600d572ba Merge branch 'develop' into batch-selector 2021-01-12 10:28:47 +05:30
Rushabh Mehta
7619d3d6d6 fix(merge): develop 2021-01-12 09:16:21 +05:30
Rucha Mahabal
80911577f5 Merge pull request #24340 from ruchamahabal/make-ipme-entries-editable
fix: allow medication entries to be deleted from the table
2021-01-11 17:59:02 +05:30
rohitwaghchaure
c92da35997 Merge pull request #22944 from anupamvs/opportunity-status
fix: Opportunity Status fix
2021-01-11 17:34:06 +05:30
Rucha Mahabal
8549358708 Merge branch 'develop' into make-ipme-entries-editable 2021-01-11 15:31:08 +05:30
Marica
aef71a8abe Merge branch 'develop' into batch-selector 2021-01-11 14:22:11 +05:30
Marica
8bb8ff673a Merge pull request #24072 from pateljannat/partially-submit-drop-ship-items-issue
fix: drop ship partial order fixed
2021-01-11 14:19:04 +05:30
Marica
cffc489d57 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2021-01-11 13:39:49 +05:30
Saqib
d43bb4db41 fix(pos): error while merging pos invoices into sales invoice (#24337) 2021-01-11 12:59:35 +05:30
marination
7646d7b741 fix: Batch/Serial Selector for Batched Item 2021-01-11 12:51:15 +05:30
Jannat Patel
dcda8b9e8c feat: Patient appointment status changes (#24201)
* feat: patient appointment status changes

* fix: sider

* fix: sider

* fix: test status on cancel of docs and test refactor

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-11 12:50:39 +05:30
Rucha Mahabal
aff3f611d3 fix: allow medication entries to be deleted from the table 2021-01-11 12:48:11 +05:30
Jannat Patel
8a07de9ee0 Merge branch 'develop' into project-template-and-tasks 2021-01-11 10:57:09 +05:30
Marica
298e2fe9a5 Merge pull request #24181 from marination/qi-ux
feat: Value Based and Numeric Quality Inspection
2021-01-11 10:38:06 +05:30
pateljannat
2460e101a7 fix: indicator ofor template task 2021-01-11 10:05:54 +05:30
Deepesh Garg
d3634f6dac feat: Loan Interest Report 2021-01-10 19:26:45 +05:30
Deepesh Garg
1b208e0695 fix: Add total loan interest amount field in loans 2021-01-10 12:29:55 +05:30
Ganga Manoj
2ffa4b9ce4 fix: Link timesheets with corresponding projects 2021-01-08 20:58:00 +05:30
Marica
b9d5ae9285 Merge branch 'develop' into qi-ux 2021-01-08 20:28:28 +05:30
Marica
c7aecb8148 Merge pull request #24329 from marination/qc-back-update-se
fix: Back Update from QC based on Batch No
2021-01-08 19:53:13 +05:30
Marica
63a91fc742 Merge branch 'develop' into qi-ux 2021-01-08 18:42:54 +05:30
Marica
ace08b1e48 Merge branch 'develop' into qc-back-update-se 2021-01-08 18:42:19 +05:30
marination
b7637f49cd fix: Remove QI link on cancel wherever same QI name exists 2021-01-08 18:35:49 +05:30
Anurag Mishra
05f6edfe0a Merge branch 'develop' into fixed-payment-entry-multi-currency-issue-develop 2021-01-08 17:27:22 +05:30
Rushabh Mehta
f8a6dde8d8 fix(minor): routing 2021-01-08 14:37:38 +05:30
Anurag Mishra
0b3e538cbc Merge pull request #24330 from ruchamahabal/fix-additional-salary-payroll
fix: Components formulated from additional salary not being fetched in Payroll Entry
2021-01-08 13:43:42 +05:30
Rohit Waghchaure
3777c6aa38 fix: payment entry multi-currency issue 2021-01-08 12:59:15 +05:30
Rucha Mahabal
a93151502c fix: Components formulated from additional salary not being fetched in Payroll Entry 2021-01-08 12:10:26 +05:30
marination
c4963bfdb2 fix: Back Update from QC based on Batch No 2021-01-08 09:56:04 +05:30
marination
ff6ee9d4e7 fix: Formula field description and Rearrange grid view
- Missing closing quote in Formula field description
- In grid view of child table in QI, show only input fields
2021-01-08 09:14:43 +05:30
Leela vadlamudi
df9144c198 feat: Voice Call Settings doctype added (#24126)
(cherry picked from commit 29778e2fba)
2021-01-07 17:20:40 +05:30
Marica
5cfdd0f503 Merge branch 'develop' into qi-ux 2021-01-07 15:47:55 +05:30
Marica
d91c7e2b38 Merge branch 'develop' into mr-se-warehouse-validation 2021-01-07 15:41:21 +05:30
marination
fab080c875 fix: Company Wise Valuation Rate for RM in BOM 2021-01-07 15:25:39 +05:30
pateljannat
fd5ebe9d4a fix: patch and columns 2021-01-07 15:16:15 +05:30
Jannat Patel
a586b0ba17 Merge branch 'develop' into project-template-and-tasks 2021-01-07 13:01:02 +05:30
pateljannat
3c55463b4b fix: validation for ldc against supplier and section code 2021-01-07 12:41:44 +05:30
Anurag Mishra
dbb994238e fix: editable employee grid
fix: editable employee grid
2021-01-07 12:10:57 +05:30
Anurag Mishra
77ba72c4ff Merge branch 'develop' into payroll_fixes2.0 2021-01-06 14:23:53 +05:30
Anurag Mishra
e7fa6f6a1c fix: edditable employee grid 2021-01-06 13:25:09 +05:30
Shivam Mishra
9fc44f1606 Merge pull request #24182 from scmmishra/fix-dont-set-primary 2021-01-06 12:52:44 +05:30
Jannat Patel
5a579089c2 fix: indentation 2021-01-06 11:21:13 +05:30
Deepesh Garg
5e15a5d230 Merge pull request #24186 from frappe/validate_regional_germany
fix: regional validation of sales invoice (germany)
2021-01-06 09:35:05 +05:30
Deepesh Garg
e72c51204b Merge pull request #24189 from timgates42/bugfix_typo_update
docs: fix simple typo, udpate -> update
2021-01-06 09:34:11 +05:30
Deepesh Garg
f2863f9d16 Merge pull request #24313 from deepeshgarg007/ytd_error_fix_v13
fix: Consider only submitted salary slips
2021-01-06 09:30:00 +05:30
Deepesh Garg
ad8be7c1fe fix: Consider only submitted salary slips 2021-01-06 09:29:03 +05:30
Rucha Mahabal
a7a609d4ff Merge pull request #24281 from ruchamahabal/allow-discharge
feat: Allow Discharge despite Unbilled Healthcare Services
2021-01-06 09:27:26 +05:30
Deepesh Garg
6f18d4c0f6 Merge pull request #24312 from deepeshgarg007/sanctioned_loan_unpledge
fix: Sanctioned loan security unpledge
2021-01-06 09:13:19 +05:30
Deepesh Garg
05fe7ac29c fix: fieldname 2021-01-06 09:10:28 +05:30
Deepesh Garg
dd768a07c5 fix: Sanctioned loan security unpledge 2021-01-05 23:55:00 +05:30
Wolfram Schmidt
5eef19723d Update item_tax_template_dashboard.py
added missing backlink. In Item Groups I can set Item Tax Temple in Table taxes.
2021-01-05 18:47:11 +01:00
Nabin Hait
f7b9b0687e fix: tax calculation on salary slip for the first month (#24272)
* fix: tax calculation on salary slip for the first month

* fix: net pay precision issue

* fix: net pay precision issue

Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
2021-01-05 20:43:11 +05:30
Deepesh Garg
357c370fe2 Merge pull request #24304 from deepeshgarg007/ytd_mtd_cal_fix
fix: Do not consider current salary slip in sum
2021-01-05 17:43:18 +05:30
Deepesh Garg
b01b108dfa fix: do not consider current salary slip in sum 2021-01-05 17:34:16 +05:30
Saurabh
994fa48cd4 Merge branch 'develop' into fix-dont-set-primary 2021-01-05 16:32:56 +05:30
Saqib
80e0952ba7 refactor: fetch & validate address from erpnext rather than gst portal 2021-01-05 16:04:25 +05:30
Saqib
a56a5ccefa refactor: fetch & validate address from erpnext rather than gst portal (#24297) 2021-01-05 15:59:17 +05:30
Marica
ba6e50b15e Merge branch 'develop' into qi-ux 2021-01-05 15:15:10 +05:30
Anurag Mishra
b864b09d40 Merge branch 'develop' into gratuity 2021-01-05 14:47:38 +05:30
Anurag Mishra
112b3894cc Merge pull request #24296 from AfshanKhan/fix-add-comp-in-leave-ledger
fix: set company in leave allocation and leave ledger entry
2021-01-05 14:45:16 +05:30
Marica
eab1867235 Merge branch 'develop' into qi-ux 2021-01-05 14:23:05 +05:30
Anurag Mishra
239fe7336e fix: charts not displaying when tree_type changed
fix: charts not displaying when tree_type changed
2021-01-05 14:03:03 +05:30
Saqib
60460a6d23 fix(e-invoicing): minor calculation fixes (#24282) 2021-01-05 13:54:04 +05:30
Saqib
1f591ab02e fix(e-invoicing): minor calculation fixes (#24285) 2021-01-05 13:53:51 +05:30
Afshan
f79c4d3560 Merge branch 'develop' into fix-add-comp-in-leave-ledger 2021-01-05 13:27:15 +05:30
Jannat Patel
16a809483b fix: indentation 2021-01-05 12:28:45 +05:30
marination
b8aeb9ea88 fix: Indentation and missing semi-colon
- Fix incorrect indentation after merge conflict
- Sider
2021-01-05 12:16:25 +05:30
Rucha Mahabal
d643bb7c4b Merge branch 'develop' into allow-discharge 2021-01-05 12:07:26 +05:30
Jannat Patel
06a401ffbf fix: incoming rate attribute error (#24287)
Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
2021-01-05 11:54:34 +05:30
Marica
41ea77ce31 Merge branch 'develop' into putaway 2021-01-05 11:24:05 +05:30
Marica
95344f01e6 Merge branch 'develop' into qi-ux 2021-01-05 10:44:52 +05:30
Jannat Patel
7d0f35c4ab Merge branch 'develop' into partially-submit-drop-ship-items-issue 2021-01-05 10:42:30 +05:30
Rucha Mahabal
f97e668130 Merge branch 'develop' into allow-discharge 2021-01-05 10:38:16 +05:30
Deepesh Garg
bfa71c23ae Merge pull request #23965 from vorasmit/remarks-fix-develop
fix: add remarks to sales invoice
2021-01-05 09:54:53 +05:30
Nabin Hait
72fa368e8f Merge branch 'develop' into mr-se-warehouse-validation 2021-01-05 09:30:16 +05:30
Nabin Hait
5a8f141eda Merge branch 'develop' into fix-add-comp-in-leave-ledger 2021-01-05 09:29:44 +05:30
Marica
099162814c Merge branch 'develop' into qi-ux 2021-01-05 09:27:40 +05:30
Nabin Hait
517fd8b9e6 fix: Ignore customer and supplier while deleting company transactions (#24279)
* fix: Ignore customer and supplier while deleting company transactions

* fix: Test cases fixed based on Travis
2021-01-05 09:23:39 +05:30
Afshan
0da201c6a5 fix: set company in leave allocation and leave ledger entry 2021-01-04 19:04:05 +05:30
marination
0c883853b3 fix: Dont validate warehouse values between MR to Stock Entry
- Remove validation thta checks if warehouse in Stock Entry is the same as MR that it was pulled from
2021-01-04 18:48:50 +05:30
Anupam
27fd9e4d7d fix: added empty value in Quality Inspection Reading status 2021-01-04 18:18:00 +05:30
Deepesh Garg
797a742cb2 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2021-01-04 14:24:00 +05:30
Deepesh Garg
a873ae0d9f fix: Check for custom dimensions 2021-01-04 14:23:31 +05:30
Jannat Patel
5f9a219429 Merge pull request #4 from frappe/develop
sync fork
2021-01-04 12:18:54 +05:30
Rucha Mahabal
7206e12c2f test: Allow Discharge despite Unbilled Services 2021-01-04 12:11:00 +05:30
Rucha Mahabal
03b25be9e9 feat: Allow Discharge despite Unbilled Healthcare Services 2021-01-04 11:16:59 +05:30
marination
7877d5a7c2 fix: Create QI Parameters (links) in test cases 2021-01-04 11:10:04 +05:30
Saurabh
adb8bbe958 Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-01-02 19:59:56 +05:30
Saurabh
0feaab5261 bumped to version 13.0.0-beta.9 2021-01-02 20:19:56 +05:50
Afshan
a245f667d0 fix: pos error pop up (#24237) 2021-01-02 10:30:22 +05:30
Deepesh Garg
ffca52a348 Merge pull request #24254 from nextchamp-saqib/loan-patch-fix
fix: update old loan patch
2021-01-01 13:50:52 +05:30
vorasmit
3ef965f253 Update patches.txt 2021-01-01 10:55:20 +05:30
vorasmit
8c39ab68df Delete update_sales_invoice_remarks.py 2021-01-01 10:54:57 +05:30
rohitwaghchaure
2adf8d07b6 Merge pull request #24266 from rohitwaghchaure/incorrect-valudation-rate-fg
fix: incorrect valuation rate for finished good
2020-12-31 20:53:52 +05:30
Anurag Mishra
b901d4002a Merge pull request #24264 from AfshanKhan/fix-sal-struc-assign-payroll-acc
fix: setting correct account for sal struct assignment if not specified.
2020-12-31 18:26:46 +05:30
Anurag Mishra
f5e566a29c Merge pull request #24265 from AfshanKhan/allow-cancel-leave-policy
fix: allow leave policy assignment to be canceled.
2020-12-31 18:26:08 +05:30
Afshan
47bc42740b Merge branch 'develop' into fix-sal-struc-assign-payroll-acc 2020-12-31 17:41:44 +05:30
Afshan
4edcf813e7 Merge branch 'develop' into allow-cancel-leave-policy 2020-12-31 17:41:34 +05:30
Rohit Waghchaure
16bce49f18 fix: incorrect valuation rate for finished good 2020-12-31 17:39:52 +05:30
Anurag Mishra
d7ea2bd705 Merge pull request #24177 from AfshanKhan/fix-perm-empl-sal-slip
fix: error popup for submitted doc
2020-12-31 17:07:30 +05:30
Afshan
e69148c266 fix: allow leave policy assignment to be cancelled. 2020-12-31 16:45:00 +05:30
Afshan
8b60fe6125 fix: setting correct account for sal struct assignment if not specified. 2020-12-31 16:10:39 +05:30
Saqib
f8f015c961 fix: cannot submit e-invoice if legal name not found 2020-12-31 13:28:08 +05:30
Saqib
2b67d57480 fix: cannot submit e-invoice if legal name not found 2020-12-31 13:26:05 +05:30
Saqib Ansari
d5d571ab9d fix: update old loan patch 2020-12-31 12:55:35 +05:30
Deepesh Garg
23ab5c5cc0 fix: Multiplle sider issues 2020-12-31 11:29:06 +05:30
Deepesh Garg
133ce286f9 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-31 11:24:14 +05:30
Deepesh Garg
f57089532a Merge pull request #24252 from deepeshgarg007/partial_security_unpledge
fix: Partial loan security unpledging
2020-12-30 21:37:52 +05:30
Mohammad Hasnain Mohsin Rajan
11176852eb Merge branch 'develop' into bugfix_typo_update 2020-12-30 20:59:38 +05:30
Deepesh Garg
9716216632 fix: check for string types 2020-12-30 20:33:35 +05:30
Deepesh Garg
a60707873c fix: Partial loan security unpledging 2020-12-30 20:24:15 +05:30
Karthikeyan S
aa44c754de fix(GST E Invoice): update live URLs for adaequare GSP (#24248) 2020-12-30 19:22:37 +05:30
Deepesh Garg
5891b48cf6 Merge pull request #24176 from GangaManoj/Year-to-Date
feat: Add year_to_date field (cumulative salary for a fiscal year)
2020-12-30 16:53:47 +05:30
rohitwaghchaure
bb0fd33ac5 Merge pull request #24169 from Anurag810/payroll-entry-fixes
fix: allow addition and removal of employee in payroll Entry
2020-12-30 16:50:02 +05:30
Shivam Mishra
45a56288bb feat: style adjustments to product page 2020-12-30 15:51:50 +05:30
Shivam Mishra
31a651365d feat: update item group website slider 2020-12-30 15:51:34 +05:30
Deepesh Garg
66dcaf3ab2 fix: Salary structure assignment in tests 2020-12-30 15:47:22 +05:30
Saqib
f946bbd032 fix: minor e-invoicing issues (#24239)
* fix: invoice value set to zero if rounded total disabled

* fix: unit rate & gross amount calculation

* fix: e-invoice-setup patch

* chore: no need to re-run the patch

* fix: item value & invoice value calculations
2020-12-30 14:43:42 +05:30
Deepesh Garg
97d055dfc3 fix: Test Case 2020-12-30 14:06:13 +05:30
Anurag Mishra
b7631af741 Merge branch 'develop' into payroll-entry-fixes 2020-12-30 13:22:13 +05:30
Deepesh Garg
8b7ebe5044 fix: Test Case cleanup and fixes 2020-12-30 12:45:46 +05:30
Deepesh Garg
20133bd1df fix: Remove comments 2020-12-29 22:19:12 +05:30
Deepesh Garg
7e4eacba8d Merge branch 'develop' of https://github.com/frappe/erpnext into Year-to-Date 2020-12-29 22:13:55 +05:30
Deepesh Garg
353f8f4d85 fix: Add test case for YTD 2020-12-29 22:13:40 +05:30
Anurag Mishra
15af7a4afc Merge pull request #24226 from AfshanKhan/asset-report
fix: asset depreciation ledger
2020-12-29 18:58:56 +05:30
Deepesh Garg
60b77f9865 Merge branch 'develop' of https://github.com/frappe/erpnext into Year-to-Date 2020-12-29 18:26:32 +05:30
rohitwaghchaure
b09ddc4672 Merge pull request #24233 from rohitwaghchaure/back-dates-allow-field-issue
fix: option name for the field 'Role Allowed to Create/Edit Back-dated Transactions'
2020-12-29 17:52:43 +05:30
Shivam Mishra
355943c3a0 feat: only show attributes that have an item 2020-12-29 17:46:18 +05:30
Shivam Mishra
2a6c4ec26e chore: remove dead code 2020-12-29 17:20:12 +05:30
Shivam Mishra
565b178721 feat: use ProductFiltersBuilder in all products page 2020-12-29 17:18:58 +05:30
Shivam Mishra
7055969ef3 feat: update item group template 2020-12-29 17:18:41 +05:30
Shivam Mishra
425bae8bf6 feat: use ProductQuery and ProductFiltersBuilder to build item group page 2020-12-29 17:18:22 +05:30
Shivam Mishra
298608ef40 feat: add product filters generator for item group and all products 2020-12-29 17:17:44 +05:30
Shivam Mishra
ed21350871 fix: page limit filter bug 2020-12-29 17:17:18 +05:30
Shivam Mishra
2dd26f7551 chore: cleanup product query 2020-12-29 17:17:03 +05:30
Shivam Mishra
b06ed4908f feat: add filter tables in item group 2020-12-29 17:16:29 +05:30
Shivam Mishra
134f6b1b6c chore: update style rules 2020-12-29 17:16:08 +05:30
Deepesh Garg
ff51540eed Merge branch 'accounting_dimension_filters' of github.com:deepeshgarg007/erpnext into accounting_dimension_filters 2020-12-29 17:02:07 +05:30
Deepesh Garg
e061004956 fix: Improve validation message 2020-12-29 17:00:39 +05:30
Raffael Meyer
a3462f6b0c Merge branch 'develop' into validate_regional_germany 2020-12-29 11:58:57 +01:00
Rohit Waghchaure
81285204dc fix: option name for the field 'Role Allowed to Create/Edit Back-dated Transactions' 2020-12-29 16:25:45 +05:30
Deepesh Garg
4a8c2c4cb5 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-29 15:10:36 +05:30
rohitwaghchaure
25bc9851f0 Merge pull request #24220 from rohitwaghchaure/fixed-finished-product-qty
fix: finished good produced qty validation
2020-12-29 13:41:03 +05:30
Shivam Mishra
aa42886851 fix: template json 2020-12-29 13:28:35 +05:30
Anurag Mishra
dfe8f7601b Merge branch 'develop' into gratuity 2020-12-29 13:27:03 +05:30
Anurag Mishra
5af8d2b883 Merge branch 'develop' into payroll-entry-fixes 2020-12-29 13:09:42 +05:30
Afshan
91e3c07d77 fix: assest depreciation ledger 2020-12-28 19:42:46 +05:30
marination
a69e81a151 chore: Made 'Parameter' a link field in QI and QI Template
- Added doctype Quality Inspection Parameter
- Made 'Parameter' a link field in QI and QI Template
- Added patch to create Quality Inspection Parameter records for every parameter in the system
2020-12-28 18:07:22 +05:30
marination
29a03bd5a1 feat: Add 'Manual Inspection' checkbox
- fix merge conflict in js file
- Dont auto set status if manual inspection is checked
- Added 'Manual Inspection' checkbox in QI readings table
2020-12-28 16:59:13 +05:30
Deepesh Garg
b75f198648 Merge pull request #24223 from frappe/revert-24087-batch-wise-pricing
Revert "feat: Batch wise item selling pricing"
2020-12-28 15:42:42 +05:30
pateljannat
88471854d5 fix: sider 2020-12-28 15:40:23 +05:30
rohitwaghchaure
527b7e16e5 Revert "feat: Batch wise item selling pricing" 2020-12-28 15:29:30 +05:30
Marica
62f9cc6c5a Merge branch 'develop' into qi-ux 2020-12-28 15:09:15 +05:30
rohitwaghchaure
72e8ec5eee Merge pull request #24087 from deepeshgarg007/batch-wise-pricing
feat: Batch wise item selling pricing
2020-12-28 14:37:33 +05:30
Rohit Waghchaure
40d2c6a0cc fix: finished good produced qty validation 2020-12-28 14:08:45 +05:30
pateljannat
aa8ff81061 Merge branch 'project-template-and-tasks' of https://github.com/pateljannat/erpnext into project-template-and-tasks 2020-12-28 12:35:27 +05:30
pateljannat
71f203dbc5 fix: template task status, subject in project template task 2020-12-28 12:35:19 +05:30
Shivam Mishra
c640065a66 feat: cleanup json 2020-12-28 12:16:29 +05:30
Rucha Mahabal
e1b9707ec1 Merge pull request #24152 from ruchamahabal/fix-therapy-type-filter
fix: filter Therapy Types and Therapy Plan in Patient Appointment
2020-12-28 11:36:34 +05:30
Deepesh Garg
d3814b2676 Merge branch develop into batch-wise-pricing 2020-12-28 10:48:29 +05:30
Jannat Patel
c09100d738 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2020-12-28 10:20:27 +05:30
Deepesh Garg
7c300859ed fix: Test Cases 2020-12-26 20:14:51 +05:30
Deepesh Garg
d4fc451c2a Merge pull request #24191 from nextchamp-saqib/accounting-entries-for-asset
fix: accounting entries of asset when submitting purchase receipt
2020-12-26 19:14:32 +05:30
Saqib
60a1d25196 fix: cancelling of asset value adjustement (#24193) 2020-12-26 13:01:49 +05:30
rohitwaghchaure
9f1e1f6c23 Merge pull request #24207 from rohitwaghchaure/fixed-serial-no-return-issue
fix: partial serial no return issue
2020-12-26 12:12:04 +05:30
Deepesh Garg
4f8da4c313 fix: Test Cases 2020-12-26 11:37:51 +05:30
Nabin Hait
0788df412c fix: Removed permissions from UAE VAT Settings 2020-12-25 20:54:01 +05:30
Deepesh Garg
5269f02919 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2020-12-25 18:35:26 +05:30
Deepesh Garg
bfc17e487c fix: Commonify code for Stock Entry 2020-12-25 18:34:39 +05:30
Nabin Hait
b99c77b753 Reposting fixes (#24202)
* fix: finished item validation and rate

* fix: Check if stock and account balance in sync after reposting

* fix: validate stock accounts in journal entry

* fix: validate expense against budget
2020-12-25 18:12:35 +05:30
hasnain2808@gmail.com
46d5f4c7f1 refactor(analytics report): linting 2020-12-25 16:34:43 +05:30
rohitwaghchaure
fa0a075e95 Merge pull request #24196 from scmmishra/fix-file-url-employee
fix: use file_url to save file and not file name
2020-12-25 16:22:15 +05:30
rohitwaghchaure
ebcd4c454e Merge pull request #24209 from rohitwaghchaure/added-shipment-link-in-delivery-note
fix: added shipment link in delivery note dashboard
2020-12-25 16:07:35 +05:30
Rohit Waghchaure
dab1ab990d fix: partial serial no return issue 2020-12-25 15:25:16 +05:30
rohitwaghchaure
de10d7dcf2 Update shipment.py 2020-12-25 15:15:55 +05:30
Rohit Waghchaure
5bcc6c6b15 fix: added shipment link in delivery note dashboard 2020-12-25 15:02:53 +05:30
Saqib
6d74f5b59b feat: GST E Invoicing (#23455)
* feat: init e-invoice settings

* feat: read public key file

* feat: rsa encryption with public key

* feat: save token and sek from auth request

* chore: handle error response

* feat: AES decryption of SEK with appkey

* feat: decrypt json data with SEK

* feat: make e invoice from erpnext sales invoice

* feat: generate IRN

* feat: decode signed json and QR code

* chore: validations

* feat: cancel IRN

* feat: complete e-invoice schema

* chore: move e-invoice settings to regional

* chore: split einvoice settings and operations

* chore: rename schema to template & js cleanup

* feat: make IRN field on regional setup

* feat: Generate & Cancel IRN from Sales Invoice

* chore: minor fixes

* fix: item discount

* chore: show irn cancelled check after cancellation

* fix: hide cancel irn dialog on error

* fix: public key is required on validate

* fix: cannot find attached key file

* fix: validation if e invoicing is disabled

* fix: do not show generate irn for invalid supply type

* fix: update irn_cancelled after cancelling irn

* chore: show irn field for proper gst_category

* feat: e-way bill details in e-invoice

* fix: save e-way bill no on irn generation

* chore: no copy on e invoice custom fields

* feat: cancel e-way bill before cancelling IRN

* feat: manual download / upload json

* chore: group e-invoicing actions

* fix: fn name

* chore: save signed invoice and qrcode after uplaoding irn

* fix: fetch token if not valid

* chore: move einvoicing stuff to seperate folder

* feat: QRCode Image and E-Invoice Print Format

* fix: bug

* fix: invalid syntax

* chore: code cleanup

* chore: clean up e invoice actions

* fix: download & upload e-invoice

* fix: print format

* fix: validations

* fix: add permissions on regional setup

* feat: add patch

* fix: validate document name

* fix: return date

* fix: credit note einvoice

* fix: validations

* fix: error logging

* fix: e_invoice module not found

* fix: add missing package

* fix: rename e_invoice_utils.py

* fix: einvoice field validation

* fix: patch

* fix: invoice totals calculation

* fix: other charges calculation

* chore: improve document name validation message

* fix: qr code image string

* feat: initialize GSP connector

* chore: remove unwanted fields

* fix: qr code generation

* feat: fetch and cache GSTIN details

* feat: generate & cancel IRN

* feat: cancel eway bill

* chore: remove unwanted fuctions

* chore: clean up einvoice actions

* fix: attach qrcode on irn generation

* fix: generate & cancel IRN

* fix: show/hide eway bill fields

* fix: valiations

* feat: generate eway bill from IRN

* chore: remove unwanted imports

* chore: error logging

* feat: header & footer in GST E Invoice

* chore: remove test pincode

* fix: invalid syntax

* feat: cess non advolem on einvoice item

* chore: remove fetch token from e invocie settings

* fix: imports

* fix: error handling

* feat: update timeline on einvoice actions

* fix: qrcode image size

* fix: exclude intra company transactions

* fix: eway bill test

* fix: ewaybill mandatory conditions

* chore: add tests

* fix: returning condition

* feat: log e-invocing requests

* chore: add ack date and ack no field for print formats

* fix: sider issues

* feat: show e-invoice preview before IRN generation

* fix: use as_list for error message

* fix: minor ux issues

* fix: dialog is undefined

* fix: error handling

* feat: add docs link to e invoice settings

* feat: multiple gstins for e invoicing

* fix: uncomment test condition

* fix: remove test pincode

* fix: cannot cancel irn without submitting sales invoice

* chore: code cleanup

* fix: sider issues

* fix: e invoice request log permissions

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-12-25 10:26:43 +05:30
rohitwaghchaure
4e9361f74b Merge pull request #24204 from rohitwaghchaure/pricing-rule-not-working-margin
fix: multiple pricing rule with margin type as Percentage is not working
2020-12-25 09:33:39 +05:30
Rohit Waghchaure
aea62da544 fix: multiple pricing rule with margin type not working 2020-12-24 22:44:31 +05:30
Shivam Mishra
c54aca3f44 chore: cleanup comments 2020-12-24 18:02:50 +05:30
Shivam Mishra
a90b6a73dd fix: syntax error 2020-12-24 18:02:07 +05:30
Shivam Mishra
419c889a9a feat: add docstrings 2020-12-24 17:58:18 +05:30
Shivam Mishra
293f483cb4 feat: add ProductQuery engine 2020-12-24 17:54:07 +05:30
rohitwaghchaure
b9352b729a Merge pull request #24063 from rohitwaghchaure/fixed-job-card-cacncel-flow-develop
fix: don't cancel job card if manufacturing entry has made
2020-12-24 17:46:45 +05:30
rohitwaghchaure
630258f493 Merge pull request #24164 from rohitwaghchaure/do-not-manufacture-same-serial-no-two-develop
fix: do not manufacture same serial no multiple times
2020-12-24 17:46:26 +05:30
Rucha Mahabal
d013d94e8d Merge branch 'develop' into fix-therapy-type-filter 2020-12-24 17:44:25 +05:30
Rohit Waghchaure
304100db3b fix: don't cancel job card if manufacturing entry has made 2020-12-24 16:36:37 +05:30
Rohit Waghchaure
ed20819432 fix: travis 2020-12-24 16:24:10 +05:30
Shivam Mishra
d0437cfb59 feat: clear document cache on validate 2020-12-24 14:15:09 +05:30
Shivam Mishra
bba2726333 fix: minor styling fixes 2020-12-24 14:14:17 +05:30
Anurag Mishra
527a156512 feat: validated employees whose salary has been already precessed 2020-12-24 13:59:12 +05:30
Jannat Patel
29dd7e5fc4 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2020-12-24 13:44:42 +05:30
prssanna
eb0e596d43 feat: store home page and product page 2020-12-24 11:40:33 +05:30
prssanna
7a38f41350 Merge branch 'shopping-cart' of https://github.com/frappe/erpnext into shopping-cart 2020-12-24 11:39:41 +05:30
prssanna
79c3d6f71d Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into shopping-cart 2020-12-24 11:36:59 +05:30
Rucha Mahabal
d2f91e8c11 fix: Do not cancel reference document on Quality Inspection cancellation (#24197) 2020-12-24 11:03:36 +05:30
Rushabh Mehta
ab1c2b7631 fix(minor): routing 2020-12-23 23:26:58 +05:30
Anurag Mishra
3278d02cd2 fix: sider 2020-12-23 18:07:54 +05:30
Anurag Mishra
1446749b63 fix: changes requested 2020-12-23 18:07:54 +05:30
Nabin Hait
eb065d6d40 fix: fixed gl entries 2020-12-23 18:07:54 +05:30
Nabin Hait
4da7a15ac0 fix: Fixed typo 2020-12-23 18:07:54 +05:30
Anurag Mishra
b71611dd3d feat: Added Form dashboard 2020-12-23 18:07:54 +05:30
Anurag Mishra
4cc333996c fix: test 2020-12-23 18:07:54 +05:30
Anurag Mishra
ba6ff6e227 fix: conflict 2020-12-23 18:07:53 +05:30
Anurag Mishra
708065cb85 fix: test cases 2020-12-23 18:07:53 +05:30
Anurag Mishra
af9f172be8 fix: requested changes and sider 2020-12-23 18:07:53 +05:30
Anurag Mishra
66b697cd05 feat: fix test for Gratuity 2020-12-23 18:07:53 +05:30
Anurag Mishra
550e60a69d feat: fix test for Gratuity 2020-12-23 18:07:53 +05:30
Anurag Mishra
b88af3a3f7 feat: Accrural Entry for Gratuity beafore Payment 2020-12-23 18:07:53 +05:30
Anurag Mishra
78fdd5d9b4 fix: update status on salary Slip submission 2020-12-23 18:07:53 +05:30
Anurag Mishra
46e1c09b45 style: Broken into smaller function 2020-12-23 18:07:53 +05:30
Anurag Mishra
4d6c3c9449 Fix: Changes Requested, Sider, codacy, Transalation 2020-12-23 18:07:53 +05:30
Anurag Mishra
493eea19e8 feat: added link from desk page and some minor fixes 2020-12-23 18:07:53 +05:30
Anurag Mishra
25c356894d test: gratuity 2020-12-23 18:07:53 +05:30
Anurag Mishra
f63df91186 patch: to create standard Gratuity Rule for india and UAE 2020-12-23 18:07:53 +05:30
Anurag Mishra
e1464a7bf0 feat: Indian Standard Gratuity Rule 2020-12-23 18:07:06 +05:30
Anurag Mishra
34a7250a2d fix: Some enhancements and better validation 2020-12-23 18:07:06 +05:30
Anurag Mishra
0761301c2e feat: Added all 3 standard slab for UAE 2020-12-23 18:07:06 +05:30
Anurag Mishra
47f3a3a5bd feat: validation for if no slab found 2020-12-23 18:07:06 +05:30
Anurag Mishra
6f1538026a feat: added minimum year for gratuity and condition utilisation 2020-12-23 18:07:06 +05:30
Anurag Mishra
30299c6f49 feat: validating and ordeing the rule slabr 2020-12-23 18:07:06 +05:30
Anurag Mishra
dedc0015c0 feat(HR): Working day calulation based on attendance or Leave 2020-12-23 18:07:06 +05:30
Anurag Mishra
49b326fc08 feat(HR): Gratuity Payment 2020-12-23 18:07:05 +05:30
Anurag Mishra
fc2cb3a85e Feat: gratuity 2020-12-23 18:07:05 +05:30
Deepesh Garg
aa7ab211be Merge pull request #24171 from deepeshgarg007/breadcrum_schema
fix: Add breadcrumbs to item group page
2020-12-23 16:52:48 +05:30
Shivam Mishra
1ab4f09ee9 fix: use file_url to save file and not file name 2020-12-23 15:18:41 +05:30
Anurag Mishra
d884216c6f fix: leave policy dashboard fix
fix: leave policy dashboard fix
2020-12-23 13:19:12 +05:30
Anurag Mishra
d556847fca fix: allow addition and removal of employee in payroll Entry 2020-12-23 12:59:48 +05:30
Nabin Hait
0411a43c6e fix: set finished good item rate based on qty 2020-12-23 12:14:41 +05:30
Saqib Ansari
09c6842199 fix: accounting entries of asset when submitting purchase receipt 2020-12-23 11:29:26 +05:30
Tim Gates
1fb412e3f6 docs: fix simple typo, udpate -> update
There is a small typo in erpnext/patches/v4_0/map_charge_to_taxes_and_charges.py.

Should read `update` rather than `udpate`.
2020-12-23 11:39:37 +11:00
barredterra
df8ea19406 fix: whitespace 2020-12-22 17:34:31 +01:00
barredterra
2acd8cbc02 fix: sider 2020-12-22 17:34:22 +01:00
Jannat Patel
b07914d185 Merge branch 'develop' into project-template-and-tasks 2020-12-22 20:47:30 +05:30
pateljannat
8dec1c142f fix: removed unused imports 2020-12-22 19:55:31 +05:30
Deepesh Garg
e5e2ad646a fix: Test Cases 2020-12-22 19:53:07 +05:30
pateljannat
6cf018c762 fix: holiday update in tests 2020-12-22 19:40:41 +05:30
pateljannat
4ebee5014e feat: aholiday check before setting start and end date in task 2020-12-22 18:14:46 +05:30
barredterra
511be6466d Revert "fix: fail silently"
This reverts commit 6900a79421.
2020-12-22 11:43:33 +01:00
barredterra
a69021018a test: add test for accounts controller 2020-12-22 11:38:09 +01:00
barredterra
5adbe49ca6 refactor: translation syntax 2020-12-22 11:37:43 +01:00
barredterra
6900a79421 fix: fail silently 2020-12-22 11:37:13 +01:00
Deepesh Garg
e1320c7e47 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2020-12-22 13:32:59 +05:30
Jannat Patel
8224b1c1e5 Merge pull request #3 from frappe/version-13-beta-pre-release
Version 13 beta pre release
2020-12-22 13:11:02 +05:30
Deepesh Garg
468f67a4de fix: Add parent for all-products page 2020-12-22 12:44:09 +05:30
Mohammad Hasnain Mohsin Rajan
61b92b312a Merge branch 'develop' into fix-analytics-reports 2020-12-22 12:41:43 +05:30
Shivam Mishra
46bc7ca69f feat: use call icon 2020-12-22 12:32:36 +05:30
Shivam Mishra
64fa0e8729 fix: wrap assignees in a list 2020-12-22 12:32:36 +05:30
barredterra
1725fbc59a feat: separate equity tree in CoA SKR04 2020-12-22 12:32:36 +05:30
Rucha Mahabal
7574a14d57 fix: Remove patch for setting next date in Subscription (#24158) 2020-12-22 12:32:36 +05:30
Rucha Mahabal
5f53b140e2 fix: Auto Repeat Import (#24157) 2020-12-22 12:32:36 +05:30
Rucha Mahabal
7d848b1785 refactor: Auto Repeat next schedule date function params (#23959)
* refactor: Auto Repeat next schedule date function params

* refactor: Auto Repeat next schedule date function params
2020-12-22 12:32:36 +05:30
prssanna
ec959bc3b9 fix: override field_map for job card gantt 2020-12-22 12:32:36 +05:30
pateljannat
3a26f26671 fix: get_doc to avoid modified error 2020-12-22 11:56:59 +05:30
Shivam Mishra
59a2029c87 Merge branch 'shopping-cart' of https://github.com/frappe/erpnext into shopping-cart 2020-12-22 11:28:33 +05:30
Shivam Mishra
7d3876d51a feat: shopping cart search 2020-12-22 11:17:14 +05:30
Shivam Mishra
721251f09f feat: add product category cards 2020-12-22 11:17:14 +05:30
Shivam Mishra
b4946c31b4 refactor: use h1 for slidetitle 2020-12-22 11:17:14 +05:30
Shivam Mishra
e40926b4cc fix: don't use primary action for create 2020-12-22 11:17:14 +05:30
Shivam Mishra
09c8aaa87a feat: add slider template 2020-12-22 11:17:14 +05:30
Shivam Mishra
fa102e4713 feat: add templates for online store 2020-12-22 11:17:14 +05:30
Ganga Manoj
090783804b fix: Improve month_to_date computation 2020-12-21 23:52:05 +05:30
Ganga Manoj
c36cab81f2 fix: Update year_to_date and month_to_date field labels to show company currency 2020-12-21 23:46:02 +05:30
pateljannat
9466e42e70 fix: change request modifications 2020-12-21 20:52:20 +05:30
Nabin Hait
a77b8c9fcc Repost item valuation (#24031)
* feat: Reposting logic for future finished/transferred item

* feat: added fields to identify needs to recalculate rate while reposting

* refactor: Set rate for outgoing and finished items

* refactor: Arranged fields in Stock Entry item table and added fields to identify finished and scrap item

* refactor: Arranged fields in Stock Entry item table and added fields to identify finished and scrap item

* refactor: Get outgoing rate for purchase return

* refactor: Get incoming rate for sales return

* test: Added tests for reposting valuation of transferred/finished/returned items

* feat: added incoming rate field in DN, SI and Packed Item table

* feat: get incoming rate for returned item

* fix: no error while getting valuation rate in stock entry

* fix: update stock ledger for DN and SI

* feat: update item valuation rate in PR and PI based on supplied items cost

* feat: SLE reposting logic for sales return and subcontracted item with test cases

* feat: update qty in future sle

* feat: repost future sle and gle via Repost Item Valuation

* fix: Skip unwanted function calling while reposting

* fix: repost sle for specific item and warehouse

* test: Modified tests for backdated stock reco

* fix: ignore cancelled sle in few methods

* feat: role allowed to do backdated entry

* feat: Show reposting status on stock valuation related reports

* fix: minor fixes

* fix: fixed sider issues

* fix: serial no fix related to immutable ledger

* fix: Test cases fixes related to perpetual inventory

* fix: Test cases fixed

* fix: Fixed reposting on cancel and test cases

* feat: Restart reposting item valuation

* refactor: Code cleanup using small functions and test case fixes

* fix: minor fixes

* fix: Raise on error while reposting item valuation

* fix: minor fix

* fix: Tests fixed

* fix: skip some validation ig gle made from reposting

* fix: test fixes

* fix: debugging stock and account validation

* fix: debugging stock and account validation

* fix: debugging travis for stock and account sync validation

* fix: debugging travis

* fix: debugging travis

* fix: debugging travis
2020-12-21 14:45:50 +05:30
marination
eae31f02cc fix: Sider (missing semi-colons) 2020-12-21 13:58:44 +05:30
Shivam Mishra
0e222173ea fix: don't set primary action if workflow is set 2020-12-21 13:44:03 +05:30
marination
68f91c9640 chore: Added tests for new ux
- Test for value based inspection
- tweaks in test for formula based inspection
- tweaks in create_quality_inspection as status in child row is auto set now
2020-12-21 12:24:45 +05:30
marination
0c4f97368d chore: UX improvement
- Removed 'single reading' checkbox, unnecessary
- Removed 'Mean' field and added computed mean to formula data
- Changed 'Value Based' to 'Non-Numeric'
- Re-arranged fields
2020-12-21 11:44:48 +05:30
Ganga Manoj
ddd9fe49fc feat: Add month_to_date field 2020-12-18 23:58:05 +05:30
Ganga Manoj
59fbf702da feat: Compute month_to_date 2020-12-18 23:52:11 +05:30
Ganga Manoj
1b1df6b6bc feat: Add month_to_date field 2020-12-18 23:51:05 +05:30
marination
d6277cdc7f feat: Value Based and Numeric Quality Inspection
- Acceptance Formula is optional
- Choose between Value based and Numeric QI
- If numeric, select single or multiple readings
- Added Min, Max and Mean Values for numeric inspection to avoid formula usage
- Deprecated code cleanup in js file
2020-12-18 21:37:19 +05:30
Ganga Manoj
89a02d7d3f feat: Changed Fiscal Year to Payroll Period 2020-12-18 15:31:45 +05:30
Rushabh Mehta
2cd41bca06 fix(routes): desk to app 2020-12-18 13:17:58 +05:30
Afshan
a81519f557 fix: error popup for submitted doc 2020-12-18 11:16:01 +05:30
Rushabh Mehta
6afa83f2c7 fix(requirements): update to latest pandas 2020-12-18 11:05:55 +05:30
Ganga Manoj
9f1e018e4f feat: Compute year_to_date 2020-12-18 01:35:27 +05:30
Ganga Manoj
04f48a011d feat: Add year_to_date field 2020-12-18 01:31:00 +05:30
pateljannat
b8e656512e fix: test cleanup 2020-12-17 20:22:06 +05:30
Deepesh Garg
d4ee05c5fb Merge pull request #24172 from deepeshgarg007/ttax_category_typo
fix: Typo in tax category doctype query
2020-12-17 18:48:03 +05:30
Deepesh Garg
b074334dcf fix: Typo in tax category doctype query 2020-12-17 18:46:59 +05:30
pateljannat
79b71462cb fix: patch 2020-12-17 18:21:34 +05:30
Deepesh Garg
5a06908bbc fix: Add breadccrumbs to item group page 2020-12-17 17:38:53 +05:30
pateljannat
09f0e9111d fix: patch 2020-12-17 17:20:21 +05:30
Anurag Mishra
611b42733b fix: leave policy dashboard fix and roles 2020-12-17 16:34:15 +05:30
Anurag Mishra
5e8e0037d6 Merge branch 'develop' into do-not-manufacture-same-serial-no-two-develop 2020-12-17 16:01:42 +05:30
Anurag Mishra
7e641f457c Merge pull request #24166 from scmmishra/appointment-fix
fix: wrap assignees in a list
2020-12-17 16:00:48 +05:30
pateljannat
2dbb1d6bc7 fix: indentation 2020-12-17 15:49:52 +05:30
Shivam Mishra
1872e2c1ac fix: wrap assignees in a list 2020-12-17 14:29:52 +05:30
Deepesh Garg
5432ee3364 Merge pull request #24095 from frappe/skr04_equity_dev
feat: separate equity tree in CoA SKR04
2020-12-17 12:37:28 +05:30
Deepesh Garg
51892efd60 fix: Translation issues 2020-12-17 12:35:22 +05:30
Deepesh Garg
f48296ddf0 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2020-12-17 12:20:16 +05:30
Deepesh Garg
6f99c0850c fix: Linting Issues 2020-12-17 12:19:58 +05:30
pateljannat
2f4c88b228 Merge branch 'project-template-and-tasks' of https://github.com/pateljannat/erpnext into project-template-and-tasks 2020-12-17 11:56:06 +05:30
pateljannat
f2bff8e220 fix: patch relaod doctype 2020-12-17 11:54:59 +05:30
Deepesh Garg
d6cd02d29d fix: Add tests 2020-12-17 09:21:24 +05:30
Deepesh Garg
5a2030c2f2 fix: Add server side methods and other fixes 2020-12-17 09:21:11 +05:30
Rucha Mahabal
f1854f9196 Merge branch 'develop' into fix-therapy-type-filter 2020-12-17 08:46:39 +05:30
Rohit Waghchaure
c9f63accdd fix: do not manufacture same serial no multiple times 2020-12-17 00:18:17 +05:30
Suraj Shetty
70cfc4df15 fix: Remove dashboard page from home 2020-12-16 20:55:47 +05:30
Jannat Patel
28098d6f93 Merge branch 'develop' into project-template-and-tasks 2020-12-16 20:09:27 +05:30
Rucha Mahabal
21168eab7f fix: Remove patch for setting next date in Subscription (#24158) 2020-12-16 19:39:34 +05:30
pateljannat
2528d5ee15 fix: tests 2020-12-16 18:29:49 +05:30
Rucha Mahabal
23d6afe43a fix: Auto Repeat Import (#24157) 2020-12-16 18:21:08 +05:30
Prssanna Desai
df2067003e Merge pull request #24154 from prssanna/job-card-gantt-v13 2020-12-16 17:01:43 +05:30
Prssanna Desai
421bfee874 Merge branch 'develop' into job-card-gantt-v13 2020-12-16 16:59:50 +05:30
prssanna
ff59f18012 fix: override field_map for job card gantt 2020-12-16 16:56:30 +05:30
pateljannat
d44f45c57b fix: sider issues 2020-12-16 16:28:09 +05:30
hasnain2808@gmail.com
2da0035a0f Merge branch 'develop' into fix-analytics-reports 2020-12-16 16:14:23 +05:30
Rucha Mahabal
f2a431d866 fix: filter Therapy Types and Therapy Plan in Patient Appointment 2020-12-16 16:09:58 +05:30
Rucha Mahabal
5a8a52b9c6 fix: Therapy Type and Therapy Plan field visibility in Patient Appointment 2020-12-16 15:54:06 +05:30
Deepesh Garg
924f99bead fix: Help message 2020-12-16 15:42:50 +05:30
Deepesh Garg
4638f604ed Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-16 14:59:30 +05:30
Rucha Mahabal
b184d43e75 refactor: Auto Repeat next schedule date function params (#23959)
* refactor: Auto Repeat next schedule date function params

* refactor: Auto Repeat next schedule date function params
2020-12-16 14:51:42 +05:30
hasnain2808@gmail.com
9962ba86d0 fix: charts not displaying when tree_type changed 2020-12-16 14:41:04 +05:30
Your Name
3ebe511eb9 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-16 08:19:47 +00:00
pateljannat
87b477a311 feat: patch for project template tasks 2020-12-16 13:37:21 +05:30
Shivam Mishra
c634e24b60 Merge pull request #24147 from scmmishra/desk-enhancements 2020-12-16 13:27:04 +05:30
Shivam Mishra
fd044b032f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into desk-enhancements 2020-12-16 13:21:10 +05:30
Deepesh Garg
bc462fa140 Merge pull request #24146 from deepeshgarg007/tax_template_update_customer
fix: Tax template update on customer address change
2020-12-16 13:02:00 +05:30
Deepesh Garg
96a5e4effa fix: Tax template update on customer address change 2020-12-16 13:00:55 +05:30
Rucha Mahabal
02ebc9a11e Merge branch 'develop' into patient-history-enhancements 2020-12-16 12:51:45 +05:30
Rushabh Mehta
34fc528500 fix(minor): debounce taxes call 2020-12-16 09:44:11 +05:30
Leela vadlamudi
29778e2fba feat: Voice Call Settings doctype added (#24126) 2020-12-15 21:23:17 +05:30
Mohammad Hasnain Mohsin Rajan
c553453825 fix: user is not a field (#24129) 2020-12-15 16:29:10 +05:30
Shivam Mishra
23f638a47c Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-15 13:21:35 +05:30
Saqib Ansari
d050816e17 fix: overflow of customer selector 2020-12-15 12:02:26 +05:30
pateljannat
a6fef7ae6b feat: parent-child relation tasks 2020-12-15 11:50:18 +05:30
pateljannat
caf67e608f fix: tests 2020-12-15 10:00:31 +05:30
pateljannat
23f0debf88 fix: tests 2020-12-15 10:00:21 +05:30
Raffael Meyer
f2206c27e7 fix: allow other github links in same PR (#23995) 2020-12-15 09:35:16 +05:30
Rucha Mahabal
85213fa8cb fix(Asset): set current asset value before calculating difference amount (#24119) 2020-12-15 09:32:02 +05:30
Afshan
89d14fdf68 fix: minor ui changes (#24125)
* fix: minor ui changes

* fix: slider
2020-12-15 09:31:30 +05:30
Afshan
58e8e06ab7 fix: retention filters (#24123)
* fix: retention filters

* fix: slider
2020-12-15 09:17:17 +05:30
Afshan
e64718b2ae fix: selecting salary component (#24121) 2020-12-15 09:16:27 +05:30
Deepesh Garg
46f3c65b00 feat: Multi currency in landed cost voucher 2020-12-14 23:09:19 +05:30
pateljannat
f9751f1f95 feat: project template having dependent tasks 2020-12-14 16:20:02 +05:30
Marica
406af27b9e Merge branch 'develop' into putaway 2020-12-14 13:07:50 +05:30
marination
c47d38dc18 chore: Stock Entry Tests and fixes
- Maintain item-warehouse wise rules for Stock Entry Material Transfer
- Test cases for Stock Entry with more use cases
- Sider fixes
2020-12-14 12:12:49 +05:30
Suraj Shetty
f2511c84b5 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-14 09:05:48 +05:30
Suraj Shetty
ada5facdf5 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-11 12:57:49 +05:30
Suraj Shetty
dc13d4b0fc Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-11 12:57:04 +05:30
Jannat Patel
79fe7758d4 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2020-12-11 11:57:09 +05:30
pateljannat
06961a261e fix: conflicts 2020-12-11 11:46:43 +05:30
pateljannat
fa72671929 fix: partial order for drop ship 2020-12-11 11:16:54 +05:30
Suraj Shetty
c9209237da fix: Progress bar style 2020-12-10 22:45:27 +05:30
pateljannat
6574404536 Merge branch 'project-template-and-tasks' of https://github.com/pateljannat/erpnext into project-template-and-tasks 2020-12-10 20:55:40 +05:30
pateljannat
e15ef1e19f fix: corrected tests 2020-12-10 20:55:25 +05:30
Raffael Meyer
7f387452ca Merge branch 'develop' into skr04_equity_dev 2020-12-10 10:51:55 +01:00
Rushabh Mehta
39154e5296 fix(minor): add debounce to calls 2020-12-10 12:37:16 +05:30
barredterra
52d37edf98 feat: separate equity tree in CoA SKR04 2020-12-09 17:57:29 +01:00
Deepesh Garg
249595a2d8 fix: Sider Issues 2020-12-09 18:13:23 +05:30
Jannat Patel
ad705d04a7 Merge branch 'develop' into project-template-and-tasks 2020-12-09 18:12:25 +05:30
pateljannat
f936e8a334 fix: sider issues fixed 2020-12-09 17:09:22 +05:30
marination
a5d8d32775 chore: Test and fixes
- Tests as per new design flow
- Fixed duplicate data bug in Warehouse Capacity Summary
- Set Amount currently on applying rule in client side
- Apply rules on server side before validate
2020-12-09 16:27:18 +05:30
Deepesh Garg
c41fb7556b fix: Add test case for batch pricing 2020-12-09 15:55:39 +05:30
pateljannat
811629a961 feat: tasks in project template and tests 2020-12-09 15:52:05 +05:30
Deepesh Garg
bc0a2859e4 fix: Rate for items with no batch 2020-12-09 12:40:09 +05:30
Deepesh Garg
91e1136d2c feat: Batch wise item pricing 2020-12-08 22:53:03 +05:30
marination
0f3cfc502b feat: Trigger rule application from client side
- Table is reset and overwritten with applied rules on checkbox trigger
- Sider fixes
2020-12-08 19:44:29 +05:30
Rushabh Mehta
fec8dba16c fix(merge): merge develop 2020-12-08 16:23:09 +05:30
Marica
0b68243979 Merge branch 'develop' into putaway 2020-12-08 11:44:00 +05:30
Jannat Patel
18cf2f31d1 Merge pull request #1 from frappe/develop
Sync fork
2020-12-08 11:36:40 +05:30
pateljannat
c82b52855c fix: template filter for tasks 2020-12-08 11:07:59 +05:30
marination
fac4035f23 feat: Apply Putaway Rules within transaction itself
- Added checkbox 'Apply Putaway Rule' in PR and SE
- Added link to rule in child tables
- Rule is applied on Save
- Validation for over receipt
- Apply Rule on Stock Entry as well for Material Transfer and Receipt
2020-12-07 21:35:49 +05:30
pateljannat
71b1a0ca7d fix: cancelling both test po created 2020-12-07 19:09:29 +05:30
pateljannat
32e77d73cf fix: added supplier to second item in test 2020-12-07 17:39:37 +05:30
pateljannat
89624ad622 fix: sider issue fixed 2020-12-07 16:50:03 +05:30
pateljannat
5597e386b4 fix: added test for drop ship partial order 2020-12-07 15:53:45 +05:30
pateljannat
c32ac223ed feat: adding task field in project template 2020-12-07 14:53:15 +05:30
pateljannat
7fef622b13 fix: drop ship partial order fixed 2020-12-04 19:18:36 +05:30
Shivam Mishra
be9550955f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-04 14:18:17 +05:30
Deepesh Garg
7b2d518059 fix: Dimension filters in accounting reports 2020-12-04 11:28:26 +05:30
Glen Whitney
dea6a90a1f feat(Accounting Dimension): other apps may have accounting dimension doctypes
Prior to this change, there was simply a single hardcoded list of doctypes
  with accounting dimensions in ERPNext. However, when extending the
  capabilities of ERPNext using an add-on app rather than by modifying
  ERPNext itself, it may well be necessary to create new doctypes in other
  apps that will have accounting dimensions as well.

  So, this PR moves the list of doctypes with accounting dimensions into
  hooks.py so it can be accumulated from multiple apps. It also allows the
  list of doctypes in make_dimension_in_accounting_doctypes be specifiable,
  for more convenient use in the after_install hooks of other apps.
2020-12-03 22:27:44 +00:00
Saqib Ansari
f4d645f87a perf: async pos app start 2020-12-03 19:30:12 +05:30
Saqib Ansari
a6a37b7c81 fix: scroll elements 2020-12-03 19:24:07 +05:30
Shivam Mishra
2fa3cac814 feat: update workspace folders 2020-12-03 15:48:57 +05:30
Shivam Mishra
2895645f86 feat: rename desk page to workspace 2020-12-03 15:39:53 +05:30
Deepesh Garg
12b45b3f2a Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-02 12:46:23 +05:30
Deepesh Garg
59820004b8 fix: Exception naming 2020-12-02 12:34:59 +05:30
Deepesh Garg
ab5053ef9c fix: Accounting dimension import in PCV 2020-12-02 12:34:40 +05:30
Rucha Mahabal
288853d8f0 Merge branch 'develop' into patient-history-enhancements 2020-12-01 13:44:16 +05:30
Shivam Mishra
9aaca25edb feat: update desk page json 2020-12-01 13:39:54 +05:30
Shivam Mishra
de68f74b4c chore: update all desk pages 2020-12-01 12:51:38 +05:30
Shivam Mishra
0b774e8ea5 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-01 11:30:53 +05:30
Saqib Ansari
188e0ecbcb fix: submit order summary center alignment 2020-11-30 17:53:57 +05:30
Rucha Mahabal
f6756838ba fix: patch 2020-11-30 17:51:56 +05:30
Saqib Ansari
02d1491e39 fix: order summary qty alignment 2020-11-30 17:42:51 +05:30
Rucha Mahabal
b5b8c5474a refactor: move call to fetch doctype fields to server-side 2020-11-30 16:09:15 +05:30
Rucha Mahabal
0d43ea5ebb refactor: show Patient History feed as per configured date instead of creation 2020-11-30 15:00:42 +05:30
Shivam Mishra
27e7c264f2 fix: link type 2020-11-30 14:58:16 +05:30
Shivam Mishra
3e6cdea51f feat: delete config python files 2020-11-30 14:58:16 +05:30
Shivam Mishra
61388d412b feat: update desk pages 2020-11-30 14:58:00 +05:30
rohitwaghchaure
9707b4789e fix: stock ageing report not working (#23923) 2020-11-30 14:58:00 +05:30
Afshan
7e2d8ca916 fix: Handle the "no leave_allocation found" case (#23922)
* fix: Handle the "no leave_allocation found" case

* fix: format of error msg
2020-11-30 14:58:00 +05:30
Marica
1466ed4579 fix: Don't copy terms and discount from SO to PO (#23903)
* fix: Dont copy terms, discount and required by from SO to PO

* fix: Let delivery date and required by date get mapped
2020-11-30 14:58:00 +05:30
Suraj Shetty
c8b5f982ac fix: Typo (Enchashment > Encashment) (#23919) 2020-11-30 14:58:00 +05:30
Afshan
8c3b2d0a0d fix: change query to frappe.get_all 2020-11-30 14:58:00 +05:30
Afshan
beb1811523 fix: payroll attendance error 2020-11-30 14:58:00 +05:30
marination
d0ee615c2c chore: Pricing Rule with Item Price Test 2020-11-30 14:58:00 +05:30
marination
8e2ce641c3 fix: Dont overrule Item Price via Pricing Rule Rate if 0 2020-11-30 14:58:00 +05:30
Anurag Mishra
58a3fea1b7 fix: Error handling in Upload Attendance (#23907) 2020-11-30 14:58:00 +05:30
Raffael Meyer
896e4b1722 fix: improve UX of DATEV report (#23892)
* feat(DATEV Settings): button to show report

* feat(desk): add DATEV to Reports under Accounting

* fix(report DATEV): last calendar month as default

* fix: let user create DATEV Settings

(Instead of showing an error message.)
2020-11-30 14:58:00 +05:30
Kenneth Sequeira
39102e68df fix: make contract template editable (#23891) 2020-11-30 14:58:00 +05:30
rohitwaghchaure
10c168e257 fix: default cost center in item master not set in stock entry (#23877)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-11-30 14:58:00 +05:30
Raffael Meyer
59be7ff144 feat: make account number length configurable (#23845) 2020-11-30 14:58:00 +05:30
Raffael Meyer
1ea12079da fix: fiscal year can be shorter than 12 months (#23838)
* fix: replace unnecessary SQL query

* feat: checkbox "Is Short Year"

Also, set checkbox and dates only once.

* fix: toggle no longer necessary

Date fields use set_only_once.

* feat: short years can be less than 12 months

* fix: if short year, don't add 12 months to start date

* test: short year

* fix: move short fiscal year to test records
2020-11-30 14:58:00 +05:30
Marica
ecce3bca2f chore: PO cleanup (#23774)
* chore: Subcontracting section and items section enhancement

- Set target warehouse moved to Items section
- Added subcontraction label to supply RM section

* chore: PO & PO Item Form Cleanup

* chore: PO Get Items from cleanup

* fix: Taxes and Charges field visibility

* chore: Cleanup

* fix: Translation styling
2020-11-30 14:58:00 +05:30
Rohit Waghchaure
d6a2b390dc fix: not able to save bom 2020-11-30 14:58:00 +05:30
Deepesh Garg
7b16c55c9a feat: Sync old shopify orders (#23841)
* feat: Sync old shopify orders

* fix: Old orders syncing by date

* fix: Remove unnecessary code

* fix: Remove unintentional changes

Co-authored-by: Saurabh <saurabh@erpnext.com>
2020-11-30 14:58:00 +05:30
Anurag Mishra
a81e872cdb fix: added wrong absent days calculation in salary slip 2020-11-30 14:57:27 +05:30
Rucha Mahabal
ed3fc20731 fix: sider issues 2020-11-30 14:56:24 +05:30
Rucha Mahabal
7a69a3367c Merge branch 'develop' into patient-history-enhancements 2020-11-30 14:16:46 +05:30
Rucha Mahabal
4ee293d2f4 fix: handle non-configured fields 2020-11-30 14:12:48 +05:30
Rucha Mahabal
5e3c51bf7d refactor: format value using standard formatters 2020-11-30 13:35:00 +05:30
Rucha Mahabal
c538a4a31d refactor: remove medical record creation methods from individual doctypes 2020-11-30 13:22:34 +05:30
Rucha Mahabal
c0fcc807d3 feat: hooks for updating and deleting medical records 2020-11-30 13:22:01 +05:30
Rucha Mahabal
4097e89f8b feat: Standard doctype config for Patient History 2020-11-30 12:48:39 +05:30
Rucha Mahabal
f3df5c9f3c feat: patch to setup standard doctype config in Patient History Settings 2020-11-30 12:16:28 +05:30
Rucha Mahabal
06e7cc2c35 fix: Handle table field rendering in Patient Medical record 2020-11-30 12:01:48 +05:30
Rucha Mahabal
4d6d115a4d feat: date range filter for Patient History 2020-11-29 23:16:12 +05:30
Rucha Mahabal
4af3d4e4bb fix: feed not visible when filter is reset 2020-11-29 22:43:56 +05:30
Rucha Mahabal
fc1e352adf feat: Doctype filter for Patient History 2020-11-29 22:38:14 +05:30
Rucha Mahabal
cbdbb9e65d chore: code clean-up 2020-11-28 23:58:00 +05:30
Rucha Mahabal
a75f79762f feat: Link for individual documents in Patient History 2020-11-28 23:09:07 +05:30
Rucha Mahabal
c91e03c891 feat: Create Patient Medical Record on configured doctype submission 2020-11-28 20:24:06 +05:30
Rucha Mahabal
f2932d7208 feat: set date field in Settings for Patient Medical Record 2020-11-28 19:19:58 +05:30
Rucha Mahabal
2c114053ad feat: Patient History Settings 2020-11-27 15:05:28 +05:30
Shivam Mishra
94ebbc550e Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-26 13:41:52 +05:30
marination
1087d97c03 feat: Warehouse Capacity Summary
- Added Page Warehouse Capacity Summary
- Added Page to Desk and Putaway List View
- Reused Item Dashboard/Stock Balance page render code
- Added naming series to Putaway Rule
2020-11-26 10:45:44 +05:30
Deepesh Garg
1a4390de44 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-11-25 14:51:11 +05:30
Deepesh Garg
6b9dda5f3e fix: Move filter setup to doctype controllers 2020-11-25 14:49:10 +05:30
Deepesh Garg
92b3449789 fix: Label changes 2020-11-25 14:01:57 +05:30
Deepesh Garg
4e991fe668 fix: Define specific exceptions and fix tests 2020-11-25 13:46:07 +05:30
Deepesh Garg
df065f7044 fix: form layout and naming fixes 2020-11-25 13:44:52 +05:30
Deepesh Garg
6c17b84cae fix: Replace raw query with ORM 2020-11-25 13:42:16 +05:30
marination
2ed80656aa chore: Code Cleanup
- Validate capacity < stock level only on new rule
- Mention stock uom while validating capacity in new rule
- Separate function to format and display unassigned items
- Format ORM args
2020-11-24 21:07:56 +05:30
marination
2fbaa5dc58 Merge branch 'putaway' of https://github.com/marination/erpnext into putaway 2020-11-24 17:39:19 +05:30
marination
68a49efc80 chore: Added Putaway Rule to Desk Page and added Priority to List View 2020-11-24 17:38:34 +05:30
Marica
e762bc67eb Merge branch 'develop' into putaway 2020-11-24 17:28:34 +05:30
Saqib Ansari
ac164c66ed perf: get recent transaction only when component is visible 2020-11-24 16:09:11 +05:30
Saqib Ansari
7f1d7894c2 fix: cannot find erpnext.payments 2020-11-24 16:08:38 +05:30
marination
ccbd432b56 chore: Added Tests
- Fixed Sider Issues
- Added perms to Putaway Rule
- Added Unit Tests to check warehouse assignment
2020-11-24 12:47:13 +05:30
marination
0cec1477f2 chore: Format unassigned Items dialog and add freeze message 2020-11-23 19:19:35 +05:30
Saqib Ansari
c1afc95e3c chore: remove unused code 2020-11-23 18:40:06 +05:30
Saqib Ansari
96feae608d refactor: build point of sale min js 2020-11-23 18:39:56 +05:30
Saqib Ansari
937dc467a0 fix: no transactions placeholder 2020-11-23 18:34:08 +05:30
Saqib Ansari
eeee7e9427 fix: post submission invoice recipt screen 2020-11-23 18:34:03 +05:30
Saqib Ansari
69ef766a93 feat: number pad in payment screen 2020-11-23 18:33:55 +05:30
Saqib Ansari
fa0ef218dd fix: customer details spacing 2020-11-23 18:33:45 +05:30
Saqib Ansari
f719380a0d fix: discount and taxes spacing 2020-11-23 18:33:40 +05:30
Saqib Ansari
fada84cc47 fix: remove console and asset loading 2020-11-23 18:33:34 +05:30
Saqib Ansari
d0d6fc2e17 fix: cannot open past order summary 2020-11-23 18:33:29 +05:30
Saqib Ansari
b0b6aa9124 refactor: past order list and summary with new ui 2020-11-23 18:33:22 +05:30
Saqib Ansari
7202e9f658 refactor: pos payment with new ui 2020-11-23 18:33:05 +05:30
Saqib Ansari
fc3315a6d7 feat: pos item details with new ui 2020-11-23 18:32:58 +05:30
Saqib Ansari
cc208839cf feat: pos cart with new ui 2020-11-23 18:32:49 +05:30
Saqib Ansari
210baafad4 feat: pos customer selector new ui 2020-11-23 18:32:07 +05:30
Saqib Ansari
0fb2e02b56 feat: pos item selector new ui 2020-11-23 18:32:00 +05:30
marination
90598ea19c chore: Multi UOM support for Putaway
- Added UOM & conversion factor field in Putaway Rule
- Items are split and assigned as per UOM
- Handled Whole UOMs too
2020-11-23 17:35:13 +05:30
marination
9596276b95 fix: Linter and Sider 2020-11-23 10:32:17 +05:30
marination
c7991f8561 feat: Putaway Rule 2020-11-20 11:53:20 +05:30
Smit Vora
8aeb340dc8 fix: add remarks to sales invoice 2020-11-19 19:18:48 +05:30
marination
86e03325c3 Merge branch 'develop' of https://github.com/frappe/erpnext into putaway 2020-11-19 14:07:48 +05:30
Nabin Hait
93bb7b0000 Merge branch 'develop' into membership-enhancements-2 2020-11-19 13:05:17 +05:30
Nabin Hait
2afc0bd87b Merge branch 'develop' into naming-series-proj 2020-11-19 08:24:32 +05:30
Shivam Mishra
1a74dd4237 feat: add product category cards 2020-11-18 17:56:37 +05:30
Shivam Mishra
ca3809831c refactor: use h1 for slidetitle 2020-11-18 17:39:17 +05:30
Shivam Mishra
3bec3cfef1 fix: don't use primary action for create 2020-11-18 17:10:02 +05:30
Shivam Mishra
8cf3bdd044 feat: add slider template 2020-11-18 17:09:45 +05:30
Rushabh Mehta
542bc01718 fix(minor): update routes 2020-11-18 15:00:34 +05:30
Shivam Mishra
f9e4f6b57a feat: add templates for online store 2020-11-17 16:38:09 +05:30
Deepesh Garg
350972ece4 fix: Account filters 2020-11-17 13:51:58 +05:30
Deepesh Garg
8b4d92d4fc fix: Disable filters after test 2020-11-17 13:19:29 +05:30
Shivam Mishra
e0b2e31f86 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-17 12:28:14 +05:30
Deepesh Garg
6456c3dc24 fix: Linting and test cases 2020-11-17 11:10:00 +05:30
Deepesh Garg
4bd52b4842 fix: Add test case 2020-11-16 23:01:36 +05:30
Deepesh Garg
d82c0f3bea fix: Add disable and mandatory check for accounting dimension filters 2020-11-16 20:32:16 +05:30
Marica
06f522cb27 Merge branch 'develop' into naming-series-proj 2020-11-16 13:32:24 +05:30
Deepesh Garg
0c6319194e fix: GL Entry validation for dimensions 2020-11-16 13:20:19 +05:30
marination
d51c953c22 chore: Fix Tests, use project name instead of project_name field 2020-11-16 12:48:40 +05:30
Deepesh Garg
9e9ea96582 fix: linting 2020-11-16 12:03:47 +05:30
Deepesh Garg
1f9b03345d fix: Remove project filter 2020-11-16 09:55:35 +05:30
Deepesh Garg
f916bc048f fix: Remove cost center query from doctypes 2020-11-15 22:44:39 +05:30
Deepesh Garg
6e5748e2a3 fix: dimension filter query 2020-11-15 22:43:48 +05:30
Deepesh Garg
96e874bfda fix: dimension filter query 2020-11-15 22:43:01 +05:30
Deepesh Garg
8b6370bb45 feat: Add accounting dimension filter doctype 2020-11-15 22:41:36 +05:30
Marica
510b389838 Merge branch 'develop' into naming-series-proj 2020-11-13 13:37:19 +05:30
Shivam Mishra
dc1e240642 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-12 11:33:47 +05:30
Shivam Mishra
bed717b442 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-12 11:32:59 +05:30
marination
c1b0e65f9f feat: Putaway 2020-11-12 09:54:44 +05:30
prssanna
922432616f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-10 17:24:15 +05:30
prssanna
e3b71b9b24 fix: compact item print style 2020-11-10 17:23:24 +05:30
Shivam Mishra
723e220a34 chore: remove commented code 2020-11-09 14:07:40 +05:30
Shivam Mishra
12fafa3e7a chore: remove validation for old member field 2020-11-09 14:07:39 +05:30
Shivam Mishra
7e1cdf9b97 feat(breaking): update get_last_membership to fetch correct details 2020-11-09 14:07:39 +05:30
Shivam Mishra
c04321e645 test(membership): add test for invoicing and validation 2020-11-09 14:06:53 +05:30
Shivam Mishra
286ec04197 test(membership): setup test defaults 2020-11-09 14:06:23 +05:30
Shivam Mishra
e0f4dd0643 fix: fieldtype for auto_create_for_web_forms 2020-11-09 14:06:23 +05:30
Shivam Mishra
9d9fa74e6b refactor(member): drop email column
* remove email column
* update controller methods
* add patch to add value from email to email_id
2020-11-09 14:06:23 +05:30
Shivam Mishra
d75ff1a93e feat: generate invoice on payment authorized 2020-11-09 14:06:23 +05:30
Shivam Mishra
e927224fbc feat: update membership setting doctype
* rename enable_auto_invoicing to enable_invoicing
* add option to make_payment entry
2020-11-09 14:05:39 +05:30
Suraj Shetty
1183980e0e Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-09 13:14:11 +05:30
Suraj Shetty
c2d97e9d9c Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-06 10:26:19 +05:30
Shivam Mishra
2d1f8341f9 feat: update onboarding for accounts 2020-10-30 15:55:19 +05:30
Shivam Mishra
18ef17f3ba feat: add tour for sales taxes template 2020-10-30 15:55:19 +05:30
prssanna
71e5b60df1 refactor: refactor contextual print setting implementation 2020-10-29 14:19:34 +05:30
Faris Ansari
bc6a2b2f9c wip 2020-10-28 13:54:11 +05:30
Andy Zhu
b44af32628 Update accounts_controller.py
Updating Bin quantity based on doctype to optimize running efficiency.
2020-10-27 14:57:59 +13:00
rohitwaghchaure
58016b07e0 Merge branch 'develop' into opportunity-status 2020-10-24 19:09:38 +05:30
Nabin Hait
f30c389e4d Merge branch 'develop' into naming-series-proj 2020-10-22 21:46:13 +05:30
prssanna
13c6e2f320 feat: contextual setting for print uom after quantity 2020-10-22 17:19:00 +05:30
prssanna
d7b704c90f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-22 15:39:47 +05:30
prssanna
b57b3c9f6c feat: hook to fetch additional print settings in print view 2020-10-22 15:37:47 +05:30
Shivam Mishra
5e00ed926c feat: update icons 2020-10-21 12:30:22 +05:30
Shivam Mishra
9d468a8daf Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-21 11:38:31 +05:30
Shivam Mishra
2c2e7297ae feat: update accounts onboarding 2020-10-19 14:44:02 +05:30
Shivam Mishra
8261df29c4 feat: update splash logo 2020-10-19 13:52:35 +05:30
Shivam Mishra
5418818683 feat: add tour for account settings 2020-10-16 14:24:22 +05:30
prssanna
5ee7bca185 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-16 11:32:10 +05:30
prssanna
12d4be7f3f feat: icons in leaderboard 2020-10-16 11:31:47 +05:30
Shivam Mishra
cb8457b9ae feat: add description to Accounts onboarding 2020-10-15 13:53:12 +05:30
Anupam
d8a002cd8e Merge branch 'opportunity-status' of https://github.com/anupamvs/erpnext into opportunity-status 2020-10-14 11:48:42 +05:30
Shivam Mishra
55f52e8135 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-13 20:09:22 +05:30
Anupam Kumar
67a7279d1f Merge branch 'develop' into opportunity-status 2020-10-13 18:11:23 +05:30
Anupam
73d944da21 fix: review changes 2020-10-13 18:11:05 +05:30
Andy Zhu
1062d7eee0 fix: Update Items on Purchase Order
1. set warehouse using `get_item_warehouse`
2. update "reserved_qty" for sales order
2020-10-06 10:51:42 +13:00
Shivam Mishra
6a506b63bf fix: variables path 2020-10-05 12:41:30 +05:30
Andy Zhu
760248911d fix: Update Items on Purchase Order
If user add rows or remove rows to update items on purchase order, the quantity in bin won't get updated.
This fix is not mature yet but to give an tempopary solution for fixing this issue.
2020-10-05 12:16:48 +13:00
Shivam Mishra
1323a9a990 feat: set app name for ERPNext in install and patch 2020-09-30 16:33:14 +05:30
Shivam Mishra
9a4d603403 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-09-25 11:44:37 +05:30
Suraj Shetty
67095d239f fix: Custom dashboard sections 2020-09-10 17:15:52 +05:30
Shivam Mishra
2b405b9bb3 feat: add icon to healthcare desk page 2020-09-10 15:37:54 +05:30
Anupam Kumar
924618e1e3 Merge branch 'develop' into opportunity-status 2020-09-06 21:24:32 +05:30
gavin
c09b92d673 Merge branch 'develop' into naming-series-proj 2020-09-03 15:23:06 +05:30
Michelle Alva
d8c38249e0 fix: Change naming series
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
2020-09-03 09:04:21 +05:30
marination
099d6718c9 fix: Dont Copy or Print Naming Series 2020-09-02 11:54:55 +05:30
marination
f51cf9f23e fix: Crop Cycle Test 2020-09-02 11:43:36 +05:30
Suraj Shetty
9cc87f8b9a Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-09-01 13:55:49 +05:30
Suraj Shetty
df00c5c846 fix: Update erpnext logo 2020-09-01 13:55:34 +05:30
Marica
a222081316 Merge branch 'develop' into naming-series-proj 2020-09-01 12:35:11 +05:30
michellealva
f46c1c5164 fix: Change property of field 2020-08-30 21:37:45 +05:30
michellealva
288ced24db feat: Add Naming Series for Project DocType 2020-08-30 19:33:27 +05:30
prssanna
fa400820bb fix: move leaderboard style to frappe 2020-08-28 15:02:04 +05:30
Shivam Mishra
a6cb27cb8e chore: trigger build 2020-08-28 13:10:46 +05:30
Suraj Shetty
f39bb116cc Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-08-27 19:27:49 +05:30
prssanna
a324e9bd12 fix: remove text-muted and small class fromtree items 2020-08-27 19:26:14 +05:30
Suraj Shetty
a49af09705 fix: Primary button icon 2020-08-27 18:57:43 +05:30
Suraj Shetty
b6ebcd7559 refactor: Replace darkgray indicator with gray indicator 2020-08-27 18:57:18 +05:30
prssanna
744169833c fix: replace indicator color darkgrey with darkgray 2020-08-27 17:06:10 +05:30
Suraj Shetty
99dfb9556d refactor: Simplify code 2020-08-23 16:56:46 +05:30
Suraj Shetty
314551ceb2 refactor: Use right css clas name 2020-08-23 16:36:56 +05:30
Suraj Shetty
a43e760703 fix: Item dashboard style 2020-08-23 16:36:28 +05:30
Suraj Shetty
ecc7eedd10 fix: Update erpnext logo 2020-08-23 16:35:39 +05:30
Suraj Shetty
6f9f40992c Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-08-23 16:33:50 +05:30
Anupam K
9d82953242 fix: Opportunity Status fix 2020-08-06 23:58:56 +05:30
Shivam Mishra
de80553d89 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-08-03 12:34:05 +05:30
Shivam Mishra
11111cd9a9 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-07-30 21:29:02 +05:30
Shivam Mishra
b6fb13258f feat: move financial statement switcher to page toolbar 2020-07-23 17:02:32 +05:30
Shivam Mishra
f59d927f73 feat: update summary items 2020-07-23 17:02:32 +05:30
Shivam Mishra
840550e25f refactor: change sequence for profit and loss statement 2020-07-23 17:02:32 +05:30
Shivam Mishra
be5e129259 feat: update icons for erpnext settings shortcuts 2020-07-23 17:02:32 +05:30
Shivam Mishra
1358efe896 feat: update icons 2020-07-23 17:02:32 +05:30
1163 changed files with 48258 additions and 27023 deletions

View File

@@ -92,6 +92,7 @@
"cur_page": true,
"cur_list": true,
"cur_tree": true,
"cur_pos": true,
"msg_dialog": true,
"is_null": true,
"in_list": true,
@@ -149,6 +150,7 @@
"it": true,
"context": true,
"before": true,
"beforeEach": true
"beforeEach": true,
"onScan": true
}
}

32
.flake8 Normal file
View File

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

View File

@@ -21,8 +21,8 @@ def docs_link_exists(body):
if word.startswith('http') and uri_validator(word):
parsed_url = urlparse(word)
if parsed_url.netloc == "github.com":
_, org, repo, _type, ref = parsed_url.path.split('/')
if org == "frappe" and repo in docs_repos:
parts = parsed_url.path.split('/')
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
return True

46
.github/helper/install.sh vendored Normal file
View File

@@ -0,0 +1,46 @@
#!/bin/bash
set -e
cd ~ || exit
sudo apt-get install redis-server
sudo apt install nodejs
sudo apt install npm
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
sudo apt-get install libcups2-dev
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 --site test_site reinstall --yes

38
.github/helper/semgrep_rules/README.md vendored Normal file
View File

@@ -0,0 +1,38 @@
# 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

@@ -0,0 +1,28 @@
import frappe
from frappe import _, flt
from frappe.model.document import Document
def on_submit(self):
if self.value_of_goods == 0:
frappe.throw(_('Value of goods cannot be 0'))
# ruleid: frappe-modifying-after-submit
self.status = 'Submitted'
def on_submit(self):
if flt(self.per_billed) < 100:
self.update_billing_status()
else:
# todook: frappe-modifying-after-submit
self.status = "Completed"
self.db_set("status", "Completed")
class TestDoc(Document):
pass
def validate(self):
#ruleid: frappe-modifying-child-tables-while-iterating
for item in self.child_table:
if item.value < 0:
self.remove(item)

View File

@@ -0,0 +1,74 @@
# This file specifies rules for correctness according to how frappe doctype data model works.
rules:
- id: frappe-modifying-after-submit
patterns:
- pattern: self.$ATTR = ...
- pattern-inside: |
def on_submit(self, ...):
...
- metavariable-regex:
metavariable: '$ATTR'
# this is negative look-ahead, add more attrs to ignore like (ignore|ignore_this_too|ignore_me)
regex: '^(?!status_updater)(.*)$'
message: |
Doctype modified after submission. Please check if modification of self.$ATTR is commited to database.
languages: [python]
severity: ERROR
- id: frappe-modifying-after-cancel
patterns:
- pattern: self.$ATTR = ...
- pattern-inside: |
def on_cancel(self, ...):
...
- metavariable-regex:
metavariable: '$ATTR'
regex: '^(?!ignore_linked_doctypes|status_updater)(.*)$'
message: |
Doctype modified after cancellation. Please check if modification of self.$ATTR is 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:
exclude:
- test_*.py
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

View File

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

View File

@@ -0,0 +1,25 @@
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
- id: frappe-sqli-format-strings
patterns:
- pattern-inside: |
@frappe.whitelist()
def $FUNC(...):
...
- pattern-either:
- pattern: frappe.db.sql("..." % ...)
- pattern: frappe.db.sql(f"...", ...)
- pattern: frappe.db.sql("...".format(...), ...)
message: |
Detected use of raw string formatting for SQL queries. This can lead to sql injection vulnerabilities. Refer security guidelines - https://github.com/frappe/erpnext/wiki/Code-Security-Guidelines
languages: [python]
severity: WARNING

View File

@@ -0,0 +1,37 @@
// 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])

View File

@@ -0,0 +1,53 @@
# 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
_('')

View File

@@ -0,0 +1,63 @@
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*'
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

31
.github/helper/semgrep_rules/ux.py vendored Normal file
View File

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

15
.github/helper/semgrep_rules/ux.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
rules:
- id: frappe-missing-translate-function
pattern-either:
- patterns:
- pattern: frappe.msgprint("...", ...)
- pattern-not: frappe.msgprint(_("..."), ...)
- pattern-not: frappe.msgprint(__("..."), ...)
- patterns:
- pattern: frappe.throw("...", ...)
- pattern-not: 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, javascript, json]
severity: ERROR

View File

@@ -1,4 +1,6 @@
{
"db_host": "127.0.0.1",
"db_port": 3306,
"db_name": "test_frappe",
"db_password": "test_frappe",
"auto_email_id": "test@example.com",

View File

@@ -2,7 +2,7 @@ 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*(.)*?\s*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)")
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[\"']")
@@ -28,7 +28,7 @@ for _file in files_to_scan:
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 + 1}\n{line.strip()[:100]}')
print(f'\nF-strings are not supported for translations at line number {line_number}\n{line.strip()[:100]}')
continue
else:
continue
@@ -36,7 +36,7 @@ for _file in files_to_scan:
match = pattern.search(line)
error_found = False
if not match and line.endswith(',\n'):
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:]
@@ -44,11 +44,11 @@ for _file in files_to_scan:
if not match:
error_found = True
print(f'\nTranslation syntax error at line number {line_number + 1}\n{line.strip()[:100]}')
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 + 1}\n{line.strip()[:100]}')
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

93
.github/workflows/ci-tests.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: CI
on: [pull_request, workflow_dispatch, push]
jobs:
test:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
include:
- TYPE: "server"
JOB_NAME: "Server"
RUN_COMMAND: cd ~/frappe-bench/ && bench --site test_site run-tests --app erpnext --coverage
- TYPE: "patch"
JOB_NAME: "Patch"
RUN_COMMAND: cd ~/frappe-bench/ && 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 && bench --site test_site migrate
name: ${{ matrix.JOB_NAME }}
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: 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: ${{ matrix.RUN_COMMAND }}
env:
TYPE: ${{ matrix.TYPE }}
- name: Coverage
if: matrix.TYPE == 'server'
run: |
cp ~/frappe-bench/sites/.coverage ${GITHUB_WORKSPACE}
cd ${GITHUB_WORKSPACE}
pip install coveralls==3.0.1
pip install coverage==5.5
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}

24
.github/workflows/semgrep.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Semgrep
on:
pull_request:
branches:
- develop
jobs:
semgrep:
name: Frappe Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python3
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Run semgrep
run: |
python -m pip install -q semgrep
git fetch origin $GITHUB_BASE_REF:$GITHUB_BASE_REF -q
files=$(git diff --name-only --diff-filter=d $GITHUB_BASE_REF)
[[ -d .github/helper/semgrep_rules ]] && semgrep --severity ERROR --config=.github/helper/semgrep_rules --quiet --error $files
semgrep --config="r/python.lang.correctness" --quiet --error $files
[[ -d .github/helper/semgrep_rules ]] && semgrep --severity WARNING --severity INFO --config=.github/helper/semgrep_rules --quiet $files

View File

@@ -1,69 +0,0 @@
language: python
dist: trusty
git:
depth: 1
cache:
- pip
addons:
hosts: test_site
mariadb: 10.3
jobs:
include:
- name: "Python 3.6 Server Side Test"
python: 3.6
script: bench --site test_site run-tests --app erpnext --coverage
- 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
- pip install frappe-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

@@ -5,7 +5,7 @@
<p>ERP made simple</p>
</p>
[![Build Status](https://api.travis-ci.com/frappe/erpnext.svg?branch=develop)](https://travis-ci.com/frappe/erpnext)
[![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)
[![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)
@@ -39,6 +39,10 @@ ERPNext is built on the [Frappe Framework](https://github.com/frappe/frappe), a
---
### 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.

9
erpnext/.stylelintrc Normal file
View File

@@ -0,0 +1,9 @@
{
"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

@@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '13.0.0-beta.8'
__version__ = '13.2.1'
def get_default_company(user=None):
'''Get default company for user'''
@@ -109,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:
@@ -132,16 +132,10 @@ def allow_regional(fn):
return caller
def get_last_membership():
def get_last_membership(member):
'''Returns last membership if exists'''
last_membership = frappe.get_all('Membership', 'name,to_date,membership_type',
dict(member=frappe.session.user, paid=1), order_by='to_date desc', limit=1)
dict(member=member, paid=1), order_by='to_date desc', limit=1)
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
if last_membership:
return last_membership[0]

View File

@@ -1,161 +0,0 @@
{
"cards": [
{
"hidden": 0,
"label": "Accounting Masters",
"links": "[\n {\n \"description\": \"Company (not Customer or Supplier) master.\",\n \"label\": \"Company\",\n \"name\": \"Company\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tree of financial accounts.\",\n \"icon\": \"fa fa-sitemap\",\n \"label\": \"Chart of Accounts\",\n \"name\": \"Account\",\n \"onboard\": 1,\n \"route\": \"#Tree/Account\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounts Settings\",\n \"name\": \"Accounts Settings\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Financial / accounting year.\",\n \"label\": \"Fiscal Year\",\n \"name\": \"Fiscal Year\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounting Dimension\",\n \"name\": \"Accounting Dimension\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Finance Book\",\n \"name\": \"Finance Book\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounting Period\",\n \"name\": \"Accounting Period\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Payment Terms based on conditions\",\n \"label\": \"Payment Term\",\n \"name\": \"Payment Term\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "General Ledger",
"links": "[\n {\n \"description\": \"Accounting journal entries.\",\n \"label\": \"Journal Entry\",\n \"name\": \"Journal Entry\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Make journal entries from a template.\",\n \"label\": \"Journal Entry Template\",\n \"name\": \"Journal Entry Template\",\n \"type\": \"doctype\"\n },\n \n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"General Ledger\",\n \"name\": \"General Ledger\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Customer Ledger Summary\",\n \"name\": \"Customer Ledger Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Supplier Ledger Summary\",\n \"name\": \"Supplier Ledger Summary\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Accounts Receivable",
"links": "[\n {\n \"description\": \"Bills raised to Customers.\",\n \"label\": \"Sales Invoice\",\n \"name\": \"Sales Invoice\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Customer database.\",\n \"label\": \"Customer\",\n \"name\": \"Customer\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Bank/Cash transactions against party or for internal transfer\",\n \"label\": \"Payment Entry\",\n \"name\": \"Payment Entry\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Payment Request\",\n \"label\": \"Payment Request\",\n \"name\": \"Payment Request\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Receivable\",\n \"name\": \"Accounts Receivable\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Receivable Summary\",\n \"name\": \"Accounts Receivable Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Register\",\n \"name\": \"Sales Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Item-wise Sales Register\",\n \"name\": \"Item-wise Sales Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Order\",\n \"is_query_report\": true,\n \"label\": \"Sales Order Analysis\",\n \"name\": \"Sales Order Analysis\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Delivered Items To Be Billed\",\n \"name\": \"Delivered Items To Be Billed\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Accounts Payable",
"links": "[\n {\n \"description\": \"Bills raised by Suppliers.\",\n \"label\": \"Purchase Invoice\",\n \"name\": \"Purchase Invoice\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Supplier database.\",\n \"label\": \"Supplier\",\n \"name\": \"Supplier\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Bank/Cash transactions against party or for internal transfer\",\n \"label\": \"Payment Entry\",\n \"name\": \"Payment Entry\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Payable\",\n \"name\": \"Accounts Payable\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Payable Summary\",\n \"name\": \"Accounts Payable Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Purchase Register\",\n \"name\": \"Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Item-wise Purchase Register\",\n \"name\": \"Item-wise Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Order\"\n ],\n \"doctype\": \"Purchase Order\",\n \"is_query_report\": true,\n \"label\": \"Purchase Order Analysis\",\n \"name\": \"Purchase Order Analysis\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Received Items To Be Billed\",\n \"name\": \"Received Items To Be Billed\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Reports",
"links": "[\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Trial Balance for Party\",\n \"name\": \"Trial Balance for Party\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Journal Entry\"\n ],\n \"doctype\": \"Journal Entry\",\n \"is_query_report\": true,\n \"label\": \"Payment Period Based On Invoice Date\",\n \"name\": \"Payment Period Based On Invoice Date\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Partners Commission\",\n \"name\": \"Sales Partners Commission\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Customer\"\n ],\n \"doctype\": \"Customer\",\n \"is_query_report\": true,\n \"label\": \"Customer Credit Balance\",\n \"name\": \"Customer Credit Balance\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Payment Summary\",\n \"name\": \"Sales Payment Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Address\"\n ],\n \"doctype\": \"Address\",\n \"is_query_report\": true,\n \"label\": \"Address And Contacts\",\n \"name\": \"Address And Contacts\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"DATEV Export\",\n \"name\": \"DATEV\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Financial Statements",
"links": "[\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Trial Balance\",\n \"name\": \"Trial Balance\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Profit and Loss Statement\",\n \"name\": \"Profit and Loss Statement\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Balance Sheet\",\n \"name\": \"Balance Sheet\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Cash Flow\",\n \"name\": \"Cash Flow\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Consolidated Financial Statement\",\n \"name\": \"Consolidated Financial Statement\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Multi Currency",
"links": "[\n {\n \"description\": \"Enable / disable currencies.\",\n \"label\": \"Currency\",\n \"name\": \"Currency\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Currency exchange rate master.\",\n \"label\": \"Currency Exchange\",\n \"name\": \"Currency Exchange\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Exchange Rate Revaluation master.\",\n \"label\": \"Exchange Rate Revaluation\",\n \"name\": \"Exchange Rate Revaluation\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Settings",
"links": "[\n {\n \"description\": \"Setup Gateway accounts.\",\n \"label\": \"Payment Gateway Account\",\n \"name\": \"Payment Gateway Account\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Template of terms or contract.\",\n \"label\": \"Terms and Conditions Template\",\n \"name\": \"Terms and Conditions\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"e.g. Bank, Cash, Credit Card\",\n \"label\": \"Mode of Payment\",\n \"name\": \"Mode of Payment\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Bank Statement",
"links": "[\n {\n \"label\": \"Bank\",\n \"name\": \"Bank\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Bank Account\",\n \"name\": \"Bank Account\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Bank Clearance\",\n \"name\": \"Bank Clearance\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Bank Reconciliation\",\n \"name\": \"bank-reconciliation\",\n \"type\": \"page\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Bank Reconciliation Statement\",\n \"name\": \"Bank Reconciliation Statement\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Subscription Management",
"links": "[\n {\n \"label\": \"Subscription Plan\",\n \"name\": \"Subscription Plan\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Subscription\",\n \"name\": \"Subscription\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Subscription Settings\",\n \"name\": \"Subscription Settings\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Goods and Services Tax (GST India)",
"links": "[\n {\n \"label\": \"GST Settings\",\n \"name\": \"GST Settings\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"GST HSN Code\",\n \"name\": \"GST HSN Code\",\n \"type\": \"doctype\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GSTR-1\",\n \"name\": \"GSTR-1\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GSTR-2\",\n \"name\": \"GSTR-2\",\n \"type\": \"report\"\n },\n {\n \"label\": \"GSTR 3B Report\",\n \"name\": \"GSTR 3B Report\",\n \"type\": \"doctype\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Sales Register\",\n \"name\": \"GST Sales Register\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Purchase Register\",\n \"name\": \"GST Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Itemised Sales Register\",\n \"name\": \"GST Itemised Sales Register\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Itemised Purchase Register\",\n \"name\": \"GST Itemised Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"country\": \"India\",\n \"description\": \"C-Form records\",\n \"label\": \"C-Form\",\n \"name\": \"C-Form\",\n \"type\": \"doctype\"\n },\n {\n \"country\": \"India\",\n \"label\": \"Lower Deduction Certificate\",\n \"name\": \"Lower Deduction Certificate\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Share Management",
"links": "[\n {\n \"description\": \"List of available Shareholders with folio numbers\",\n \"label\": \"Shareholder\",\n \"name\": \"Shareholder\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"List of all share transactions\",\n \"label\": \"Share Transfer\",\n \"name\": \"Share Transfer\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Share Transfer\"\n ],\n \"doctype\": \"Share Transfer\",\n \"is_query_report\": true,\n \"label\": \"Share Ledger\",\n \"name\": \"Share Ledger\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Share Transfer\"\n ],\n \"doctype\": \"Share Transfer\",\n \"is_query_report\": true,\n \"label\": \"Share Balance\",\n \"name\": \"Share Balance\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Cost Center and Budgeting",
"links": "[\n {\n \"description\": \"Tree of financial Cost Centers.\",\n \"icon\": \"fa fa-sitemap\",\n \"label\": \"Chart of Cost Centers\",\n \"name\": \"Cost Center\",\n \"route\": \"#Tree/Cost Center\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Define budget for a financial year.\",\n \"label\": \"Budget\",\n \"name\": \"Budget\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounting Dimension\",\n \"name\": \"Accounting Dimension\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Cost Center\"\n ],\n \"doctype\": \"Cost Center\",\n \"is_query_report\": true,\n \"label\": \"Budget Variance Report\",\n \"name\": \"Budget Variance Report\",\n \"type\": \"report\"\n },\n {\n \"description\": \"Seasonality for setting budgets, targets etc.\",\n \"label\": \"Monthly Distribution\",\n \"name\": \"Monthly Distribution\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Opening and Closing",
"links": "[\n {\n \"label\": \"Opening Invoice Creation Tool\",\n \"name\": \"Opening Invoice Creation Tool\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Chart of Accounts Importer\",\n \"name\": \"Chart of Accounts Importer\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Close Balance Sheet and book Profit or Loss.\",\n \"label\": \"Period Closing Voucher\",\n \"name\": \"Period Closing Voucher\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Taxes",
"links": "[\n {\n \"description\": \"Tax template for selling transactions.\",\n \"label\": \"Sales Taxes and Charges Template\",\n \"name\": \"Sales Taxes and Charges Template\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax template for buying transactions.\",\n \"label\": \"Purchase Taxes and Charges Template\",\n \"name\": \"Purchase Taxes and Charges Template\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax template for item tax rates.\",\n \"label\": \"Item Tax Template\",\n \"name\": \"Item Tax Template\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax Category for overriding tax rates.\",\n \"label\": \"Tax Category\",\n \"name\": \"Tax Category\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax Rule for transactions.\",\n \"label\": \"Tax Rule\",\n \"name\": \"Tax Rule\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax Withholding rates to be applied on transactions.\",\n \"label\": \"Tax Withholding Category\",\n \"name\": \"Tax Withholding Category\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Profitability",
"links": "[\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Gross Profit\",\n \"name\": \"Gross Profit\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Profitability Analysis\",\n \"name\": \"Profitability Analysis\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Invoice Trends\",\n \"name\": \"Sales Invoice Trends\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Purchase Invoice Trends\",\n \"name\": \"Purchase Invoice Trends\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Value-Added Tax (VAT UAE)",
"links": "[\n {\n \"country\": \"United Arab Emirates\",\n \"label\": \"UAE VAT Settings\",\n \"name\": \"UAE VAT Settings\",\n \"type\": \"doctype\"\n },\n {\n \"country\": \"United Arab Emirates\",\n \"is_query_report\": true,\n \"label\": \"UAE VAT 201\",\n \"name\": \"UAE VAT 201\",\n \"type\": \"report\"\n }\n\n]"
}
],
"category": "Modules",
"charts": [
{
"chart_name": "Profit and Loss",
"label": "Profit and Loss"
}
],
"creation": "2020-03-02 15:41:59.515192",
"developer_mode_only": 0,
"disable_user_customization": 0,
"docstatus": 0,
"doctype": "Desk Page",
"extends_another_page": 0,
"hide_custom": 0,
"idx": 0,
"is_standard": 1,
"label": "Accounting",
"modified": "2020-11-11 18:35:11.542909",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting",
"onboarding": "Accounts",
"owner": "Administrator",
"pin_to_bottom": 0,
"pin_to_top": 0,
"shortcuts": [
{
"label": "Chart Of Accounts",
"link_to": "Account",
"type": "DocType"
},
{
"label": "Sales Invoice",
"link_to": "Sales Invoice",
"type": "DocType"
},
{
"label": "Purchase Invoice",
"link_to": "Purchase Invoice",
"type": "DocType"
},
{
"label": "Journal Entry",
"link_to": "Journal Entry",
"type": "DocType"
},
{
"label": "Payment Entry",
"link_to": "Payment Entry",
"type": "DocType"
},
{
"label": "Accounts Receivable",
"link_to": "Accounts Receivable",
"type": "Report"
},
{
"label": "General Ledger",
"link_to": "General Ledger",
"type": "Report"
},
{
"label": "Trial Balance",
"link_to": "Trial Balance",
"type": "Report"
},
{
"label": "Dashboard",
"link_to": "Accounts",
"type": "Dashboard"
}
]
}

View File

@@ -13,7 +13,7 @@ class BalanceMismatchError(frappe.ValidationError): pass
class Account(NestedSet):
nsm_parent_field = 'parent_account'
def on_update(self):
if frappe.local.flags.ignore_on_update:
if frappe.local.flags.ignore_update_nsm:
return
else:
super(Account, self).on_update()
@@ -214,6 +214,7 @@ 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"))
@@ -224,6 +225,7 @@ 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."))

View File

@@ -120,17 +120,17 @@ frappe.treeview_settings["Account"] = {
} else {
treeview.new_node();
}
}, "octicon octicon-plus");
}, "add");
},
onrender: function(node) {
if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){
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">'
$('<span class="balance-area pull-right">'
+ (node.data.balance_in_account_currency ?
(format_currency(Math.abs(node.data.balance_in_account_currency),
node.data.account_currency) + " / ") : "")

View File

@@ -57,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_on_update = True
frappe.local.flags.ignore_update_nsm = True
_import_accounts(chart, None, None, root_account=True)
rebuild_tree("Account", "parent_account")
frappe.local.flags.ignore_on_update = False
frappe.local.flags.ignore_update_nsm = False
def add_suffix_if_duplicate(account_name, account_number, accounts):
if account_number:

View File

@@ -63,17 +63,21 @@
"Gewinnermittlung \u00a74/3 nicht Ergebniswirksam": {
"account_number": "1371"
},
"Abziehbare VSt. 7%": {
"account_number": "1571"
},
"Abziehbare VSt. 19%": {
"account_number": "1576"
},
"Abziehbare VStr. nach \u00a713b UStG 19%": {
"account_number": "1577"
},
"Leistungen \u00a713b UStG 19% Vorsteuer, 19% Umsatzsteuer": {
"account_number": "3120"
"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": {
@@ -196,6 +200,7 @@
},
"Umsatzsteuer": {
"is_group": 1,
"account_type": "Tax",
"Umsatzsteuer 7%": {
"account_number": "1771"
},

View File

@@ -292,18 +292,21 @@
"Umsatzsteuerforderungen fr\u00fchere Jahre": {}
},
"Sonstige Verm\u00f6gensgegenst\u00e4nde oder sonstige Verbindlichkeiten": {
"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%": {},
"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%": {}
},
"Aufl\u00f6sung Vorsteuer aus Vorjahr \u00a7 4/3 EStG": {},
"Aufzuteilende Vorsteuer": {},
"Aufzuteilende Vorsteuer 16%": {},
@@ -673,23 +676,26 @@
"Sonstige Verrechnungskonten (Interimskonto)": {
"account_type": "Stock Received But Not Billed"
},
"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": {
"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- Vorauszahlungen": {},
"Umsatzsteuer- Vorauszahlungen 1/11": {},
"Verbindlichkeiten aus Lohn- und Kirchensteuer": {}

View File

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

View File

@@ -254,7 +254,8 @@ 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')
company = kwargs.get('company'),
account_currency = kwargs.get('account_currency')
))
account.save()

View File

@@ -2,7 +2,6 @@
// 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;

View File

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

View File

@@ -29,15 +29,25 @@ class AccountingDimension(Document):
if exists and self.is_new():
frappe.throw("Document Type already used as a dimension")
if not self.is_new():
self.validate_document_type_change()
def validate_document_type_change(self):
doctype_before_save = frappe.db.get_value("Accounting Dimension", self.name, "document_type")
if doctype_before_save != self.document_type:
message = _("Cannot change Reference Document Type.")
message += _("Please create a new Accounting Dimension if required.")
frappe.throw(message)
def after_insert(self):
if frappe.flags.in_test:
make_dimension_in_accounting_doctypes(doc=self)
else:
frappe.enqueue(make_dimension_in_accounting_doctypes, doc=self)
frappe.enqueue(make_dimension_in_accounting_doctypes, doc=self, queue='long')
def on_trash(self):
if frappe.flags.in_test:
delete_accounting_dimension(doc=self)
delete_accounting_dimension(doc=self, queue='long')
else:
frappe.enqueue(delete_accounting_dimension, doc=self)
@@ -48,8 +58,13 @@ class AccountingDimension(Document):
if not self.fieldname:
self.fieldname = scrub(self.label)
def make_dimension_in_accounting_doctypes(doc):
doclist = get_doctypes_with_dimensions()
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()
doc_count = len(get_accounting_dimensions())
count = 0
@@ -69,13 +84,13 @@ def make_dimension_in_accounting_doctypes(doc):
"owner": "Administrator"
}
if doctype == "Budget":
add_dimension_to_budget_doctype(df, doc)
else:
meta = frappe.get_meta(doctype, cached=False)
fieldnames = [d.fieldname for d in meta.get("fields")]
meta = frappe.get_meta(doctype, cached=False)
fieldnames = [d.fieldname for d in meta.get("fields")]
if df['fieldname'] not in fieldnames:
if df['fieldname'] not in fieldnames:
if doctype == "Budget":
add_dimension_to_budget_doctype(df.copy(), doc)
else:
create_custom_field(doctype, df)
count += 1
@@ -165,23 +180,17 @@ def toggle_disabling(doc):
frappe.clear_cache(doctype=doctype)
def get_doctypes_with_dimensions():
doclist = ["GL Entry", "Sales Invoice", "Purchase Invoice", "Payment Entry", "Asset",
"Expense Claim", "Expense Claim Detail", "Expense Taxes and Charges", "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
return frappe.get_hooks("accounting_dimension_doctypes")
def get_accounting_dimensions(as_list=True):
accounting_dimensions = frappe.get_all("Accounting Dimension", fields=["label", "fieldname", "disabled", "document_type"])
if frappe.flags.accounting_dimensions is None:
frappe.flags.accounting_dimensions = frappe.get_all("Accounting Dimension",
fields=["label", "fieldname", "disabled", "document_type"])
if as_list:
return [d.fieldname for d in accounting_dimensions]
return [d.fieldname for d in frappe.flags.accounting_dimensions]
else:
return accounting_dimensions
return frappe.flags.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
@@ -203,7 +212,7 @@ def get_dimension_with_children(doctype, dimension):
return all_dimensions
@frappe.whitelist()
def get_dimension_filters():
def get_dimensions(with_cost_center_and_project=False):
dimension_filters = frappe.db.sql("""
SELECT label, fieldname, document_type
FROM `tabAccounting Dimension`
@@ -214,6 +223,18 @@ def get_dimension_filters():
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_map = {}
for dimension in default_dimensions:
default_dimensions_map.setdefault(dimension.company, {})

View File

@@ -11,37 +11,7 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import d
class TestAccountingDimension(unittest.TestCase):
def setUp(self):
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()
create_dimension()
def test_dimension_against_sales_invoice(self):
si = create_sales_invoice(do_not_save=1)
@@ -101,6 +71,38 @@ 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")

View File

@@ -0,0 +1,82 @@
// 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

@@ -0,0 +1,158 @@
{
"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

@@ -0,0 +1,61 @@
# -*- 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

@@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.doctype.accounting_dimension.test_accounting_dimension import create_dimension, disable_dimension
from erpnext.exceptions import InvalidAccountDimensionError, MandatoryAccountDimensionError
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

@@ -39,6 +39,7 @@ 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", \

View File

@@ -11,36 +11,36 @@ from erpnext.accounts.doctype.accounting_period.accounting_period import Overlap
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
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,3 +6,46 @@ 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.")
}
];

View File

@@ -12,6 +12,7 @@
"frozen_accounts_modifier",
"determine_address_tax_category_from",
"over_billing_allowance",
"role_allowed_to_over_bill",
"column_break_4",
"credit_controller",
"check_supplier_invoice_uniqueness",
@@ -21,6 +22,7 @@
"book_asset_depreciation_entry_automatically",
"add_taxes_from_item_tax_template",
"automatically_fetch_payment_terms",
"delete_linked_ledger_entries",
"deferred_accounting_settings_section",
"automatically_process_deferred_accounting_entry",
"book_deferred_entries_based_on",
@@ -219,6 +221,19 @@
"fieldtype": "Select",
"label": "Book Deferred Entries Based On",
"options": "Days\nMonths"
},
{
"default": "0",
"fieldname": "delete_linked_ledger_entries",
"fieldtype": "Check",
"label": "Delete Accounting and Stock Ledger Entries on deletion of Transaction"
},
{
"description": "Users with this role are allowed to over bill above the allowance percentage",
"fieldname": "role_allowed_to_over_bill",
"fieldtype": "Link",
"label": "Role Allowed to Over Bill ",
"options": "Role"
}
],
"icon": "icon-cog",
@@ -226,7 +241,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2020-10-13 11:32:52.268826",
"modified": "2021-03-11 18:52:05.601996",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -254,4 +269,4 @@
"sort_field": "modified",
"sort_order": "ASC",
"track_changes": 1
}
}

View File

@@ -30,5 +30,5 @@ class AccountsSettings(Document):
def enable_payment_schedule_in_print(self):
show_in_print = cint(self.show_payment_schedule_in_print)
for doctype in ("Sales Order", "Sales Invoice", "Purchase Order", "Purchase Invoice"):
make_property_setter(doctype, "due_date", "print_hide", show_in_print, "Check")
make_property_setter(doctype, "payment_schedule", "print_hide", 0 if show_in_print else 1, "Check")
make_property_setter(doctype, "due_date", "print_hide", show_in_print, "Check", validate_fields_for_doctype=False)
make_property_setter(doctype, "payment_schedule", "print_hide", 0 if show_in_print else 1, "Check", validate_fields_for_doctype=False)

View File

@@ -0,0 +1,43 @@
{
"actions": [],
"creation": "2020-11-08 18:22:36.001131",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"accounting_dimension",
"dimension_value"
],
"fields": [
{
"fieldname": "accounting_dimension",
"fieldtype": "Link",
"label": "Accounting Dimension",
"options": "DocType",
"read_only": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "dimension_value",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"options": "accounting_dimension",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-11-23 09:56:19.744200",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Allowed Dimension",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
# import frappe
from frappe.model.document import Document
class BankStatementTransactionInvoiceItem(Document):
class AllowedDimension(Document):
pass

View File

@@ -0,0 +1,46 @@
{
"actions": [],
"creation": "2020-11-08 18:20:00.944449",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"applicable_on_account",
"is_mandatory"
],
"fields": [
{
"fieldname": "applicable_on_account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Accounts",
"options": "Account",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"columns": 2,
"default": "0",
"fieldname": "is_mandatory",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Mandatory",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-11-22 19:55:13.324136",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Applicable On Account",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
# import frappe
from frappe.model.document import Document
class BankStatementTransactionPaymentItem(Document):
class ApplicableOnAccount(Document):
pass

View File

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

View File

@@ -86,6 +86,7 @@
},
{
"default": "0",
"description": "Setting the account as a Company Account is necessary for Bank Reconciliation",
"fieldname": "is_company_account",
"fieldtype": "Check",
"label": "Is Company Account"
@@ -207,7 +208,7 @@
}
],
"links": [],
"modified": "2020-07-17 13:59:50.795412",
"modified": "2020-10-23 16:48:06.303658",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Account",

View File

@@ -12,6 +12,7 @@ form_grid_templates = {
}
class BankClearance(Document):
@frappe.whitelist()
def get_payment_entries(self):
if not (self.from_date and self.to_date):
frappe.throw(_("From Date and To Date are Mandatory"))
@@ -108,6 +109,7 @@ class BankClearance(Document):
row.update(d)
self.total_amount += flt(amount)
@frappe.whitelist()
def update_clearance_date(self):
clearance_date_updated = False
for d in self.get('payment_entries'):

View File

@@ -0,0 +1,162 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts.bank_reconciliation");
frappe.ui.form.on("Bank Reconciliation Tool", {
setup: function (frm) {
frm.set_query("bank_account", function () {
return {
filters: {
company: ["in", frm.doc.company],
'is_company_account': 1
},
};
});
},
refresh: function (frm) {
frappe.require("assets/js/bank-reconciliation-tool.min.js", () =>
frm.trigger("make_reconciliation_tool")
);
frm.upload_statement_button = frm.page.set_secondary_action(
__("Upload Bank Statement"),
() =>
frappe.call({
method:
"erpnext.accounts.doctype.bank_statement_import.bank_statement_import.upload_bank_statement",
args: {
dt: frm.doc.doctype,
dn: frm.doc.name,
company: frm.doc.company,
bank_account: frm.doc.bank_account,
},
callback: function (r) {
if (!r.exc) {
var doc = frappe.model.sync(r.message);
frappe.set_route(
"Form",
doc[0].doctype,
doc[0].name
);
}
},
})
);
},
after_save: function (frm) {
frm.trigger("make_reconciliation_tool");
},
bank_account: function (frm) {
frappe.db.get_value(
"Bank Account",
frm.bank_account,
"account",
(r) => {
frappe.db.get_value(
"Account",
r.account,
"account_currency",
(r) => {
frm.currency = r.account_currency;
}
);
}
);
frm.trigger("get_account_opening_balance");
},
bank_statement_from_date: function (frm) {
frm.trigger("get_account_opening_balance");
},
make_reconciliation_tool(frm) {
frm.get_field("reconciliation_tool_cards").$wrapper.empty();
if (frm.doc.bank_account && frm.doc.bank_statement_to_date) {
frm.trigger("get_cleared_balance").then(() => {
if (
frm.doc.bank_account &&
frm.doc.bank_statement_from_date &&
frm.doc.bank_statement_to_date
) {
frm.trigger("render_chart");
frm.trigger("render");
frappe.utils.scroll_to(
frm.get_field("reconciliation_tool_cards").$wrapper,
true,
30
);
}
});
}
},
get_account_opening_balance(frm) {
if (frm.doc.bank_account && frm.doc.bank_statement_from_date) {
frappe.call({
method:
"erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frm.doc.bank_statement_from_date,
},
callback: (response) => {
frm.set_value("account_opening_balance", response.message);
},
});
}
},
get_cleared_balance(frm) {
if (frm.doc.bank_account && frm.doc.bank_statement_to_date) {
return frappe.call({
method:
"erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frm.doc.bank_statement_to_date,
},
callback: (response) => {
frm.cleared_balance = response.message;
},
});
}
},
render_chart(frm) {
frm.cards_manager = new erpnext.accounts.bank_reconciliation.NumberCardManager(
{
$reconciliation_tool_cards: frm.get_field(
"reconciliation_tool_cards"
).$wrapper,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
cleared_balance: frm.cleared_balance,
currency: frm.currency,
}
);
},
render(frm) {
if (frm.doc.bank_account) {
frm.bank_reconciliation_data_table_manager = new erpnext.accounts.bank_reconciliation.DataTableManager(
{
company: frm.doc.company,
bank_account: frm.doc.bank_account,
$reconciliation_tool_dt: frm.get_field(
"reconciliation_tool_dt"
).$wrapper,
$no_bank_transactions: frm.get_field(
"no_bank_transactions"
).$wrapper,
bank_statement_from_date: frm.doc.bank_statement_from_date,
bank_statement_to_date: frm.doc.bank_statement_to_date,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
cards_manager: frm.cards_manager,
}
);
}
},
});

View File

@@ -0,0 +1,112 @@
{
"actions": [],
"creation": "2020-12-02 10:13:02.148040",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"company",
"bank_account",
"column_break_1",
"bank_statement_from_date",
"bank_statement_to_date",
"column_break_2",
"account_opening_balance",
"bank_statement_closing_balance",
"section_break_1",
"reconciliation_tool_cards",
"reconciliation_tool_dt",
"no_bank_transactions"
],
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
"options": "Bank Account"
},
{
"fieldname": "column_break_1",
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.bank_account",
"fieldname": "bank_statement_from_date",
"fieldtype": "Date",
"label": "From Date"
},
{
"depends_on": "eval: doc.bank_statement_from_date",
"fieldname": "bank_statement_to_date",
"fieldtype": "Date",
"label": "To Date"
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.bank_statement_from_date",
"fieldname": "account_opening_balance",
"fieldtype": "Currency",
"label": "Account Opening Balance",
"options": "Currency",
"read_only": 1
},
{
"depends_on": "eval: doc.bank_statement_to_date",
"fieldname": "bank_statement_closing_balance",
"fieldtype": "Currency",
"label": "Closing Balance",
"options": "Currency"
},
{
"fieldname": "section_break_1",
"fieldtype": "Section Break",
"label": "Reconcile"
},
{
"fieldname": "reconciliation_tool_cards",
"fieldtype": "HTML"
},
{
"fieldname": "reconciliation_tool_dt",
"fieldtype": "HTML"
},
{
"fieldname": "no_bank_transactions",
"fieldtype": "HTML",
"options": "<div class=\"text-muted text-center\">No Matching Bank Transactions Found</div>"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2021-04-21 11:13:49.831769",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Tool",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,452 @@
# -*- 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 json
import frappe
from frappe.model.document import Document
from frappe import _
from frappe.utils import flt
from erpnext import get_company_currency
from erpnext.accounts.utils import get_balance_on
from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_statement import get_entries, get_amounts_not_reflected_in_system
from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_paid_amount
class BankReconciliationTool(Document):
pass
@frappe.whitelist()
def get_bank_transactions(bank_account, from_date = None, to_date = None):
# returns bank transactions for a bank account
filters = []
filters.append(['bank_account', '=', bank_account])
filters.append(['docstatus', '=', 1])
filters.append(['unallocated_amount', '>', 0])
if to_date:
filters.append(['date', '<=', to_date])
if from_date:
filters.append(['date', '>=', from_date])
transactions = frappe.get_all(
'Bank Transaction',
fields = ['date', 'deposit', 'withdrawal', 'currency',
'description', 'name', 'bank_account', 'company',
'unallocated_amount', 'reference_number', 'party_type', 'party'],
filters = filters
)
return transactions
@frappe.whitelist()
def get_account_balance(bank_account, till_date):
# returns account balance till the specified date
account = frappe.db.get_value('Bank Account', bank_account, 'account')
filters = frappe._dict({
"account": account,
"report_date": till_date,
"include_pos_transactions": 1
})
data = get_entries(filters)
balance_as_per_system = get_balance_on(filters["account"], filters["report_date"])
total_debit, total_credit = 0,0
for d in data:
total_debit += flt(d.debit)
total_credit += flt(d.credit)
amounts_not_reflected_in_system = get_amounts_not_reflected_in_system(filters)
bank_bal = flt(balance_as_per_system) - flt(total_debit) + flt(total_credit) \
+ amounts_not_reflected_in_system
return bank_bal
@frappe.whitelist()
def update_bank_transaction(bank_transaction_name, reference_number, party_type=None, party=None):
# updates bank transaction based on the new parameters provided by the user from Vouchers
bank_transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
bank_transaction.reference_number = reference_number
bank_transaction.party_type = party_type
bank_transaction.party = party
bank_transaction.save()
return frappe.db.get_all('Bank Transaction',
filters={
'name': bank_transaction_name
},
fields=['date', 'deposit', 'withdrawal', 'currency',
'description', 'name', 'bank_account', 'company',
'unallocated_amount', 'reference_number',
'party_type', 'party'],
)[0]
@frappe.whitelist()
def create_journal_entry_bts( bank_transaction_name, reference_number=None, reference_date=None, posting_date=None, entry_type=None,
second_account=None, mode_of_payment=None, party_type=None, party=None, allow_edit=None):
# Create a new journal entry based on the bank transaction
bank_transaction = frappe.db.get_values(
"Bank Transaction", bank_transaction_name,
fieldname=["name", "deposit", "withdrawal", "bank_account"] ,
as_dict=True
)[0]
company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account")
account_type = frappe.db.get_value("Account", second_account, "account_type")
if account_type in ["Receivable", "Payable"]:
if not (party_type and party):
frappe.throw(_("Party Type and Party is required for Receivable / Payable account {0}").format( second_account))
accounts = []
# Multi Currency?
accounts.append({
"account": second_account,
"credit_in_account_currency": bank_transaction.deposit
if bank_transaction.deposit > 0
else 0,
"debit_in_account_currency":bank_transaction.withdrawal
if bank_transaction.withdrawal > 0
else 0,
"party_type":party_type,
"party":party,
})
accounts.append({
"account": company_account,
"bank_account": bank_transaction.bank_account,
"credit_in_account_currency": bank_transaction.withdrawal
if bank_transaction.withdrawal > 0
else 0,
"debit_in_account_currency":bank_transaction.deposit
if bank_transaction.deposit > 0
else 0,
})
company = frappe.get_value("Account", company_account, "company")
journal_entry_dict = {
"voucher_type" : entry_type,
"company" : company,
"posting_date" : posting_date,
"cheque_date" : reference_date,
"cheque_no" : reference_number,
"mode_of_payment" : mode_of_payment
}
journal_entry = frappe.new_doc('Journal Entry')
journal_entry.update(journal_entry_dict)
journal_entry.set("accounts", accounts)
if allow_edit:
return journal_entry
journal_entry.insert()
journal_entry.submit()
if bank_transaction.deposit > 0:
paid_amount = bank_transaction.deposit
else:
paid_amount = bank_transaction.withdrawal
vouchers = json.dumps([{
"payment_doctype":"Journal Entry",
"payment_name":journal_entry.name,
"amount":paid_amount}])
return reconcile_vouchers(bank_transaction.name, vouchers)
@frappe.whitelist()
def create_payment_entry_bts( bank_transaction_name, reference_number=None, reference_date=None, party_type=None, party=None, posting_date=None,
mode_of_payment=None, project=None, cost_center=None, allow_edit=None):
# Create a new payment entry based on the bank transaction
bank_transaction = frappe.db.get_values(
"Bank Transaction", bank_transaction_name,
fieldname=["name", "unallocated_amount", "deposit", "bank_account"] ,
as_dict=True
)[0]
paid_amount = bank_transaction.unallocated_amount
payment_type = "Receive" if bank_transaction.deposit > 0 else "Pay"
company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account")
company = frappe.get_value("Account", company_account, "company")
payment_entry_dict = {
"company" : company,
"payment_type" : payment_type,
"reference_no" : reference_number,
"reference_date" : reference_date,
"party_type" : party_type,
"party" : party,
"posting_date" : posting_date,
"paid_amount": paid_amount,
"received_amount": paid_amount
}
payment_entry = frappe.new_doc("Payment Entry")
payment_entry.update(payment_entry_dict)
if mode_of_payment:
payment_entry.mode_of_payment = mode_of_payment
if project:
payment_entry.project = project
if cost_center:
payment_entry.cost_center = cost_center
if payment_type == "Receive":
payment_entry.paid_to = company_account
else:
payment_entry.paid_from = company_account
payment_entry.validate()
if allow_edit:
return payment_entry
payment_entry.insert()
payment_entry.submit()
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment_entry.name,
"amount":paid_amount}])
return reconcile_vouchers(bank_transaction.name, vouchers)
@frappe.whitelist()
def reconcile_vouchers(bank_transaction_name, vouchers):
# updated clear date of all the vouchers based on the bank transaction
vouchers = json.loads(vouchers)
transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
if transaction.unallocated_amount == 0:
frappe.throw(_("This bank transaction is already fully reconciled"))
total_amount = 0
for voucher in vouchers:
voucher['payment_entry'] = frappe.get_doc(voucher['payment_doctype'], voucher['payment_name'])
total_amount += get_paid_amount(frappe._dict({
'payment_document': voucher['payment_doctype'],
'payment_entry': voucher['payment_name'],
}), transaction.currency)
if total_amount > transaction.unallocated_amount:
frappe.throw(_("The Sum Total of Amounts of All Selected Vouchers Should be Less than the Unallocated Amount of the Bank Transaction"))
account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
for voucher in vouchers:
gl_entry = frappe.db.get_value("GL Entry", dict(account=account, voucher_type=voucher['payment_doctype'], voucher_no=voucher['payment_name']), ['credit', 'debit'], as_dict=1)
gl_amount, transaction_amount = (gl_entry.credit, transaction.deposit) if gl_entry.credit > 0 else (gl_entry.debit, transaction.withdrawal)
allocated_amount = gl_amount if gl_amount >= transaction_amount else transaction_amount
transaction.append("payment_entries", {
"payment_document": voucher['payment_entry'].doctype,
"payment_entry": voucher['payment_entry'].name,
"allocated_amount": allocated_amount
})
transaction.save()
transaction.update_allocations()
return frappe.get_doc("Bank Transaction", bank_transaction_name)
@frappe.whitelist()
def get_linked_payments(bank_transaction_name, document_types = None):
# get all matching payments for a bank transaction
transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
bank_account = frappe.db.get_values(
"Bank Account",
transaction.bank_account,
["account", "company"],
as_dict=True)[0]
(account, company) = (bank_account.account, bank_account.company)
matching = check_matching(account, company, transaction, document_types)
return matching
def check_matching(bank_account, company, transaction, document_types):
# combine all types of vocuhers
subquery = get_queries(bank_account, company, transaction, document_types)
filters = {
"amount": transaction.unallocated_amount,
"payment_type" : "Receive" if transaction.deposit > 0 else "Pay",
"reference_no": transaction.reference_number,
"party_type": transaction.party_type,
"party": transaction.party,
"bank_account": bank_account
}
matching_vouchers = []
for query in subquery:
matching_vouchers.extend(
frappe.db.sql(query, filters,)
)
return sorted(matching_vouchers, key = lambda x: x[0], reverse=True) if matching_vouchers else []
def get_queries(bank_account, company, transaction, document_types):
# get queries to get matching vouchers
amount_condition = "=" if "exact_match" in document_types else "<="
account_from_to = "paid_to" if transaction.deposit > 0 else "paid_from"
queries = []
if "payment_entry" in document_types:
pe_amount_matching = get_pe_matching_query(amount_condition, account_from_to, transaction)
queries.extend([pe_amount_matching])
if "journal_entry" in document_types:
je_amount_matching = get_je_matching_query(amount_condition, transaction)
queries.extend([je_amount_matching])
if transaction.deposit > 0 and "sales_invoice" in document_types:
si_amount_matching = get_si_matching_query(amount_condition)
queries.extend([si_amount_matching])
if transaction.withdrawal > 0:
if "purchase_invoice" in document_types:
pi_amount_matching = get_pi_matching_query(amount_condition)
queries.extend([pi_amount_matching])
if "expense_claim" in document_types:
ec_amount_matching = get_ec_matching_query(bank_account, company, amount_condition)
queries.extend([ec_amount_matching])
return queries
def get_pe_matching_query(amount_condition, account_from_to, transaction):
# get matching payment entries query
if transaction.deposit > 0:
currency_field = "paid_to_account_currency as currency"
else:
currency_field = "paid_from_account_currency as currency"
return f"""
SELECT
(CASE WHEN reference_no=%(reference_no)s THEN 1 ELSE 0 END
+ CASE WHEN (party_type = %(party_type)s AND party = %(party)s ) THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Payment Entry' as doctype,
name,
paid_amount,
reference_no,
reference_date,
party,
party_type,
posting_date,
{currency_field}
FROM
`tabPayment Entry`
WHERE
paid_amount {amount_condition} %(amount)s
AND docstatus = 1
AND payment_type IN (%(payment_type)s, 'Internal Transfer')
AND ifnull(clearance_date, '') = ""
AND {account_from_to} = %(bank_account)s
"""
def get_je_matching_query(amount_condition, transaction):
# get matching journal entry query
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
return f"""
SELECT
(CASE WHEN je.cheque_no=%(reference_no)s THEN 1 ELSE 0 END
+ 1) AS rank ,
'Journal Entry' as doctype,
je.name,
jea.{cr_or_dr}_in_account_currency as paid_amount,
je.cheque_no as reference_no,
je.cheque_date as reference_date,
je.pay_to_recd_from as party,
jea.party_type,
je.posting_date,
jea.account_currency as currency
FROM
`tabJournal Entry Account` as jea
JOIN
`tabJournal Entry` as je
ON
jea.parent = je.name
WHERE
(je.clearance_date is null or je.clearance_date='0000-00-00')
AND jea.account = %(bank_account)s
AND jea.{cr_or_dr}_in_account_currency {amount_condition} %(amount)s
AND je.docstatus = 1
"""
def get_si_matching_query(amount_condition):
# get matchin sales invoice query
return f"""
SELECT
( CASE WHEN si.customer = %(party)s THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Sales Invoice' as doctype,
si.name,
sip.amount as paid_amount,
'' as reference_no,
'' as reference_date,
si.customer as party,
'Customer' as party_type,
si.posting_date,
si.currency
FROM
`tabSales Invoice Payment` as sip
JOIN
`tabSales Invoice` as si
ON
sip.parent = si.name
WHERE (sip.clearance_date is null or sip.clearance_date='0000-00-00')
AND sip.account = %(bank_account)s
AND sip.amount {amount_condition} %(amount)s
AND si.docstatus = 1
"""
def get_pi_matching_query(amount_condition):
# get matching purchase invoice query
return f"""
SELECT
( CASE WHEN supplier = %(party)s THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Purchase Invoice' as doctype,
name,
paid_amount,
'' as reference_no,
'' as reference_date,
supplier as party,
'Supplier' as party_type,
posting_date,
currency
FROM
`tabPurchase Invoice`
WHERE
paid_amount {amount_condition} %(amount)s
AND docstatus = 1
AND is_paid = 1
AND ifnull(clearance_date, '') = ""
AND cash_bank_account = %(bank_account)s
"""
def get_ec_matching_query(bank_account, company, amount_condition):
# get matching Expense Claim query
mode_of_payments = [x["parent"] for x in frappe.db.get_list("Mode of Payment Account",
filters={"default_account": bank_account}, fields=["parent"])]
mode_of_payments = '(\'' + '\', \''.join(mode_of_payments) + '\' )'
company_currency = get_company_currency(company)
return f"""
SELECT
( CASE WHEN employee = %(party)s THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Expense Claim' as doctype,
name,
total_sanctioned_amount as paid_amount,
'' as reference_no,
'' as reference_date,
employee as party,
'Employee' as party_type,
posting_date,
'{company_currency}' as currency
FROM
`tabExpense Claim`
WHERE
total_sanctioned_amount {amount_condition} %(amount)s
AND docstatus = 1
AND is_paid = 1
AND ifnull(clearance_date, '') = ""
AND mode_of_payment in {mode_of_payments}
"""

View File

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

View File

@@ -0,0 +1,3 @@
.warnings .warning {
margin-bottom: 40px;
}

View File

@@ -0,0 +1,535 @@
// Copyright (c) 2019, Frappe Technologies and contributors
// For license information, please see license.txt
frappe.ui.form.on("Bank Statement Import", {
setup(frm) {
frappe.realtime.on("data_import_refresh", ({ data_import }) => {
frm.import_in_progress = false;
if (data_import !== frm.doc.name) return;
frappe.model.clear_doc("Bank Statement Import", frm.doc.name);
frappe.model
.with_doc("Bank Statement Import", frm.doc.name)
.then(() => {
frm.refresh();
});
});
frappe.realtime.on("data_import_progress", (data) => {
frm.import_in_progress = true;
if (data.data_import !== frm.doc.name) {
return;
}
let percent = Math.floor((data.current * 100) / data.total);
let seconds = Math.floor(data.eta);
let minutes = Math.floor(data.eta / 60);
let eta_message =
// prettier-ignore
seconds < 60
? __('About {0} seconds remaining', [seconds])
: minutes === 1
? __('About {0} minute remaining', [minutes])
: __('About {0} minutes remaining', [minutes]);
let message;
if (data.success) {
let message_args = [data.current, data.total, eta_message];
message =
frm.doc.import_type === "Insert New Records"
? __("Importing {0} of {1}, {2}", message_args)
: __("Updating {0} of {1}, {2}", message_args);
}
if (data.skipping) {
message = __(
"Skipping {0} of {1}, {2}",
[
data.current,
data.total,
eta_message,
]
);
}
frm.dashboard.show_progress(
__("Import Progress"),
percent,
message
);
frm.page.set_indicator(__("In Progress"), "orange");
// hide progress when complete
if (data.current === data.total) {
setTimeout(() => {
frm.dashboard.hide();
frm.refresh();
}, 2000);
}
});
frm.set_query("reference_doctype", () => {
return {
filters: {
name: ["in", frappe.boot.user.can_import],
},
};
});
frm.get_field("import_file").df.options = {
restrictions: {
allowed_file_types: [".csv", ".xls", ".xlsx"],
},
};
frm.has_import_file = () => {
return frm.doc.import_file || frm.doc.google_sheets_url;
};
},
refresh(frm) {
frm.page.hide_icon_group();
frm.trigger("update_indicators");
frm.trigger("import_file");
frm.trigger("show_import_log");
frm.trigger("show_import_warnings");
frm.trigger("toggle_submit_after_import");
frm.trigger("show_import_status");
frm.trigger("show_report_error_button");
if (frm.doc.status === "Partial Success") {
frm.add_custom_button(__("Export Errored Rows"), () =>
frm.trigger("export_errored_rows")
);
}
if (frm.doc.status.includes("Success")) {
frm.add_custom_button(
__("Go to {0} List", [frm.doc.reference_doctype]),
() => frappe.set_route("List", frm.doc.reference_doctype)
);
}
},
onload_post_render(frm) {
frm.trigger("update_primary_action");
},
update_primary_action(frm) {
if (frm.is_dirty()) {
frm.enable_save();
return;
}
frm.disable_save();
if (frm.doc.status !== "Success") {
if (!frm.is_new() && frm.has_import_file()) {
let label =
frm.doc.status === "Pending"
? __("Start Import")
: __("Retry");
frm.page.set_primary_action(label, () =>
frm.events.start_import(frm)
);
} else {
frm.page.set_primary_action(__("Save"), () => frm.save());
}
}
},
update_indicators(frm) {
const indicator = frappe.get_indicator(frm.doc);
if (indicator) {
frm.page.set_indicator(indicator[0], indicator[1]);
} else {
frm.page.clear_indicator();
}
},
show_import_status(frm) {
let import_log = JSON.parse(frm.doc.import_log || "[]");
let successful_records = import_log.filter((log) => log.success);
let failed_records = import_log.filter((log) => !log.success);
if (successful_records.length === 0) return;
let message;
if (failed_records.length === 0) {
let message_args = [successful_records.length];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records.length > 1
? __("Successfully imported {0} records.", message_args)
: __("Successfully imported {0} record.", message_args);
} else {
message =
successful_records.length > 1
? __("Successfully updated {0} records.", message_args)
: __("Successfully updated {0} record.", message_args);
}
} else {
let message_args = [successful_records.length, import_log.length];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records.length > 1
? __(
"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
: __(
"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
} else {
message =
successful_records.length > 1
? __(
"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
: __(
"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
}
}
frm.dashboard.set_headline(message);
},
show_report_error_button(frm) {
if (frm.doc.status === "Error") {
frappe.db
.get_list("Error Log", {
filters: { method: frm.doc.name },
fields: ["method", "error"],
order_by: "creation desc",
limit: 1,
})
.then((result) => {
if (result.length > 0) {
frm.add_custom_button("Report Error", () => {
let fake_xhr = {
responseText: JSON.stringify({
exc: result[0].error,
}),
};
frappe.request.report_error(fake_xhr, {});
});
}
});
}
},
start_import(frm) {
frm.call({
method: "form_start_import",
args: { data_import: frm.doc.name },
btn: frm.page.btn_primary,
}).then((r) => {
if (r.message === true) {
frm.disable_save();
}
});
},
download_template() {
let method =
"/api/method/frappe.core.doctype.data_import.data_import.download_template";
open_url_post(method, {
doctype: "Bank Transaction",
export_records: "5_records",
export_fields: {
"Bank Transaction": [
"date",
"deposit",
"withdrawal",
"description",
"reference_number",
],
},
});
},
reference_doctype(frm) {
frm.trigger("toggle_submit_after_import");
},
toggle_submit_after_import(frm) {
frm.toggle_display("submit_after_import", false);
let doctype = frm.doc.reference_doctype;
if (doctype) {
frappe.model.with_doctype(doctype, () => {
let meta = frappe.get_meta(doctype);
frm.toggle_display("submit_after_import", meta.is_submittable);
});
}
},
google_sheets_url(frm) {
if (!frm.is_dirty()) {
frm.trigger("import_file");
} else {
frm.trigger("update_primary_action");
}
},
refresh_google_sheet(frm) {
frm.trigger("import_file");
},
import_file(frm) {
frm.toggle_display("section_import_preview", frm.has_import_file());
if (!frm.has_import_file()) {
frm.get_field("import_preview").$wrapper.empty();
return;
} else {
frm.trigger("update_primary_action");
}
// load import preview
frm.get_field("import_preview").$wrapper.empty();
$('<span class="text-muted">')
.html(__("Loading import file..."))
.appendTo(frm.get_field("import_preview").$wrapper);
frm.call({
method: "get_preview_from_template",
args: {
data_import: frm.doc.name,
import_file: frm.doc.import_file,
google_sheets_url: frm.doc.google_sheets_url,
},
error_handlers: {
TimestampMismatchError() {
// ignore this error
},
},
}).then((r) => {
let preview_data = r.message;
frm.events.show_import_preview(frm, preview_data);
frm.events.show_import_warnings(frm, preview_data);
});
},
// method: 'frappe.core.doctype.data_import.data_import.get_preview_from_template',
show_import_preview(frm, preview_data) {
let import_log = JSON.parse(frm.doc.import_log || "[]");
if (
frm.import_preview &&
frm.import_preview.doctype === frm.doc.reference_doctype
) {
frm.import_preview.preview_data = preview_data;
frm.import_preview.import_log = import_log;
frm.import_preview.refresh();
return;
}
frappe.require("/assets/js/data_import_tools.min.js", () => {
frm.import_preview = new frappe.data_import.ImportPreview({
wrapper: frm.get_field("import_preview").$wrapper,
doctype: frm.doc.reference_doctype,
preview_data,
import_log,
frm,
events: {
remap_column(changed_map) {
let template_options = JSON.parse(
frm.doc.template_options || "{}"
);
template_options.column_to_field_map =
template_options.column_to_field_map || {};
Object.assign(
template_options.column_to_field_map,
changed_map
);
frm.set_value(
"template_options",
JSON.stringify(template_options)
);
frm.save().then(() => frm.trigger("import_file"));
},
},
});
});
},
export_errored_rows(frm) {
open_url_post(
"/api/method/frappe.core.doctype.data_import.data_import.download_errored_template",
{
data_import_name: frm.doc.name,
}
);
},
show_import_warnings(frm, preview_data) {
let columns = preview_data.columns;
let warnings = JSON.parse(frm.doc.template_warnings || "[]");
warnings = warnings.concat(preview_data.warnings || []);
frm.toggle_display("import_warnings_section", warnings.length > 0);
if (warnings.length === 0) {
frm.get_field("import_warnings").$wrapper.html("");
return;
}
// group warnings by row
let warnings_by_row = {};
let other_warnings = [];
for (let warning of warnings) {
if (warning.row) {
warnings_by_row[warning.row] =
warnings_by_row[warning.row] || [];
warnings_by_row[warning.row].push(warning);
} else {
other_warnings.push(warning);
}
}
let html = "";
html += Object.keys(warnings_by_row)
.map((row_number) => {
let message = warnings_by_row[row_number]
.map((w) => {
if (w.field) {
let label =
w.field.label +
(w.field.parent !== frm.doc.reference_doctype
? ` (${w.field.parent})`
: "");
return `<li>${label}: ${w.message}</li>`;
}
return `<li>${w.message}</li>`;
})
.join("");
return `
<div class="warning" data-row="${row_number}">
<h5 class="text-uppercase">${__("Row {0}", [row_number])}</h5>
<div class="body"><ul>${message}</ul></div>
</div>
`;
})
.join("");
html += other_warnings
.map((warning) => {
let header = "";
if (warning.col) {
let column_number = `<span class="text-uppercase">${__(
"Column {0}",
[warning.col]
)}</span>`;
let column_header = columns[warning.col].header_title;
header = `${column_number} (${column_header})`;
}
return `
<div class="warning" data-col="${warning.col}">
<h5>${header}</h5>
<div class="body">${warning.message}</div>
</div>
`;
})
.join("");
frm.get_field("import_warnings").$wrapper.html(`
<div class="row">
<div class="col-sm-10 warnings">${html}</div>
</div>
`);
},
show_failed_logs(frm) {
frm.trigger("show_import_log");
},
show_import_log(frm) {
let import_log = JSON.parse(frm.doc.import_log || "[]");
let logs = import_log;
frm.toggle_display("import_log", false);
frm.toggle_display("import_log_section", logs.length > 0);
if (logs.length === 0) {
frm.get_field("import_log_preview").$wrapper.empty();
return;
}
let rows = logs
.map((log) => {
let html = "";
if (log.success) {
if (frm.doc.import_type === "Insert New Records") {
html = __(
"Successfully imported {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]
);
} else {
html = __(
"Successfully updated {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]
);
}
} else {
let messages = log.messages
.map(JSON.parse)
.map((m) => {
let title = m.title
? `<strong>${m.title}</strong>`
: "";
let message = m.message
? `<div>${m.message}</div>`
: "";
return title + message;
})
.join("");
let id = frappe.dom.get_unique_id();
html = `${messages}
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#${id}" aria-expanded="false" aria-controls="${id}" style="margin-top: 15px;">
${__("Show Traceback")}
</button>
<div class="collapse" id="${id}" style="margin-top: 15px;">
<div class="well">
<pre>${log.exception}</pre>
</div>
</div>`;
}
let indicator_color = log.success ? "green" : "red";
let title = log.success ? __("Success") : __("Failure");
if (frm.doc.show_failed_logs && log.success) {
return "";
}
return `<tr>
<td>${log.row_indexes.join(", ")}</td>
<td>
<div class="indicator ${indicator_color}">${title}</div>
</td>
<td>
${html}
</td>
</tr>`;
})
.join("");
if (!rows && frm.doc.show_failed_logs) {
rows = `<tr><td class="text-center text-muted" colspan=3>
${__("No failed logs")}
</td></tr>`;
}
frm.get_field("import_log_preview").$wrapper.html(`
<table class="table table-bordered">
<tr class="text-muted">
<th width="10%">${__("Row Number")}</th>
<th width="10%">${__("Status")}</th>
<th width="80%">${__("Message")}</th>
</tr>
${rows}
</table>
`);
},
});

View File

@@ -0,0 +1,227 @@
{
"actions": [],
"autoname": "format:Bank Statement Import on {creation}",
"beta": 1,
"creation": "2019-08-04 14:16:08.318714",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"company",
"bank_account",
"bank",
"column_break_4",
"google_sheets_url",
"refresh_google_sheet",
"html_5",
"import_file",
"download_template",
"status",
"template_options",
"import_warnings_section",
"template_warnings",
"import_warnings",
"section_import_preview",
"import_preview",
"import_log_section",
"import_log",
"show_failed_logs",
"import_log_preview",
"reference_doctype",
"import_type",
"submit_after_import",
"mute_emails"
],
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"reqd": 1,
"set_only_once": 1
},
{
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
"options": "Bank Account",
"reqd": 1,
"set_only_once": 1
},
{
"depends_on": "eval:doc.bank_account",
"fetch_from": "bank_account.bank",
"fieldname": "bank",
"fieldtype": "Link",
"label": "Bank",
"options": "Bank",
"read_only": 1,
"set_only_once": 1
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "download_template",
"fieldtype": "Button",
"label": "Download Template"
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "import_file",
"fieldtype": "Attach",
"in_list_view": 1,
"label": "Import File"
},
{
"fieldname": "import_preview",
"fieldtype": "HTML",
"label": "Import Preview"
},
{
"fieldname": "section_import_preview",
"fieldtype": "Section Break",
"label": "Preview"
},
{
"fieldname": "template_options",
"fieldtype": "Code",
"hidden": 1,
"label": "Template Options",
"options": "JSON",
"read_only": 1
},
{
"fieldname": "import_log",
"fieldtype": "Code",
"label": "Import Log",
"options": "JSON"
},
{
"fieldname": "import_log_section",
"fieldtype": "Section Break",
"label": "Import Log"
},
{
"fieldname": "import_log_preview",
"fieldtype": "HTML",
"label": "Import Log Preview"
},
{
"default": "Pending",
"fieldname": "status",
"fieldtype": "Select",
"hidden": 1,
"label": "Status",
"options": "Pending\nSuccess\nPartial Success\nError",
"read_only": 1
},
{
"fieldname": "template_warnings",
"fieldtype": "Code",
"hidden": 1,
"label": "Template Warnings",
"options": "JSON"
},
{
"fieldname": "import_warnings_section",
"fieldtype": "Section Break",
"label": "Import File Errors and Warnings"
},
{
"fieldname": "import_warnings",
"fieldtype": "HTML",
"label": "Import Warnings"
},
{
"default": "0",
"fieldname": "show_failed_logs",
"fieldtype": "Check",
"label": "Show Failed Logs"
},
{
"depends_on": "eval:!doc.__islocal && !doc.import_file",
"fieldname": "html_5",
"fieldtype": "HTML",
"options": "<h5 class=\"text-muted uppercase\">Or</h5>"
},
{
"depends_on": "eval:!doc.__islocal && !doc.import_file\n",
"description": "Must be a publicly accessible Google Sheets URL",
"fieldname": "google_sheets_url",
"fieldtype": "Data",
"label": "Import from Google Sheets"
},
{
"depends_on": "eval:doc.google_sheets_url && !doc.__unsaved",
"fieldname": "refresh_google_sheet",
"fieldtype": "Button",
"label": "Refresh Google Sheet"
},
{
"default": "Bank Transaction",
"fieldname": "reference_doctype",
"fieldtype": "Link",
"hidden": 1,
"in_list_view": 1,
"label": "Document Type",
"options": "DocType",
"reqd": 1,
"set_only_once": 1
},
{
"default": "Insert New Records",
"fieldname": "import_type",
"fieldtype": "Select",
"hidden": 1,
"in_list_view": 1,
"label": "Import Type",
"options": "\nInsert New Records\nUpdate Existing Records",
"reqd": 1,
"set_only_once": 1
},
{
"default": "1",
"fieldname": "submit_after_import",
"fieldtype": "Check",
"hidden": 1,
"label": "Submit After Import",
"set_only_once": 1
},
{
"default": "1",
"fieldname": "mute_emails",
"fieldtype": "Check",
"hidden": 1,
"label": "Don't Send Emails",
"set_only_once": 1
},
{
"fieldname": "column_break_4",
"fieldtype": "Column Break"
}
],
"hide_toolbar": 1,
"links": [],
"modified": "2021-02-10 19:29:59.027325",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Import",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,205 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import csv
import json
import re
import openpyxl
from openpyxl.styles import Font
from openpyxl.utils import get_column_letter
from six import string_types
import frappe
from frappe.core.doctype.data_import.importer import Importer, ImportFile
from frappe.utils.background_jobs import enqueue
from frappe.utils.xlsxutils import handle_html, ILLEGAL_CHARACTERS_RE
from frappe import _
from frappe.core.doctype.data_import.data_import import DataImport
class BankStatementImport(DataImport):
def __init__(self, *args, **kwargs):
super(BankStatementImport, self).__init__(*args, **kwargs)
def validate(self):
doc_before_save = self.get_doc_before_save()
if (
not (self.import_file or self.google_sheets_url)
or (doc_before_save and doc_before_save.import_file != self.import_file)
or (doc_before_save and doc_before_save.google_sheets_url != self.google_sheets_url)
):
template_options_dict = {}
column_to_field_map = {}
bank = frappe.get_doc("Bank", self.bank)
for i in bank.bank_transaction_mapping:
column_to_field_map[i.file_field] = i.bank_transaction_field
template_options_dict["column_to_field_map"] = column_to_field_map
self.template_options = json.dumps(template_options_dict)
self.template_warnings = ""
self.validate_import_file()
self.validate_google_sheets_url()
def start_import(self):
from frappe.core.page.background_jobs.background_jobs import get_info
from frappe.utils.scheduler import is_scheduler_inactive
if is_scheduler_inactive() and not frappe.flags.in_test:
frappe.throw(
_("Scheduler is inactive. Cannot import data."), title=_("Scheduler Inactive")
)
enqueued_jobs = [d.get("job_name") for d in get_info()]
if self.name not in enqueued_jobs:
enqueue(
start_import,
queue="default",
timeout=6000,
event="data_import",
job_name=self.name,
data_import=self.name,
bank_account=self.bank_account,
import_file_path=self.import_file,
bank=self.bank,
template_options=self.template_options,
now=frappe.conf.developer_mode or frappe.flags.in_test,
)
return True
return False
@frappe.whitelist()
def get_preview_from_template(data_import, import_file=None, google_sheets_url=None):
return frappe.get_doc("Bank Statement Import", data_import).get_preview_from_template(
import_file, google_sheets_url
)
@frappe.whitelist()
def form_start_import(data_import):
return frappe.get_doc("Bank Statement Import", data_import).start_import()
@frappe.whitelist()
def download_errored_template(data_import_name):
data_import = frappe.get_doc("Bank Statement Import", data_import_name)
data_import.export_errored_rows()
def start_import(data_import, bank_account, import_file_path, bank, template_options):
"""This method runs in background job"""
update_mapping_db(bank, template_options)
data_import = frappe.get_doc("Bank Statement Import", data_import)
import_file = ImportFile("Bank Transaction", file = import_file_path, import_type="Insert New Records")
data = import_file.raw_data
add_bank_account(data, bank_account)
write_files(import_file, data)
try:
i = Importer(data_import.reference_doctype, data_import=data_import)
i.import_data()
except Exception:
frappe.db.rollback()
data_import.db_set("status", "Error")
frappe.log_error(title=data_import.name)
finally:
frappe.flags.in_import = False
frappe.publish_realtime("data_import_refresh", {"data_import": data_import.name})
def update_mapping_db(bank, template_options):
bank = frappe.get_doc("Bank", bank)
for d in bank.bank_transaction_mapping:
d.delete()
for d in json.loads(template_options)["column_to_field_map"].items():
bank.append("bank_transaction_mapping", {"bank_transaction_field": d[1] ,"file_field": d[0]} )
bank.save()
def add_bank_account(data, bank_account):
bank_account_loc = None
if "Bank Account" not in data[0]:
data[0].append("Bank Account")
else:
for loc, header in enumerate(data[0]):
if header == "Bank Account":
bank_account_loc = loc
for row in data[1:]:
if bank_account_loc:
row[bank_account_loc] = bank_account
else:
row.append(bank_account)
def write_files(import_file, data):
full_file_path = import_file.file_doc.get_full_path()
parts = import_file.file_doc.get_extension()
extension = parts[1]
extension = extension.lstrip(".")
if extension == "csv":
with open(full_file_path, 'w', newline='') as file:
writer = csv.writer(file)
writer.writerows(data)
elif extension == "xlsx" or "xls":
write_xlsx(data, "trans", file_path = full_file_path)
def write_xlsx(data, sheet_name, wb=None, column_widths=None, file_path=None):
# from xlsx utils with changes
column_widths = column_widths or []
if wb is None:
wb = openpyxl.Workbook(write_only=True)
ws = wb.create_sheet(sheet_name, 0)
for i, column_width in enumerate(column_widths):
if column_width:
ws.column_dimensions[get_column_letter(i + 1)].width = column_width
row1 = ws.row_dimensions[1]
row1.font = Font(name='Calibri', bold=True)
for row in data:
clean_row = []
for item in row:
if isinstance(item, string_types) and (sheet_name not in ['Data Import Template', 'Data Export']):
value = handle_html(item)
else:
value = item
if isinstance(item, string_types) and next(ILLEGAL_CHARACTERS_RE.finditer(value), None):
# Remove illegal characters from the string
value = re.sub(ILLEGAL_CHARACTERS_RE, '', value)
clean_row.append(value)
ws.append(clean_row)
wb.save(file_path)
return True
@frappe.whitelist()
def upload_bank_statement(**args):
args = frappe._dict(args)
bsi = frappe.new_doc("Bank Statement Import")
if args.company:
bsi.update({
"company": args.company,
})
if args.bank_account:
bsi.update({
"bank_account": args.bank_account
})
return bsi

View File

@@ -0,0 +1,36 @@
let imports_in_progress = [];
frappe.listview_settings['Bank Statement Import'] = {
onload(listview) {
frappe.realtime.on('data_import_progress', data => {
if (!imports_in_progress.includes(data.data_import)) {
imports_in_progress.push(data.data_import);
}
});
frappe.realtime.on('data_import_refresh', data => {
imports_in_progress = imports_in_progress.filter(
d => d !== data.data_import
);
listview.refresh();
});
},
get_indicator: function(doc) {
var colors = {
'Pending': 'orange',
'Not Started': 'orange',
'Partial Success': 'orange',
'Success': 'green',
'In Progress': 'orange',
'Error': 'red'
};
let status = doc.status;
if (imports_in_progress.includes(doc.name)) {
status = 'In Progress';
}
if (status == 'Pending') {
status = 'Not Started';
}
return [__(status), colors[status], 'status,=,' + doc.status];
},
hide_name_column: true
};

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestBankStatementImport(unittest.TestCase):
pass

View File

@@ -1,8 +0,0 @@
// Copyright (c) 2017, sathishpy@gmail.com and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Statement Settings', {
refresh: function(frm) {
}
});

View File

@@ -1,272 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"beta": 0,
"creation": "2017-11-13 13:38:10.863592",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Bank",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "'%d/%m/%Y'",
"fieldname": "date_format",
"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": "Date Format",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "statement_header_mapping",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Statement Header Mapping",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "header_items",
"fieldtype": "Table",
"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": "Statement Headers",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Settings Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "transaction_data_mapping",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Data Mapping",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_items",
"fieldtype": "Table",
"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": "Mapped Items",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Settings Item",
"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": 0
}
],
"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-04-07 18:57:04.048423",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BankStatementSettings(Document):
def autoname(self):
self.name = self.bank + "-Statement-Settings"

View File

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

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBankStatementSettings(unittest.TestCase):
pass

View File

@@ -1,101 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-01-08 00:16:42.762980",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_header",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mapped Header",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stmt_header",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Bank Header",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-01-08 00:19:14.841134",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Settings Item",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,100 +0,0 @@
// Copyright (c) 2017, sathishpy@gmail.com and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Statement Transaction Entry', {
setup: function(frm) {
frm.events.account_filters(frm)
frm.events.invoice_filter(frm)
},
refresh: function(frm) {
frm.set_df_property("bank_account", "read_only", frm.doc.__islocal ? 0 : 1);
frm.set_df_property("from_date", "read_only", frm.doc.__islocal ? 0 : 1);
frm.set_df_property("to_date", "read_only", frm.doc.__islocal ? 0 : 1);
},
invoke_doc_function(frm, method) {
frappe.call({
doc: frm.doc,
method: method,
callback: function(r) {
if(!r.exe) {
frm.refresh_fields();
}
}
});
},
account_filters: function(frm) {
frm.fields_dict['bank_account'].get_query = function(doc, dt, dn) {
return {
filters:[
["Account", "account_type", "in", ["Bank"]]
]
}
};
frm.fields_dict['receivable_account'].get_query = function(doc, dt, dn) {
return {
filters: {"account_type": "Receivable"}
}
};
frm.fields_dict['payable_account'].get_query = function(doc, dt, dn) {
return {
filters: {"account_type": "Payable"}
}
};
},
invoice_filter: function(frm) {
frm.set_query("invoice", "payment_invoice_items", function(doc, cdt, cdn) {
let row = locals[cdt][cdn]
if (row.party_type == "Customer") {
return {
filters:[[row.invoice_type, "customer", "in", [row.party]],
[row.invoice_type, "status", "!=", "Cancelled" ],
[row.invoice_type, "posting_date", "<", row.transaction_date ],
[row.invoice_type, "outstanding_amount", ">", 0 ]]
}
} else if (row.party_type == "Supplier") {
return {
filters:[[row.invoice_type, "supplier", "in", [row.party]],
[row.invoice_type, "status", "!=", "Cancelled" ],
[row.invoice_type, "posting_date", "<", row.transaction_date ],
[row.invoice_type, "outstanding_amount", ">", 0 ]]
}
}
});
},
match_invoices: function(frm) {
frm.events.invoke_doc_function(frm, "populate_matching_invoices");
},
create_payments: function(frm) {
frm.events.invoke_doc_function(frm, "create_payment_entries");
},
submit_payments: function(frm) {
frm.events.invoke_doc_function(frm, "submit_payment_entries");
},
});
frappe.ui.form.on('Bank Statement Transaction Invoice Item', {
party_type: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
if (row.party_type == "Customer") {
row.invoice_type = "Sales Invoice";
} else if (row.party_type == "Supplier") {
row.invoice_type = "Purchase Invoice";
} else if (row.party_type == "Account") {
row.invoice_type = "Journal Entry";
}
refresh_field("invoice_type", row.name, "payment_invoice_items");
},
invoice_type: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
if (row.invoice_type == "Purchase Invoice") {
row.party_type = "Supplier";
} else if (row.invoice_type == "Sales Invoice") {
row.party_type = "Customer";
}
refresh_field("party_type", row.name, "payment_invoice_items");
}
});

View File

@@ -1,792 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"beta": 0,
"creation": "2017-11-07 13:48:13.123185",
"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": "bank_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "From Date",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "To Date",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_settings",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Statement Settings",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Settings",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank",
"length": 0,
"no_copy": 0,
"options": "Bank",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "receivable_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Receivable Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payable_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payable Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_statement",
"fieldtype": "Attach",
"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": "Bank Statement",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Transaction Entries",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "new_transaction_items",
"fieldtype": "Table",
"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": "New Transactions",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Payment Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.new_transaction_items && doc.new_transaction_items.length",
"fieldname": "section_break_9",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "match_invoices",
"fieldtype": "Button",
"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": "Match Transaction to Invoices",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_14",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "create_payments",
"fieldtype": "Button",
"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": "Create New Payment/Journal Entry",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_16",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "submit_payments",
"fieldtype": "Button",
"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": "Submit/Reconcile Payments",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.new_transaction_items && doc.new_transaction_items.length",
"fieldname": "section_break_18",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Matching Invoices",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_invoice_items",
"fieldtype": "Table",
"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": "Payment Invoice Items",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Invoice Item",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "reconciled_transactions",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reconciled Transactions",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "reconciled_transaction_items",
"fieldtype": "Table",
"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": "Reconciled Transactions",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Payment Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Bank Statement Transaction Entry",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-09-14 18:04:44.170455",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Entry",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"cancel": 1,
"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": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"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": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,443 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from erpnext.accounts.utils import get_outstanding_invoices
from frappe.utils import nowdate
from datetime import datetime
import csv, os, re, io
import difflib
import copy
class BankStatementTransactionEntry(Document):
def autoname(self):
self.name = self.bank_account + "-" + self.from_date + "-" + self.to_date
if self.bank:
mapper_name = self.bank + "-Statement-Settings"
if not frappe.db.exists("Bank Statement Settings", mapper_name):
self.create_settings(self.bank)
self.bank_settings = mapper_name
def create_settings(self, bank):
mapper = frappe.new_doc("Bank Statement Settings")
mapper.bank = bank
mapper.date_format = "%Y-%m-%d"
mapper.bank_account = self.bank_account
for header in ["Date", "Particulars", "Withdrawals", "Deposits", "Balance"]:
header_item = mapper.append("header_items", {})
header_item.mapped_header = header_item.stmt_header = header
mapper.save()
def on_update(self):
if (not self.bank_statement):
self.reconciled_transaction_items = self.new_transaction_items = []
return
if len(self.new_transaction_items + self.reconciled_transaction_items) == 0:
self.populate_payment_entries()
else:
self.match_invoice_to_payment()
def validate(self):
if not self.new_transaction_items:
self.populate_payment_entries()
def get_statement_headers(self):
if not self.bank_settings:
frappe.throw(_("Bank Data mapper doesn't exist"))
mapper_doc = frappe.get_doc("Bank Statement Settings", self.bank_settings)
headers = {entry.mapped_header:entry.stmt_header for entry in mapper_doc.header_items}
return headers
def populate_payment_entries(self):
if self.bank_statement is None: return
file_url = self.bank_statement
if (len(self.new_transaction_items + self.reconciled_transaction_items) > 0):
frappe.throw(_("Transactions already retreived from the statement"))
date_format = frappe.get_value("Bank Statement Settings", self.bank_settings, "date_format")
if (date_format is None):
date_format = '%Y-%m-%d'
if self.bank_settings:
mapped_items = frappe.get_doc("Bank Statement Settings", self.bank_settings).mapped_items
statement_headers = self.get_statement_headers()
transactions = get_transaction_entries(file_url, statement_headers)
for entry in transactions:
date = entry[statement_headers["Date"]].strip()
#print("Processing entry DESC:{0}-W:{1}-D:{2}-DT:{3}".format(entry["Particulars"], entry["Withdrawals"], entry["Deposits"], entry["Date"]))
if (not date): continue
transaction_date = datetime.strptime(date, date_format).date()
if (self.from_date and transaction_date < datetime.strptime(self.from_date, '%Y-%m-%d').date()): continue
if (self.to_date and transaction_date > datetime.strptime(self.to_date, '%Y-%m-%d').date()): continue
bank_entry = self.append('new_transaction_items', {})
bank_entry.transaction_date = transaction_date
bank_entry.description = entry[statement_headers["Particulars"]]
mapped_item = next((entry for entry in mapped_items if entry.mapping_type == "Transaction" and frappe.safe_decode(entry.bank_data.lower()) in frappe.safe_decode(bank_entry.description.lower())), None)
if (mapped_item is not None):
bank_entry.party_type = mapped_item.mapped_data_type
bank_entry.party = mapped_item.mapped_data
else:
bank_entry.party_type = "Supplier" if not entry[statement_headers["Deposits"]].strip() else "Customer"
party_list = frappe.get_all(bank_entry.party_type, fields=["name"])
parties = [party.name for party in party_list]
matches = difflib.get_close_matches(frappe.safe_decode(bank_entry.description.lower()), parties, 1, 0.4)
if len(matches) > 0: bank_entry.party = matches[0]
bank_entry.amount = -float(entry[statement_headers["Withdrawals"]]) if not entry[statement_headers["Deposits"]].strip() else float(entry[statement_headers["Deposits"]])
self.map_unknown_transactions()
self.map_transactions_on_journal_entry()
def map_transactions_on_journal_entry(self):
for entry in self.new_transaction_items:
vouchers = frappe.db.sql("""select name, posting_date from `tabJournal Entry`
where posting_date='{0}' and total_credit={1} and cheque_no='{2}' and docstatus != 2
""".format(entry.transaction_date, abs(entry.amount), frappe.safe_decode(entry.description)), as_dict=True)
if (len(vouchers) == 1):
entry.reference_name = vouchers[0].name
def populate_matching_invoices(self):
self.payment_invoice_items = []
self.map_unknown_transactions()
added_invoices = []
for entry in self.new_transaction_items:
if (not entry.party or entry.party_type == "Account"): continue
account = self.receivable_account if entry.party_type == "Customer" else self.payable_account
invoices = get_outstanding_invoices(entry.party_type, entry.party, account)
transaction_date = datetime.strptime(entry.transaction_date, "%Y-%m-%d").date()
outstanding_invoices = [invoice for invoice in invoices if invoice.posting_date <= transaction_date]
amount = abs(entry.amount)
matching_invoices = [invoice for invoice in outstanding_invoices if invoice.outstanding_amount == amount]
sorted(outstanding_invoices, key=lambda k: k['posting_date'])
for e in (matching_invoices + outstanding_invoices):
added = next((inv for inv in added_invoices if inv == e.get('voucher_no')), None)
if (added is not None): continue
ent = self.append('payment_invoice_items', {})
ent.transaction_date = entry.transaction_date
ent.payment_description = frappe.safe_decode(entry.description)
ent.party_type = entry.party_type
ent.party = entry.party
ent.invoice = e.get('voucher_no')
added_invoices += [ent.invoice]
ent.invoice_type = "Sales Invoice" if entry.party_type == "Customer" else "Purchase Invoice"
ent.invoice_date = e.get('posting_date')
ent.outstanding_amount = e.get('outstanding_amount')
ent.allocated_amount = min(float(e.get('outstanding_amount')), amount)
amount -= float(e.get('outstanding_amount'))
if (amount <= 5): break
self.match_invoice_to_payment()
self.populate_matching_vouchers()
self.map_transactions_on_journal_entry()
def match_invoice_to_payment(self):
added_payments = []
for entry in self.new_transaction_items:
if (not entry.party or entry.party_type == "Account"): continue
entry.account = self.receivable_account if entry.party_type == "Customer" else self.payable_account
amount = abs(entry.amount)
payment, matching_invoices = None, []
for inv_entry in self.payment_invoice_items:
if (inv_entry.payment_description != frappe.safe_decode(entry.description) or inv_entry.transaction_date != entry.transaction_date): continue
if (inv_entry.party != entry.party): continue
matching_invoices += [inv_entry.invoice_type + "|" + inv_entry.invoice]
payment = get_payments_matching_invoice(inv_entry.invoice, entry.amount, entry.transaction_date)
doc = frappe.get_doc(inv_entry.invoice_type, inv_entry.invoice)
inv_entry.invoice_date = doc.posting_date
inv_entry.outstanding_amount = doc.outstanding_amount
inv_entry.allocated_amount = min(float(doc.outstanding_amount), amount)
amount -= inv_entry.allocated_amount
if (amount < 0): break
amount = abs(entry.amount)
if (payment is None):
order_doctype = "Sales Order" if entry.party_type=="Customer" else "Purchase Order"
from erpnext.controllers.accounts_controller import get_advance_payment_entries
payment_entries = get_advance_payment_entries(entry.party_type, entry.party, entry.account, order_doctype, against_all_orders=True)
payment_entries += self.get_matching_payments(entry.party, amount, entry.transaction_date)
payment = next((payment for payment in payment_entries if payment.amount == amount and payment not in added_payments), None)
if (payment is None):
print("Failed to find payments for {0}:{1}".format(entry.party, amount))
continue
added_payments += [payment]
entry.reference_type = payment.reference_type
entry.reference_name = payment.reference_name
entry.mode_of_payment = "Wire Transfer"
entry.outstanding_amount = min(amount, 0)
if (entry.payment_reference is None):
entry.payment_reference = frappe.safe_decode(entry.description)
entry.invoices = ",".join(matching_invoices)
#print("Matching payment is {0}:{1}".format(entry.reference_type, entry.reference_name))
def get_matching_payments(self, party, amount, pay_date):
query = """select 'Payment Entry' as reference_type, name as reference_name, paid_amount as amount
from `tabPayment Entry` where party='{0}' and paid_amount={1} and posting_date='{2}' and docstatus != 2
""".format(party, amount, pay_date)
matching_payments = frappe.db.sql(query, as_dict=True)
return matching_payments
def map_unknown_transactions(self):
for entry in self.new_transaction_items:
if (entry.party): continue
inv_type = "Sales Invoice" if (entry.amount > 0) else "Purchase Invoice"
party_type = "customer" if (entry.amount > 0) else "supplier"
query = """select posting_date, name, {0}, outstanding_amount
from `tab{1}` where ROUND(outstanding_amount)={2} and posting_date < '{3}'
""".format(party_type, inv_type, round(abs(entry.amount)), entry.transaction_date)
invoices = frappe.db.sql(query, as_dict = True)
if(len(invoices) > 0):
entry.party = invoices[0].get(party_type)
def populate_matching_vouchers(self):
for entry in self.new_transaction_items:
if (not entry.party or entry.reference_name): continue
print("Finding matching voucher for {0}".format(frappe.safe_decode(entry.description)))
amount = abs(entry.amount)
invoices = []
vouchers = get_matching_journal_entries(self.from_date, self.to_date, entry.party, self.bank_account, amount)
if len(vouchers) == 0: continue
for voucher in vouchers:
added = next((entry.invoice for entry in self.payment_invoice_items if entry.invoice == voucher.voucher_no), None)
if (added):
print("Found voucher {0}".format(added))
continue
print("Adding voucher {0} {1} {2}".format(voucher.voucher_no, voucher.posting_date, voucher.debit))
ent = self.append('payment_invoice_items', {})
ent.invoice_date = voucher.posting_date
ent.invoice_type = "Journal Entry"
ent.invoice = voucher.voucher_no
ent.payment_description = frappe.safe_decode(entry.description)
ent.allocated_amount = max(voucher.debit, voucher.credit)
invoices += [ent.invoice_type + "|" + ent.invoice]
entry.reference_type = "Journal Entry"
entry.mode_of_payment = "Wire Transfer"
entry.reference_name = ent.invoice
#entry.account = entry.party
entry.invoices = ",".join(invoices)
break
def create_payment_entries(self):
for payment_entry in self.new_transaction_items:
if (not payment_entry.party): continue
if (payment_entry.reference_name): continue
print("Creating payment entry for {0}".format(frappe.safe_decode(payment_entry.description)))
if (payment_entry.party_type == "Account"):
payment = self.create_journal_entry(payment_entry)
invoices = [payment.doctype + "|" + payment.name]
payment_entry.invoices = ",".join(invoices)
else:
payment = self.create_payment_entry(payment_entry)
invoices = [entry.reference_doctype + "|" + entry.reference_name for entry in payment.references if entry is not None]
payment_entry.invoices = ",".join(invoices)
payment_entry.mode_of_payment = payment.mode_of_payment
payment_entry.account = self.receivable_account if payment_entry.party_type == "Customer" else self.payable_account
payment_entry.reference_name = payment.name
payment_entry.reference_type = payment.doctype
frappe.msgprint(_("Successfully created payment entries"))
def create_payment_entry(self, pe):
payment = frappe.new_doc("Payment Entry")
payment.posting_date = pe.transaction_date
payment.payment_type = "Receive" if pe.party_type == "Customer" else "Pay"
payment.mode_of_payment = "Wire Transfer"
payment.party_type = pe.party_type
payment.party = pe.party
payment.paid_to = self.bank_account if pe.party_type == "Customer" else self.payable_account
payment.paid_from = self.receivable_account if pe.party_type == "Customer" else self.bank_account
payment.paid_amount = payment.received_amount = abs(pe.amount)
payment.reference_no = pe.description
payment.reference_date = pe.transaction_date
payment.save()
for inv_entry in self.payment_invoice_items:
if (pe.description != inv_entry.payment_description or pe.transaction_date != inv_entry.transaction_date): continue
if (pe.party != inv_entry.party): continue
reference = payment.append("references", {})
reference.reference_doctype = inv_entry.invoice_type
reference.reference_name = inv_entry.invoice
reference.allocated_amount = inv_entry.allocated_amount
print ("Adding invoice {0} {1}".format(reference.reference_name, reference.allocated_amount))
payment.setup_party_account_field()
payment.set_missing_values()
#payment.set_exchange_rate()
#payment.set_amounts()
#print("Created payment entry {0}".format(payment.as_dict()))
payment.save()
return payment
def create_journal_entry(self, pe):
je = frappe.new_doc("Journal Entry")
je.is_opening = "No"
je.voucher_type = "Bank Entry"
je.cheque_no = pe.description
je.cheque_date = pe.transaction_date
je.remark = pe.description
je.posting_date = pe.transaction_date
if (pe.amount < 0):
je.append("accounts", {"account": pe.party, "debit_in_account_currency": abs(pe.amount)})
je.append("accounts", {"account": self.bank_account, "credit_in_account_currency": abs(pe.amount)})
else:
je.append("accounts", {"account": pe.party, "credit_in_account_currency": pe.amount})
je.append("accounts", {"account": self.bank_account, "debit_in_account_currency": pe.amount})
je.save()
return je
def update_payment_entry(self, payment):
lst = []
invoices = payment.invoices.strip().split(',')
if (len(invoices) == 0): return
amount = float(abs(payment.amount))
for invoice_entry in invoices:
if (not invoice_entry.strip()): continue
invs = invoice_entry.split('|')
invoice_type, invoice = invs[0], invs[1]
outstanding_amount = frappe.get_value(invoice_type, invoice, 'outstanding_amount')
lst.append(frappe._dict({
'voucher_type': payment.reference_type,
'voucher_no' : payment.reference_name,
'against_voucher_type' : invoice_type,
'against_voucher' : invoice,
'account' : payment.account,
'party_type': payment.party_type,
'party': frappe.get_value("Payment Entry", payment.reference_name, "party"),
'unadjusted_amount' : float(amount),
'allocated_amount' : min(outstanding_amount, amount)
}))
amount -= outstanding_amount
if lst:
from erpnext.accounts.utils import reconcile_against_document
try:
reconcile_against_document(lst)
except:
frappe.throw(_("Exception occurred while reconciling {0}").format(payment.reference_name))
def submit_payment_entries(self):
for payment in self.new_transaction_items:
if payment.reference_name is None: continue
doc = frappe.get_doc(payment.reference_type, payment.reference_name)
if doc.docstatus == 1:
if (payment.reference_type == "Journal Entry"): continue
if doc.unallocated_amount == 0: continue
print("Reconciling payment {0}".format(payment.reference_name))
self.update_payment_entry(payment)
else:
print("Submitting payment {0}".format(payment.reference_name))
if (payment.reference_type == "Payment Entry"):
if (payment.payment_reference):
doc.reference_no = payment.payment_reference
doc.mode_of_payment = payment.mode_of_payment
doc.save()
doc.submit()
self.move_reconciled_entries()
self.populate_matching_invoices()
def move_reconciled_entries(self):
idx = 0
while idx < len(self.new_transaction_items):
entry = self.new_transaction_items[idx]
try:
print("Checking transaction {0}: {2} in {1} entries".format(idx, len(self.new_transaction_items), frappe.safe_decode(entry.description)))
except UnicodeEncodeError:
pass
idx += 1
if entry.reference_name is None: continue
doc = frappe.get_doc(entry.reference_type, entry.reference_name)
if doc.docstatus == 1 and (entry.reference_type == "Journal Entry" or doc.unallocated_amount == 0):
self.remove(entry)
rc_entry = self.append('reconciled_transaction_items', {})
dentry = entry.as_dict()
dentry.pop('idx', None)
rc_entry.update(dentry)
idx -= 1
def get_matching_journal_entries(from_date, to_date, account, against, amount):
query = """select voucher_no, posting_date, account, against, debit_in_account_currency as debit, credit_in_account_currency as credit
from `tabGL Entry`
where posting_date between '{0}' and '{1}' and account = '{2}' and against = '{3}' and debit = '{4}'
""".format(from_date, to_date, account, against, amount)
jv_entries = frappe.db.sql(query, as_dict=True)
#print("voucher query:{0}\n Returned {1} entries".format(query, len(jv_entries)))
return jv_entries
def get_payments_matching_invoice(invoice, amount, pay_date):
query = """select pe.name as reference_name, per.reference_doctype as reference_type, per.outstanding_amount, per.allocated_amount
from `tabPayment Entry Reference` as per JOIN `tabPayment Entry` as pe on pe.name = per.parent
where per.reference_name='{0}' and (posting_date='{1}' or reference_date='{1}') and pe.docstatus != 2
""".format(invoice, pay_date)
payments = frappe.db.sql(query, as_dict=True)
if (len(payments) == 0): return
payment = next((payment for payment in payments if payment.allocated_amount == amount), payments[0])
#Hack: Update the reference type which is set to invoice type
payment.reference_type = "Payment Entry"
return payment
def is_headers_present(headers, row):
for header in headers:
if header not in row:
return False
return True
def get_header_index(headers, row):
header_index = {}
for header in headers:
if header in row:
header_index[header] = row.index(header)
return header_index
def get_transaction_info(headers, header_index, row):
transaction = {}
for header in headers:
transaction[header] = row[header_index[header]]
if (transaction[header] == None):
transaction[header] = ""
return transaction
def get_transaction_entries(file_url, headers):
header_index = {}
rows, transactions = [], []
if (file_url.lower().endswith("xlsx")):
from frappe.utils.xlsxutils import read_xlsx_file_from_attached_file
rows = read_xlsx_file_from_attached_file(file_url=file_url)
elif (file_url.lower().endswith("csv")):
from frappe.utils.csvutils import read_csv_content
_file = frappe.get_doc("File", {"file_url": file_url})
filepath = _file.get_full_path()
with open(filepath,'rb') as csvfile:
rows = read_csv_content(csvfile.read())
elif (file_url.lower().endswith("xls")):
filename = file_url.split("/")[-1]
rows = get_rows_from_xls_file(filename)
else:
frappe.throw(_("Only .csv and .xlsx files are supported currently"))
stmt_headers = headers.values()
for row in rows:
if len(row) == 0 or row[0] == None or not row[0]: continue
#print("Processing row {0}".format(row))
if header_index:
transaction = get_transaction_info(stmt_headers, header_index, row)
transactions.append(transaction)
elif is_headers_present(stmt_headers, row):
header_index = get_header_index(stmt_headers, row)
return transactions
def get_rows_from_xls_file(filename):
_file = frappe.get_doc("File", {"file_name": filename})
filepath = _file.get_full_path()
import xlrd
book = xlrd.open_workbook(filepath)
sheets = book.sheets()
rows = []
for row in range(1, sheets[0].nrows):
row_values = []
for col in range(1, sheets[0].ncols):
row_values.append(sheets[0].cell_value(row, col))
rows.append(row_values)
return rows

View File

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

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBankStatementTransactionEntry(unittest.TestCase):
pass

View File

@@ -1,365 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-11-07 13:58:53.827058",
"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": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
"length": 0,
"no_copy": 0,
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 4,
"fieldname": "payment_description",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Payment Description",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "party_type",
"fieldtype": "Select",
"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": "Party Type",
"length": 0,
"no_copy": 0,
"options": "Customer\nSupplier\nAccount",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_4",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "invoice_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Invoice Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "invoice_type",
"fieldtype": "Select",
"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": "Invoice Type",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "invoice",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "invoice",
"length": 0,
"no_copy": 0,
"options": "invoice_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "outstanding_amount",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Outstanding Amount",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "allocated_amount",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated Amount",
"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": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-09-14 19:03:30.949831",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Invoice Item",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@@ -1,494 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-11-07 14:03:05.651413",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Transaction Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 4,
"fieldname": "description",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "party_type",
"fieldtype": "Select",
"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": "Party Type",
"length": 0,
"no_copy": 0,
"options": "Customer\nSupplier\nAccount",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "reference_type",
"fieldtype": "Select",
"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": "Reference Type",
"length": 0,
"no_copy": 0,
"options": "Payment Entry\nJournal Entry",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mode of Payment",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"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": "outstanding_amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_10",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "reference_name",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
"options": "reference_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_reference",
"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": "Payment Reference",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "invoices",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Invoices",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-11-15 19:18:52.876221",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Payment Item",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,8 +0,0 @@
// Copyright (c) 2017, sathishpy@gmail.com and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Statement Settings', {
refresh: function(frm) {
}
});

View File

@@ -1,266 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"beta": 0,
"creation": "2017-11-13 13:38:10.863592",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "'%d/%m/%Y'",
"fieldname": "date_format",
"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": "Date Format",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "statement_header_mapping",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Statement Header Mapping",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "header_items",
"fieldtype": "Table",
"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": "Statement Headers",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Settings Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "transaction_data_mapping",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Data Mapping",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_items",
"fieldtype": "Table",
"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": "Mapped Items",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Settings Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"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-01-12 10:34:32.840487",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BankStatementSettings(Document):
def autoname(self):
self.name = self.bank_account + "-Mappings"

View File

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

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBankStatementSettings(unittest.TestCase):
pass

View File

@@ -1,166 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-11-13 13:42:00.335432",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Transaction",
"fieldname": "mapping_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mapping Type",
"length": 0,
"no_copy": 0,
"options": "Transaction",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_data",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Bank Data",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Account",
"fieldname": "mapped_data_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mapped Data Type",
"length": 0,
"no_copy": 0,
"options": "Account\nCustomer\nSupplier\nAccount",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_data",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mapped Data",
"length": 0,
"no_copy": 0,
"options": "mapped_data_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-01-08 00:13:49.973501",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Settings Item",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BankStatementTransactionSettingsItem(Document):
pass

View File

@@ -1,32 +1,70 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Transaction', {
frappe.ui.form.on("Bank Transaction", {
onload(frm) {
frm.set_query('payment_document', 'payment_entries', function() {
frm.set_query("payment_document", "payment_entries", function () {
return {
"filters": {
"name": ["in", ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Expense Claim"]]
}
filters: {
name: [
"in",
[
"Payment Entry",
"Journal Entry",
"Sales Invoice",
"Purchase Invoice",
"Expense Claim",
],
],
},
};
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
setup: function (frm) {
frm.set_query("party_type", function () {
return {
filters: {
name: ["in", Object.keys(frappe.boot.party_account_types)],
},
};
});
},
});
frappe.ui.form.on('Bank Transaction Payments', {
payment_entries_remove: function(frm, cdt, cdn) {
frappe.ui.form.on("Bank Transaction Payments", {
payment_entries_remove: function (frm, cdt, cdn) {
update_clearance_date(frm, cdt, cdn);
}
},
});
const update_clearance_date = (frm, cdt, cdn) => {
if (frm.doc.docstatus === 1) {
frappe.xcall('erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment',
{doctype: cdt, docname: cdn})
.then(e => {
frappe
.xcall(
"erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment",
{ doctype: cdt, docname: cdn }
)
.then((e) => {
if (e == "success") {
frappe.show_alert({message:__("Document {0} successfully uncleared", [e]), indicator:'green'});
frappe.show_alert({
message: __("Document {0} successfully uncleared", [e]),
indicator: "green",
});
}
});
}
};
};
function set_bank_statement_filter(frm) {
frm.set_query("bank_statement", function () {
return {
filters: {
bank_account: frm.doc.bank_account,
},
};
});
}

View File

@@ -1,833 +1,247 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"actions": [],
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
"beta": 0,
"creation": "2018-10-22 18:19:02.784533",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"naming_series",
"date",
"column_break_2",
"status",
"bank_account",
"company",
"section_break_4",
"deposit",
"withdrawal",
"column_break_7",
"currency",
"section_break_10",
"description",
"section_break_14",
"reference_number",
"transaction_id",
"payment_entries",
"section_break_18",
"allocated_amount",
"amended_from",
"column_break_17",
"unallocated_amount",
"party_section",
"party_type",
"party"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "ACC-BTN-.YYYY.-",
"fetch_if_empty": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 1,
"options": "ACC-BTN-.YYYY.-",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 1,
"translatable": 0,
"unique": 0
"set_only_once": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
"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": 0
"label": "Date"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Pending",
"fetch_if_empty": 0,
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
"length": 0,
"no_copy": 0,
"options": "\nPending\nSettled\nUnreconciled\nReconciled",
"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": 0
"options": "\nPending\nSettled\nUnreconciled\nReconciled"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "bank_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Bank Account",
"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": 0
"options": "Bank Account"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"fetch_from": "bank_account.company",
"fetch_if_empty": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "debit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Debit",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "credit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Credit",
"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": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_7",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"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": 0
"options": "Currency"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Description",
"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": 0
"label": "Description"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_14",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"allow_on_submit": 1,
"fieldname": "reference_number",
"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": "Reference Number",
"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": 0
"label": "Reference Number"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "transaction_id",
"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": "Transaction ID",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "payment_entries",
"fieldtype": "Table",
"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": "Payment Entries",
"length": 0,
"no_copy": 0,
"options": "Bank Transaction Payments",
"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": 0
"options": "Bank Transaction Payments"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_18",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"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": "Allocated Amount",
"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": 0
"label": "Allocated Amount"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Bank Transaction",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_17",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"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": 0
"fieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fetch_if_empty": 0,
"fieldname": "unallocated_amount",
"fieldtype": "Currency",
"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": "Unallocated Amount",
"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": 0
"label": "Unallocated Amount"
},
{
"fieldname": "party_section",
"fieldtype": "Section Break",
"label": "Payment From / To"
},
{
"allow_on_submit": 1,
"fieldname": "party_type",
"fieldtype": "Link",
"label": "Party Type",
"options": "DocType"
},
{
"allow_on_submit": 1,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"label": "Party",
"options": "party_type"
},
{
"fieldname": "deposit",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Deposit",
"oldfieldname": "debit",
"options": "currency"
},
{
"fieldname": "withdrawal",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Withdrawal",
"oldfieldname": "credit",
"options": "currency"
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-05-11 05:27:55.244721",
"links": [],
"modified": "2021-04-14 17:31:58.963529",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 1,
"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": 1,
"write": 1
},
{
"amend": 0,
"cancel": 1,
"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": 1,
"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": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "date",
"sort_order": "DESC",
"title_field": "bank_account",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
"track_changes": 1
}

View File

@@ -11,7 +11,7 @@ from frappe import _
class BankTransaction(StatusUpdater):
def after_insert(self):
self.unallocated_amount = abs(flt(self.credit) - flt(self.debit))
self.unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit))
def on_submit(self):
self.clear_linked_payment_entries()
@@ -30,13 +30,13 @@ class BankTransaction(StatusUpdater):
if allocated_amount:
frappe.db.set_value(self.doctype, self.name, "allocated_amount", flt(allocated_amount))
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.credit) - flt(self.debit)) - flt(allocated_amount))
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.withdrawal) - flt(self.deposit)) - flt(allocated_amount))
else:
frappe.db.set_value(self.doctype, self.name, "allocated_amount", 0)
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.credit) - flt(self.debit)))
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.withdrawal) - flt(self.deposit)))
amount = self.debit or self.credit
amount = self.deposit or self.withdrawal
if amount == self.allocated_amount:
frappe.db.set_value(self.doctype, self.name, "status", "Reconciled")
@@ -44,18 +44,11 @@ class BankTransaction(StatusUpdater):
def clear_linked_payment_entries(self):
for payment_entry in self.payment_entries:
allocated_amount = get_total_allocated_amount(payment_entry)
paid_amount = get_paid_amount(payment_entry, self.currency)
if payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]:
self.clear_simple_entry(payment_entry)
if paid_amount and allocated_amount:
if flt(allocated_amount[0]["allocated_amount"]) > flt(paid_amount):
frappe.throw(_("The total allocated amount ({0}) is greated than the paid amount ({1}).").format(flt(allocated_amount[0]["allocated_amount"]), flt(paid_amount)))
else:
if payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]:
self.clear_simple_entry(payment_entry)
elif payment_entry.payment_document == "Sales Invoice":
self.clear_sales_invoice(payment_entry)
elif payment_entry.payment_document == "Sales Invoice":
self.clear_sales_invoice(payment_entry)
def clear_simple_entry(self, payment_entry):
frappe.db.set_value(payment_entry.payment_document, payment_entry.payment_entry, "clearance_date", self.date)
@@ -112,3 +105,4 @@ def unclear_reference_payment(doctype, docname):
frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None)
return doc.payment_entry

View File

@@ -5,21 +5,24 @@ from __future__ import unicode_literals
import frappe
import unittest
import json
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.page.bank_reconciliation.bank_reconciliation import reconcile, get_linked_payments
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import reconcile_vouchers, get_linked_payments
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
test_dependencies = ["Item", "Cost Center"]
class TestBankTransaction(unittest.TestCase):
def setUp(self):
@classmethod
def setUpClass(cls):
make_pos_profile()
add_transactions()
add_payments()
add_vouchers()
def tearDown(self):
@classmethod
def tearDownClass(cls):
for bt in frappe.get_all("Bank Transaction"):
doc = frappe.get_doc("Bank Transaction", bt.name)
doc.cancel()
@@ -32,20 +35,21 @@ class TestBankTransaction(unittest.TestCase):
# Delete POS Profile
frappe.db.sql("delete from `tabPOS Profile`")
frappe.flags.test_bank_transactions_created = False
frappe.flags.test_payments_created = False
# This test checks if ERPNext is able to provide a linked payment for a bank transaction based on the amount of the bank transaction.
def test_linked_payments(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic"))
linked_payments = get_linked_payments(bank_transaction.name)
self.assertTrue(linked_payments[0].party == "Conrad Electronic")
linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
self.assertTrue(linked_payments[0][6] == "Conrad Electronic")
# This test validates a simple reconciliation leading to the clearance of the bank transaction and the payment
def test_reconcile(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200))
reconcile(bank_transaction.name, "Payment Entry", payment.name)
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1700))
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
reconcile_vouchers(bank_transaction.name, vouchers)
unallocated_amount = frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount")
self.assertTrue(unallocated_amount == 0)
@@ -53,45 +57,39 @@ class TestBankTransaction(unittest.TestCase):
clearance_date = frappe.db.get_value("Payment Entry", payment.name, "clearance_date")
self.assertTrue(clearance_date is not None)
# Check if ERPNext can correctly fetch a linked payment based on the party
def test_linked_payments_based_on_party(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G"))
linked_payments = get_linked_payments(bank_transaction.name)
self.assertTrue(len(linked_payments)==1)
# Check if ERPNext can correctly filter a linked payments based on the debit/credit amount
def test_debit_credit_output(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
linked_payments = get_linked_payments(bank_transaction.name)
self.assertTrue(linked_payments[0].payment_type == "Pay")
linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
self.assertTrue(linked_payments[0][3])
# Check error if already reconciled
def test_already_reconciled(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200))
reconcile(bank_transaction.name, "Payment Entry", payment.name)
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
reconcile_vouchers(bank_transaction.name, vouchers)
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200))
self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name)
# Raise an error if creditor transaction vs creditor payment
def test_invalid_creditor_reconcilation(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio"))
payment = frappe.get_doc("Payment Entry", dict(party="Conrad Electronic", paid_amount=690))
self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name)
# Raise an error if debitor transaction vs debitor payment
def test_invalid_debitor_reconcilation(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
payment = frappe.get_doc("Payment Entry", dict(party="Fayva", paid_amount=109080))
self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name)
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
self.assertRaises(frappe.ValidationError, reconcile_vouchers, bank_transaction_name=bank_transaction.name, vouchers=vouchers)
# Raise an error if debitor transaction vs debitor payment
def test_clear_sales_invoice(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio"))
payment = frappe.get_doc("Sales Invoice", dict(customer="Fayva", status=["=", "Paid"]))
reconcile(bank_transaction.name, "Sales Invoice", payment.name)
vouchers = json.dumps([{
"payment_doctype":"Sales Invoice",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
reconcile_vouchers(bank_transaction.name, vouchers=vouchers)
self.assertEqual(frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount"), 0)
self.assertTrue(frappe.db.get_value("Sales Invoice Payment", dict(parent=payment.name), "clearance_date") is not None)
@@ -116,17 +114,13 @@ def create_bank_account(bank_name="Citi Bank", account_name="_Test Bank - _TC"):
pass
def add_transactions():
if frappe.flags.test_bank_transactions_created:
return
frappe.set_user("Administrator")
create_bank_account()
doc = frappe.get_doc({
"doctype": "Bank Transaction",
"description":"1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G",
"date": "2018-10-23",
"debit": 1200,
"deposit": 1200,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -136,7 +130,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G",
"date": "2018-10-23",
"debit": 1700,
"deposit": 1700,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -146,7 +140,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic",
"date": "2018-10-26",
"debit": 690,
"withdrawal": 690,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -156,7 +150,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07",
"date": "2018-10-27",
"debit": 3900,
"deposit": 3900,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -166,20 +160,14 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio",
"date": "2018-10-27",
"credit": 109080,
"withdrawal": 109080,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
doc.submit()
frappe.flags.test_bank_transactions_created = True
def add_payments():
if frappe.flags.test_payments_created:
return
frappe.set_user("Administrator")
def add_vouchers():
try:
frappe.get_doc({
"doctype": "Supplier",
@@ -192,6 +180,7 @@ def add_payments():
pass
pi = make_purchase_invoice(supplier="Conrad Electronic", qty=1, rate=690)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Conrad Oct 18"
pe.reference_date = "2018-10-24"
@@ -242,10 +231,15 @@ def add_payments():
except frappe.DuplicateEntryError:
pass
pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900)
pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900, is_paid=1, do_not_save =1)
pi.cash_bank_account = "_Test Bank - _TC"
pi.insert()
pi.submit()
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Poore Simon's Oct 18"
pe.reference_date = "2018-10-28"
pe.paid_amount = 690
pe.received_amount = 690
pe.insert()
pe.submit()
@@ -266,13 +260,6 @@ def add_payments():
except frappe.DuplicateEntryError:
pass
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080)
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Fayva Oct 18"
pe.reference_date = "2018-10-29"
pe.insert()
pe.submit()
mode_of_payment = frappe.get_doc({
"doctype": "Mode of Payment",
"name": "Cash"
@@ -285,14 +272,12 @@ def add_payments():
})
mode_of_payment.save()
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080, do_not_submit=1)
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080, do_not_save=1)
si.is_pos = 1
si.append("payments", {
"mode_of_payment": "Cash",
"account": "_Test Bank - _TC",
"amount": 109080
})
si.save()
si.insert()
si.submit()
frappe.flags.test_payments_created = True

View File

@@ -1,24 +1,9 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts.dimensions");
frappe.ui.form.on('Budget', {
onload: function(frm) {
frm.set_query("cost_center", function() {
return {
filters: {
company: frm.doc.company
}
}
})
frm.set_query("project", function() {
return {
filters: {
company: frm.doc.company
}
}
})
frm.set_query("account", "accounts", function() {
return {
filters: {
@@ -26,16 +11,18 @@ frappe.ui.form.on('Budget', {
report_type: "Profit and Loss",
is_group: 0
}
}
})
};
});
frm.set_query("monthly_distribution", function() {
return {
filters: {
fiscal_year: frm.doc.fiscal_year
}
}
})
};
});
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
},
refresh: function(frm) {

View File

@@ -122,8 +122,10 @@ class TestBudget(unittest.TestCase):
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
project = frappe.get_value("Project", {"project_name": "_Test Project"})
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", project="_Test Project", posting_date=nowdate())
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", project=project, posting_date=nowdate())
self.assertRaises(BudgetError, jv.submit)
@@ -147,8 +149,11 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Project")
project = frappe.get_value("Project", {"project_name": "_Test Project"})
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 250000, "_Test Cost Center - _TC", project="_Test Project", posting_date=nowdate())
"_Test Bank - _TC", 250000, "_Test Cost Center - _TC",
project=project, posting_date=nowdate())
self.assertRaises(BudgetError, jv.submit)
@@ -159,10 +164,10 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Cost Center")
month = now_datetime().month
if month > 10:
month = 10
if month > 9:
month = 9
for i in range(month):
for i in range(month+1):
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True)
@@ -181,12 +186,14 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Project")
month = now_datetime().month
if month > 10:
month = 10
if month > 9:
month = 9
for i in range(month):
project = frappe.get_value("Project", {"project_name": "_Test Project"})
for i in range(month + 1):
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True, project="_Test Project")
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True,
project=project)
self.assertTrue(frappe.db.get_value("GL Entry",
{"voucher_type": "Journal Entry", "voucher_no": jv.name}))
@@ -289,7 +296,7 @@ def make_budget(**args):
budget = frappe.new_doc("Budget")
if budget_against == "Project":
budget.project = "_Test Project"
budget.project = frappe.get_value("Project", {"project_name": "_Test Project"})
else:
budget.cost_center =cost_center or "_Test Cost Center - _TC"

View File

@@ -57,6 +57,7 @@ class CForm(Document):
total = sum([flt(d.grand_total) for d in self.get('invoices')])
frappe.db.set(self, 'total_invoiced_amount', total)
@frappe.whitelist()
def get_invoice_details(self, invoice_no):
""" Pull details from invoices for referrence """
if invoice_no:

View File

@@ -22,9 +22,10 @@ def validate_company(company):
'allow_account_creation_against_child_company'])
if parent_company and (not allow_account_creation_against_child_company):
frappe.throw(_("""{0} is a child company. Please import accounts against parent company
or enable {1} in company master""").format(frappe.bold(company),
frappe.bold('Allow Account Creation Against Child Company')), title='Wrong Company')
msg = _("{} is a child company. ").format(frappe.bold(company))
msg += _("Please import accounts against parent company or enable {} in company master.").format(
frappe.bold('Allow Account Creation Against Child Company'))
frappe.throw(msg, title=_('Wrong Company'))
if frappe.db.get_all('GL Entry', {"company": company}, "name", limit=1):
return False
@@ -74,7 +75,9 @@ def generate_data_from_csv(file_doc, as_dict=False):
if as_dict:
data.append({frappe.scrub(header): row[index] for index, header in enumerate(headers)})
else:
if not row[1]: row[1] = row[0]
if not row[1]:
row[1] = row[0]
row[3] = row[2]
data.append(row)
# convert csv data
@@ -96,7 +99,9 @@ def generate_data_from_excel(file_doc, extension, as_dict=False):
if as_dict:
data.append({frappe.scrub(header): row[index] for index, header in enumerate(headers)})
else:
if not row[1]: row[1] = row[0]
if not row[1]:
row[1] = row[0]
row[3] = row[2]
data.append(row)
return data
@@ -147,7 +152,13 @@ def build_forest(data):
from frappe import _
for row in data:
account_name, parent_account = row[0:2]
account_name, parent_account, account_number, parent_account_number = row[0:4]
if account_number:
account_name = "{} - {}".format(account_number, account_name)
if parent_account_number:
parent_account_number = cstr(parent_account_number).strip()
parent_account = "{} - {}".format(parent_account_number, parent_account)
if parent_account == account_name == child:
return [parent_account]
elif account_name == child:
@@ -159,20 +170,23 @@ def build_forest(data):
charts_map, paths = {}, []
line_no = 3
line_no = 2
error_messages = []
for i in data:
account_name, dummy, account_number, is_group, account_type, root_type = i
account_name, parent_account, account_number, parent_account_number, is_group, account_type, root_type = i
if not account_name:
error_messages.append("Row {0}: Please enter Account Name".format(line_no))
if account_number:
account_number = cstr(account_number).strip()
account_name = "{} - {}".format(account_number, account_name)
charts_map[account_name] = {}
if cint(is_group) == 1: charts_map[account_name]["is_group"] = is_group
if account_type: charts_map[account_name]["account_type"] = account_type
if root_type: charts_map[account_name]["root_type"] = root_type
if account_number: charts_map[account_name]["account_number"] = account_number
path = return_parent(data, account_name)[::-1]
paths.append(path) # List of path is created
line_no += 1
@@ -221,7 +235,7 @@ def download_template(file_type, template_type):
def get_template(template_type):
fields = ["Account Name", "Parent Account", "Account Number", "Is Group", "Account Type", "Root Type"]
fields = ["Account Name", "Parent Account", "Account Number", "Parent Account Number", "Is Group", "Account Type", "Root Type"]
writer = UnicodeWriter()
writer.writerow(fields)
@@ -241,23 +255,23 @@ def get_template(template_type):
def get_sample_template(writer):
template = [
["Application Of Funds(Assets)", "", "", 1, "", "Asset"],
["Sources Of Funds(Liabilities)", "", "", 1, "", "Liability"],
["Equity", "", "", 1, "", "Equity"],
["Expenses", "", "", 1, "", "Expense"],
["Income", "", "", 1, "", "Income"],
["Bank Accounts", "Application Of Funds(Assets)", "", 1, "Bank", "Asset"],
["Cash In Hand", "Application Of Funds(Assets)", "", 1, "Cash", "Asset"],
["Stock Assets", "Application Of Funds(Assets)", "", 1, "Stock", "Asset"],
["Cost Of Goods Sold", "Expenses", "", 0, "Cost of Goods Sold", "Expense"],
["Asset Depreciation", "Expenses", "", 0, "Depreciation", "Expense"],
["Fixed Assets", "Application Of Funds(Assets)", "", 0, "Fixed Asset", "Asset"],
["Accounts Payable", "Sources Of Funds(Liabilities)", "", 0, "Payable", "Liability"],
["Accounts Receivable", "Application Of Funds(Assets)", "", 1, "Receivable", "Asset"],
["Stock Expenses", "Expenses", "", 0, "Stock Adjustment", "Expense"],
["Sample Bank", "Bank Accounts", "", 0, "Bank", "Asset"],
["Cash", "Cash In Hand", "", 0, "Cash", "Asset"],
["Stores", "Stock Assets", "", 0, "Stock", "Asset"],
["Application Of Funds(Assets)", "", "", "", 1, "", "Asset"],
["Sources Of Funds(Liabilities)", "", "", "", 1, "", "Liability"],
["Equity", "", "", "", 1, "", "Equity"],
["Expenses", "", "", "", 1, "", "Expense"],
["Income", "", "", "", 1, "", "Income"],
["Bank Accounts", "Application Of Funds(Assets)", "", "", 1, "Bank", "Asset"],
["Cash In Hand", "Application Of Funds(Assets)", "", "", 1, "Cash", "Asset"],
["Stock Assets", "Application Of Funds(Assets)", "", "", 1, "Stock", "Asset"],
["Cost Of Goods Sold", "Expenses", "", "", 0, "Cost of Goods Sold", "Expense"],
["Asset Depreciation", "Expenses", "", "", 0, "Depreciation", "Expense"],
["Fixed Assets", "Application Of Funds(Assets)", "", "", 0, "Fixed Asset", "Asset"],
["Accounts Payable", "Sources Of Funds(Liabilities)", "", "", 0, "Payable", "Liability"],
["Accounts Receivable", "Application Of Funds(Assets)", "", "", 1, "Receivable", "Asset"],
["Stock Expenses", "Expenses", "", "", 0, "Stock Adjustment", "Expense"],
["Sample Bank", "Bank Accounts", "", "", 0, "Bank", "Asset"],
["Cash", "Cash In Hand", "", "", 0, "Cash", "Asset"],
["Stores", "Stock Assets", "", "", 0, "Stock", "Asset"],
]
for row in template:
@@ -279,6 +293,11 @@ def validate_accounts(file_name):
accounts_dict = {}
for account in accounts:
accounts_dict.setdefault(account["account_name"], account)
if not hasattr(account, "parent_account"):
msg = _("Please make sure the file you are using has 'Parent Account' column present in the header.")
msg += "<br><br>"
msg += _("Alternatively, you can download the template and fill your data in.")
frappe.throw(msg, title=_("Parent Account Missing"))
if account["parent_account"] and accounts_dict.get(account["parent_account"]):
accounts_dict[account["parent_account"]]["is_group"] = 1

View File

@@ -50,6 +50,7 @@ class CostCenter(NestedSet):
frappe.throw(_("{0} is not a group node. Please select a group node as parent cost center").format(
frappe.bold(self.parent_cost_center)))
@frappe.whitelist()
def convert_group_to_ledger(self):
if self.check_if_child_exists():
frappe.throw(_("Cannot convert Cost Center to ledger as it has child nodes"))
@@ -60,6 +61,7 @@ class CostCenter(NestedSet):
self.save()
return 1
@frappe.whitelist()
def convert_ledger_to_group(self):
if cint(self.enable_distributed_cost_center):
frappe.throw(_("Cost Center with enabled distributed cost center can not be converted to group"))

View File

@@ -21,21 +21,17 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
refresh: function(frm) {
if(frm.doc.docstatus==1) {
frappe.db.get_value("Journal Entry Account", {
'reference_type': 'Exchange Rate Revaluation',
'reference_name': frm.doc.name,
'docstatus': 1
}, "sum(debit) as sum", (r) =>{
let total_amt = 0;
frm.doc.accounts.forEach(d=> {
total_amt = total_amt + d['new_balance_in_base_currency'];
});
if(total_amt !== r.sum) {
frm.add_custom_button(__('Journal Entry'), function() {
return frm.events.make_jv(frm);
}, __('Create'));
frappe.call({
method: 'check_journal_entry_condition',
doc: frm.doc,
callback: function(r) {
if (r.message) {
frm.add_custom_button(__('Journal Entry'), function() {
return frm.events.make_jv(frm);
}, __('Create'));
}
}
}, 'Journal Entry');
});
}
},

View File

@@ -27,6 +27,24 @@ class ExchangeRateRevaluation(Document):
if not (self.company and self.posting_date):
frappe.throw(_("Please select Company and Posting Date to getting entries"))
@frappe.whitelist()
def check_journal_entry_condition(self):
total_debit = frappe.db.get_value("Journal Entry Account", {
'reference_type': 'Exchange Rate Revaluation',
'reference_name': self.name,
'docstatus': 1
}, "sum(debit) as sum")
total_amt = 0
for d in self.accounts:
total_amt = total_amt + d.new_balance_in_base_currency
if total_amt != total_debit:
return True
return False
@frappe.whitelist()
def get_accounts_data(self, account=None):
accounts = []
self.validate_mandatory()
@@ -95,6 +113,7 @@ class ExchangeRateRevaluation(Document):
message = _("No outstanding invoices found")
frappe.msgprint(message)
@frappe.whitelist()
def make_jv_entry(self):
if self.total_gain_loss == 0:
return

View File

@@ -12,6 +12,7 @@ from frappe.model.document import Document
class FiscalYearIncorrectDate(frappe.ValidationError): pass
class FiscalYear(Document):
@frappe.whitelist()
def set_as_default(self):
frappe.db.set_value("Global Defaults", None, "current_fiscal_year", self.name)
global_defaults = frappe.get_doc("Global Defaults")
@@ -54,7 +55,7 @@ class FiscalYear(Document):
def on_update(self):
check_duplicate_fiscal_year(self)
frappe.cache().delete_value("fiscal_years")
def on_trash(self):
global_defaults = frappe.get_doc("Global Defaults")
if global_defaults.current_fiscal_year == self.name:

View File

@@ -11,8 +11,10 @@ from frappe.model.meta import get_field_precision
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.utils import get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency
from erpnext.exceptions import InvalidAccountCurrency, InvalidAccountDimensionError, MandatoryAccountDimensionError
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_checks_for_pl_and_bs_accounts
from erpnext.accounts.doctype.accounting_dimension_filter.accounting_dimension_filter import get_dimension_filter_map
from six import iteritems
exclude_from_linked_with = True
class GLEntry(Document):
@@ -25,29 +27,30 @@ class GLEntry(Document):
def validate(self):
self.flags.ignore_submit_comment = True
self.check_mandatory()
self.validate_and_set_fiscal_year()
self.pl_must_have_cost_center()
self.validate_cost_center()
if not self.flags.from_repost:
self.check_mandatory()
self.validate_cost_center()
self.check_pl_account()
self.validate_party()
self.validate_currency()
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes', from_repost=False):
if not from_repost:
def on_update(self):
adv_adj = self.flags.adv_adj
if not self.flags.from_repost:
self.validate_account_details(adv_adj)
self.validate_dimensions_for_pl_and_bs()
self.validate_allowed_dimensions()
validate_balance_type(self.account, adv_adj)
validate_frozen_account(self.account, adv_adj)
validate_frozen_account(self.account, adv_adj)
validate_balance_type(self.account, adv_adj)
# Update outstanding amt on against voucher
if self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice', 'Fees'] \
and self.against_voucher and update_outstanding == 'Yes' and not from_repost:
update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type,
self.against_voucher)
# Update outstanding amt on against voucher
if (self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice', 'Fees']
and self.against_voucher and self.flags.update_outstanding == 'Yes'):
update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type,
self.against_voucher)
def check_mandatory(self):
mandatory = ['account','voucher_type','voucher_no','company']
@@ -55,7 +58,7 @@ class GLEntry(Document):
if not self.get(k):
frappe.throw(_("{0} is required").format(_(self.meta.get_label(k))))
account_type = frappe.db.get_value("Account", self.account, "account_type")
account_type = frappe.get_cached_value("Account", self.account, "account_type")
if not (self.party_type and self.party):
if account_type == "Receivable":
frappe.throw(_("{0} {1}: Customer is required against Receivable account {2}")
@@ -70,17 +73,15 @@ class GLEntry(Document):
.format(self.voucher_type, self.voucher_no, self.account))
def pl_must_have_cost_center(self):
if frappe.db.get_value("Account", self.account, "report_type") == "Profit and Loss":
if frappe.get_cached_value("Account", self.account, "report_type") == "Profit and Loss":
if not self.cost_center and self.voucher_type != 'Period Closing Voucher':
frappe.throw(_("{0} {1}: Cost Center is required for 'Profit and Loss' account {2}. Please set up a default Cost Center for the Company.")
.format(self.voucher_type, self.voucher_no, self.account))
def validate_dimensions_for_pl_and_bs(self):
account_type = frappe.db.get_value("Account", self.account, "report_type")
for dimension in get_checks_for_pl_and_bs_accounts():
if account_type == "Profit and Loss" \
and self.company == dimension.company and dimension.mandatory_for_pl and not dimension.disabled:
if not self.get(dimension.fieldname):
@@ -93,6 +94,25 @@ class GLEntry(Document):
frappe.throw(_("Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}.")
.format(dimension.label, self.account))
def validate_allowed_dimensions(self):
dimension_filter_map = get_dimension_filter_map()
for key, value in iteritems(dimension_filter_map):
dimension = key[0]
account = key[1]
if self.account == account:
if value['is_mandatory'] and not self.get(dimension):
frappe.throw(_("{0} is mandatory for account {1}").format(
frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)), MandatoryAccountDimensionError)
if value['allow_or_restrict'] == 'Allow':
if self.get(dimension) and self.get(dimension) not in value['allowed_dimensions']:
frappe.throw(_("Invalid value {0} for {1} against account {2}").format(
frappe.bold(self.get(dimension)), frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)), InvalidAccountDimensionError)
else:
if self.get(dimension) and self.get(dimension) in value['allowed_dimensions']:
frappe.throw(_("Invalid value {0} for {1} against account {2}").format(
frappe.bold(self.get(dimension)), frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)), InvalidAccountDimensionError)
def check_pl_account(self):
if self.is_opening=='Yes' and \
@@ -120,26 +140,18 @@ class GLEntry(Document):
.format(self.voucher_type, self.voucher_no, self.account, self.company))
def validate_cost_center(self):
if not hasattr(self, "cost_center_company"):
self.cost_center_company = {}
if not self.cost_center: return
def _get_cost_center_company():
if not self.cost_center_company.get(self.cost_center):
self.cost_center_company[self.cost_center] = frappe.db.get_value(
"Cost Center", self.cost_center, "company")
is_group, company = frappe.get_cached_value('Cost Center',
self.cost_center, ['is_group', 'company'])
return self.cost_center_company[self.cost_center]
def _check_is_group():
return cint(frappe.get_cached_value('Cost Center', self.cost_center, 'is_group'))
if self.cost_center and _get_cost_center_company() != self.company:
if company != self.company:
frappe.throw(_("{0} {1}: Cost Center {2} does not belong to Company {3}")
.format(self.voucher_type, self.voucher_no, self.cost_center, self.company))
if self.cost_center and _check_is_group():
frappe.throw(_("""{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions""")
.format(self.voucher_type, self.voucher_no, frappe.bold(self.cost_center)))
if (self.voucher_type != 'Period Closing Voucher' and is_group):
frappe.throw(_("""{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions""").format(
self.voucher_type, self.voucher_no, frappe.bold(self.cost_center)))
def validate_party(self):
validate_party_frozen_disabled(self.party_type, self.party)
@@ -149,7 +161,7 @@ class GLEntry(Document):
account_currency = get_account_currency(self.account)
if not self.account_currency:
self.account_currency = company_currency
self.account_currency = account_currency or company_currency
if account_currency != self.account_currency:
frappe.throw(_("{0} {1}: Accounting Entry for {2} can only be made in currency: {3}")
@@ -163,7 +175,6 @@ class GLEntry(Document):
if not self.fiscal_year:
self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0]
def validate_balance_type(account, adv_adj=False):
if not adv_adj and account:
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")
@@ -229,7 +240,7 @@ def update_outstanding_amt(account, party_type, party, against_voucher_type, aga
def validate_frozen_account(account, adv_adj=None):
frozen_account = frappe.db.get_value("Account", account, "freeze_account")
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
if frozen_account == 'Yes' and not adv_adj:
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,
'frozen_accounts_modifier')
@@ -279,4 +290,8 @@ def rename_temporarily_named_docs(doctype):
oldname = doc.name
set_name_from_naming_options(frappe.get_meta(doctype).autoname, doc)
newname = doc.name
frappe.db.sql("""UPDATE `tab{}` SET name = %s, to_rename = 0 where name = %s""".format(doctype), (newname, oldname))
frappe.db.sql(
"UPDATE `tab{}` SET name = %s, to_rename = 0 where name = %s".format(doctype),
(newname, oldname),
auto_commit=True
)

View File

@@ -125,6 +125,7 @@ class InvoiceDiscounting(AccountsController):
make_gl_entries(gl_entries, cancel=(self.docstatus == 2), update_outstanding='No')
@frappe.whitelist()
def create_disbursement_entry(self):
je = frappe.new_doc("Journal Entry")
je.voucher_type = 'Journal Entry'
@@ -174,6 +175,7 @@ class InvoiceDiscounting(AccountsController):
return je
@frappe.whitelist()
def close_loan(self):
je = frappe.new_doc("Journal Entry")
je.voucher_type = 'Journal Entry'

View File

@@ -1,7 +1,7 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:title",
"creation": "2018-11-22 22:45:00.370913",
"doctype": "DocType",
"document_type": "Setup",
@@ -20,8 +20,7 @@
"in_list_view": 1,
"label": "Title",
"no_copy": 1,
"reqd": 1,
"unique": 1
"reqd": 1
},
{
"fieldname": "taxes",
@@ -33,12 +32,14 @@
{
"fieldname": "company",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Company",
"options": "Company",
"reqd": 1
}
],
"modified": "2020-09-18 17:26:09.703215",
"links": [],
"modified": "2021-03-08 19:50:21.416513",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item Tax Template",
@@ -81,5 +82,6 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}

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