Compare commits

..

1140 Commits

Author SHA1 Message Date
Deepesh Garg
47e786ef62 fix: Rounding Adjustment GL entry fix (#19839)
* fix: Rounding Adjustment GL entry fix

* fix: Spacing in tab

* fix: Comment fix
2019-12-11 09:06:37 +05:30
Deepesh Garg
f10be395c1 fix: NoneType' object has no attribute '__getitem_'_ (#19860) 2019-12-11 09:06:25 +05:30
sahil28297
14018b3dea bumped to version 12.2.2 2019-12-02 13:05:27 +05:30
rohitwaghchaure
91f2cfb999 Merge pull request #19769 from rohitwaghchaure/sales_invoice_none_type_error_serial_no_validation
fix: Serial no validation against sales invoice
2019-12-02 09:46:23 +05:30
deepeshgarg007
c0a0331570 fix: Validation msg 2019-12-02 09:43:11 +05:30
deepeshgarg007
4ceba43e43 fix: Serial no validation against sales invoice 2019-12-02 09:43:04 +05:30
Marica
5d2ad7fc38 fix: UOM was not fetching in purchase invoice (#19732) (#19737)
* fix: UOM was not fetching in purchase invoice

* fix: Changes requested

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2019-11-28 20:00:51 +05:30
rohitwaghchaure
3347473aa1 fix: removed stock value and account balance out of sync validation (#19728) 2019-11-28 20:00:41 +05:30
Rohit Waghchaure
7f951b5595 fix: revert value out of sync feature 2019-11-28 20:00:33 +05:30
Nabin Hait
e0912e4fcc Merge branch 'v12-pre-release' into version-12 2019-11-25 15:11:24 +05:30
Nabin Hait
4d12f8acab bumped to version 12.2.0 2019-11-25 15:31:23 +05:50
Nabin Hait
c856cb85d9 log: Change log for v12.2.0 2019-11-25 15:08:47 +05:30
Nabin Hait
35e8d1e1d7 Stock acc bal sync msg (#19676)
* fix: Prefilled JV via Account Balance and Stock Value mismatch error message

- Make JV button will route to Journal Entry and add rows in child table

* fix: make journal entry to sync stock and account balance

* fix: translated action label
2019-11-25 14:02:51 +05:30
Saqib
cd3976f7d2 Asset cancellation fix (#19671)
* fix: remove asset movement mandatory fields

* fix: label for reference doctype
2019-11-25 12:24:34 +05:30
Saqib
f37a46edea Fixed Asset Refactor Review fixes (#19665)
* fix: fixed asset item creation ux fixes

* fix: auto creation of asset ux fixes

* fix: [LCV] incorrect condition when checking assets linked with PR

* fix: bulk update assets

* refac: remove company level cwip enabling
* cwip can be enabled only on category level

* fix: #19649
2019-11-22 16:32:50 +05:30
thefalconx33
fa42999314 fix: last purchase rate greater than selling price 2019-11-22 12:15:41 +05:30
Nabin Hait
7af153da50 fix: Multiple fixes related to landed cost accounting (#19656) 2019-11-22 11:35:14 +05:30
Saqib
150c44b350 fix: asset movement ux fixes (#19641) 2019-11-22 11:08:35 +05:30
rohitwaghchaure
225d38e797 Merge pull request #19634 from rohitwaghchaure/cherry-pick_of_item_query_issue
Cherry pick of item query issue
2019-11-21 11:05:13 +05:30
Rohit Waghchaure
a831848074 fix: code cleanup 2019-11-20 19:42:27 +05:30
Rohit Waghchaure
eed30c6d8c fix: not able to select item in sales order 2019-11-20 19:42:11 +05:30
Nabin Hait
9db9edca2c fix(expense claim): fetch outstanding documents based on party account type 2019-11-19 18:44:54 +05:30
Mangesh-Khairnar
3f854fce2e feat: fetch leave approver from both employee and department approvers (#19613)
* fix: fetch leave approvers from both department and employee master

* fix: creaate a set of approvers
2019-11-19 15:07:30 +05:30
RJPvT
a998978415 fix: pending on review date (#19609)
* fix: On Specific case if no item code in name

* fix: pending on review date
2019-11-19 14:54:38 +05:30
Deepesh Garg
87c6718d90 fix: Book valuation expense in specified account rather than expense included in valuation account (#19590)
* fix: Book valuation expense in specified accout rather than expense included in valuation account

* fix: Remove undefined variable

* fix: Test cases

* fix: Test Case
2019-11-18 12:34:30 +05:30
Saqib
d995609ffa Fixed asset refactor (#19369)
* refactor: Asset Movement with multiple assets using table

* refactor: Create Asset Movement from Asset List & Linking PR/PI with Asset

* feat: Auto create asset on Purchase checkbox

* refactor: LCV for asset created via PR/PI

* refactor: get asset category accounts from item master

* refactor: Purchase Receipt for asset purchasing

* refactor: Purchase Invoice for asset purchasing

* fix: post-refactor delete fixes

* refactor: moved asset validation from pr/pi on asset submission

* fix: Asset Category should be defined for auto purchasing assets

* fix: undo serial_no_update removal (for non asset item) from LCV

* fix: remove duplicate calls from item.js

* fix: args position of all occurrence of get_asset_category_account()

* fix: test cases

* fix: landed cost voucher validations

* refactor: test case for auto creation of asset

* fix: removed invalid assertions

* fix: patch errors on travis

* fix: codacy fixes

* fix: PI Items not fetching details from item

* fix: asset movement from list view having default purpose 'Receipt'

* chore: msgprint for selecting item code first while creating asset manually

* fix: alert messages

* minor: asset movement fixes

* fix: lcv was made against submitted assets

* minor: ux fixes

* refac: move specific asset validation to SINV

* chore: remove make_purchase_invoice from asset form
* make asset movement on asset submission
* add PR & PI queries based on item code

* refac: not allow last movement cancellation
* move asset movement creation on asset submission
* asset movement naming series
* add tests

* fix: code review changes

* chore: remove unecessary asset movement updation

* refac: setting latest location while making asset movements
* Added extra validations

* fix: form dashboard make lcv button

* fix: auto asset movement creation validation

* fix: allow lcv against other items after removing submitted assets

* chore: remove unwanted condition

* fix: mismatch debit credit on  purchase of asset with valuation tax

* chore: toggle required field based on movement type

* chore: fix lcv error message

* fix: travis failing

* fix: travis failing test

* fix: wrong conditions after merge

* fix: cannot cancel assets

* fix: travis failing* fix change in deletion of assets

* fix: codacy

* fix: process cancellation of assets

* refac: cancellation of pr only deletes auto created assets

* fix: incorrect query
2019-11-18 11:46:55 +05:30
rohitwaghchaure
6424416886 fix: sales order item shwoing incorrect produced qty (#19584) 2019-11-15 14:18:45 +05:30
Anurag Mishra
28a7ce9a50 fix: On Specific case if no item code in name 2019-11-15 14:01:07 +05:30
rohitwaghchaure
16f6ca12a7 Merge pull request #19023 from Alchez/dev-work-order-bugs
fix: Work Order operating cost re-calculation on client-side (develop)
2019-11-15 11:19:10 +05:30
rohitwaghchaure
c74c5d5644 Merge pull request #19583 from rohitwaghchaure/fixed_stock_rec_showing_incorrect_current_qty_and_serial_no
fix: stock reconciliation showing incorrect current serial no and qty
2019-11-15 10:17:11 +05:30
Deepesh Garg
0a23e1aea5 Merge pull request #19586 from prssanna/dashboard-fix
fix: Ignore Period Closing Voucher entries in Accounts dashboard
2019-11-15 08:21:02 +05:30
prssanna
74bbcb539f fix: Ignore period closing voucher entries in accounts dashboard 2019-11-14 22:47:58 +05:30
Mangesh-Khairnar
f1e6387fab Merge pull request #19585 from frappe/leave-approver-employee-fix
fix: fetch approver from employee
2019-11-14 19:28:22 +05:30
Mangesh-Khairnar
d545f6fb6b fix: fetch approver from employee 2019-11-14 19:26:49 +05:30
Rohit Waghchaure
cf55c9c6da fix: stock reconciliation shwoing incorrect current serial no and qty 2019-11-14 18:22:20 +05:30
Marica
c9e8a1bf96 fix: Account Balance and Stock Value out of sync error message (#19526)
* fix: Account Balance and Stock Value out of sync error message

Added 'Make Adjustment Entry' button and enhanced message

* fix: Split message and changed routing for translation
2019-11-14 16:13:43 +05:30
rohitwaghchaure
e942f99897 Update work_order.js 2019-11-14 15:26:18 +05:30
Nabin Hait
ec082754b4 fix: One serial no can be tagged in multiple invoices if used against different items (#19580) 2019-11-14 13:28:24 +05:30
Deepesh Garg
d69d0e3046 fix(patch): skip leave ledger entry creation for denied leaves (#19579) 2019-11-14 13:05:13 +05:30
Mangesh-Khairnar
fc3b924d4d fix: skip leave ledger entry creation for denied leaves (#19556)
* fix: skip leave ledger entry creation for denied leave application

* patch: remove incorrect leave ledger entries

* fix: create reverse ledger entry before setting status to cancel
2019-11-14 12:02:10 +05:30
Himanshu
5503b6cff5 fix(Task): Do not create/schedule task after project end (#19184)
* fix: do not create/schedule task after project end

* fix: check difference between dates

* fix: check project date

* fix: task creation

* fix: tests
2019-11-14 10:11:25 +05:30
Saqib
73616d6b33 fix: duplication while bulk creation of item tax template (#19570) 2019-11-14 10:09:44 +05:30
Deepesh Garg
95a6320459 Merge pull request #19576 from marination/cwip-patch-fix
fix(patch): Enable CWIP Accounting
2019-11-13 22:18:12 +05:30
Himanshu
1ad2d4a962 fix: get tags for rfq (#19564)
* fix: get tags for rfq

* chore: remove console log
2019-11-13 19:21:52 +05:30
marination
9ffa9d4a64 fix(patch): Enable CWIP Accounting 2019-11-13 19:10:20 +05:30
Mangesh-Khairnar
af7fe1937e fix: fetch leave approver defined in employee in leave application (#19559)
* fix: fetch leave approver defined in employee in leave application

* Update department_approver.py
2019-11-13 19:00:56 +05:30
Saqib
3e515e704d Monthly distribution of depreciation amount (#19493)
* feat: allow monthly distribution of depreciation amount

* chore: added comments

* fix: monthly depr was not starting from use date's month
2019-11-13 19:00:24 +05:30
rohitwaghchaure
94565d69d1 fix: travis failing (#19568) 2019-11-13 18:58:22 +05:30
Nabin Hait
732d6afad5 fix: Show AR summary based on outstanding (#19573) 2019-11-13 18:49:23 +05:30
rohitwaghchaure
d064505ebe fix: incorrect produced qty in the production plan (#19569) 2019-11-13 18:17:48 +05:30
rohitwaghchaure
ba8fc21594 fix: merge similar entries for serialized items in stock reconciliation (#19408) 2019-11-13 18:11:58 +05:30
Nabin Hait
3a72cb46bc fix: Set due date in accounts receivable based on payment terms (#19563) 2019-11-13 17:58:10 +05:30
Deepesh Garg
082bfb8cb3 Merge pull request #19567 from deepeshgarg007/balance_sheet_develop
fix: Accumulated Values filter disappearing
2019-11-13 17:46:46 +05:30
deepeshgarg007
5ea4328359 fix: Accumulated Values filter disappearing 2019-11-13 13:23:49 +05:30
Rohan
4d27b50437 Merge branch 'develop' into dev-work-order-bugs 2019-11-13 13:09:12 +05:30
rohitwaghchaure
ffbfaf7099 fix: email digest showing incorrect upcoming events (#19552) 2019-11-13 10:59:23 +05:30
Mangesh-Khairnar
06c8129574 fix(batch): fetch company on splitting the batch (#19558) 2019-11-13 10:51:43 +05:30
Marica
d00c59830e feat: Disable CWIP Accounting checkbox added in Company and Asset Category (#19262)
* feat: Disable CWIP Accounting checkbox added in Company and Asset Category

Asset Settings is removed completely
Disable CWIP Accounting checkbox will give priority to Asset Category

* fix: Changed checkbox name to 'Enable Capital Work in Progress Accounting'

- checkbox will be disabled by default
- Enabling it in Company will globally enable it
- When globally disabled , it's value on the asset category will be considered

* chore: Added patch to set pre-existing CWIP checkbox value into new checkbox

* fix(test): Asset

* fix: Asset Test and Patch

* fix(test): Opening Invoice Creation Tool

* Update asset.py

* fix: Patch and other fixes
2019-11-12 19:17:43 +05:30
rohitwaghchaure
010714757c fix: '<' not supported between instances of 'str' and 'NoneType' (#19553) 2019-11-12 18:20:07 +05:30
MorezMartin
4fa6194009 feat: [production_plan -> fetching item description] Fetch item description from Material Request or Sales Order (#19541)
* Change packed item

* Remove description field on update_packed_items

* add possibility to modify description on packed items

* Fetch description from Material Request or Sales Order in production plan, add the possibility to modify the description un production plan

* sync with fork

* Fetch description from Material Request or Sales Order in production plan, Add the possibility to modify description in production plan

* code cleaning syncing fork

* code cleaning syncing fork

* code cleaning syncing fork

* code cleaning syncing fork

* rewied and add item_details.description in case of blank field
2019-11-12 18:19:01 +05:30
Marica
29a2e16f62 fix: Add Serial No. button not responding (#19550) 2019-11-12 14:43:41 +05:30
Deepesh Garg
3cc3b57926 fix: Expense claim paid through employee advance getting fetched as outstanding in Payment Entry (#19427)
* fix: Expense claim paid through employee advance getting fetched as outstanding in Payment Entry

* fix: Codacy

* fix: Minor UX fixes

* fix: Also credit payable amount in case of advance payment

* fix: Against voucher in GL enrty
2019-11-12 14:32:50 +05:30
Deepesh Garg
2689acfc8e Merge pull request #19549 from DeeMysterio/v12-emp-err
fix(employee): show only active employees in the error display while …
2019-11-11 21:50:07 +05:30
Diksha
39152f935c fix(employee): show only active employees in the error display while marking a reporting to employee as left 2019-11-11 19:22:51 +05:30
rohitwaghchaure
001ee5ee1b fix: dictionary changed size during iteration (#19546) 2019-11-11 17:43:48 +05:30
Mitchy25
a227b9a9a6 Fix Bank Reconcilaition for Payment Entries (#19190)
* Fix Bank Reconciliation with Payment Entries

* Update bank_reconciliation.js
2019-11-11 17:29:53 +05:30
ci2014
8b2223ae5f Move add_custom_button for Gantt and Kanban Board (#19193)
Move add_custom_button for Gantt and Kanban Board to set_buttons, because in onload it is not working.
2019-11-11 17:27:48 +05:30
Nabin Hait
f997b443e1 Merge branch 'finbyz-develop' into develop 2019-11-11 17:20:28 +05:30
Nabin Hait
4c7ac65db1 fix: Made Campaign for field mandatory 2019-11-11 17:19:52 +05:30
FinByz Tech Pvt. Ltd
88de00fb94 Rendered Email template in email Campaign 2019-11-11 17:17:21 +05:30
Tufan Kaynak
06c6f7cfd3 fix: Currency Exchange for_selling and for_buying on the same day (#19339)
* fix: test data of Currency Exchange to incluse buying and selling

test data of Currency Exchange to incluse buying and selling

* fix: Currency Exchange Test corrected to include selling and buying exchange_rate

Currency Exchange Test corrected to include selling and buying exchange_rate

* fix: Currency Exchange for_selling and for_buying fields test and functionality restored


In this fix:
* You can now add a separate exchange_rate in date for_selling and for_buying. You could not before because the unique field name was only calculated to allow a single name for a date
* tests did not account for for_selling and for_buying fields and thier uniqueness

* Update test_currency_exchange.py

* Update test_records.json

* fix: update test_records.json

* Update test_records.json

* The basic package for turkey is defined. It is empty now but applications specific to Turkey will be created under that package.

* fix: update code with scapes vs.tabs

updated the code regarding spaces issue

* Update currency_exchange.py
2019-11-11 17:11:16 +05:30
Saurabh
d3ed499854 Merge pull request #19416 from EconCode/shopify-connector-unregisterfix
fix: unregistering url wrong formatted string
2019-11-11 17:04:44 +05:30
Nabin Hait
32936024a0 patch: set default for add taxes from item tax template 2019-11-11 15:44:27 +05:30
Nabin Hait
8bd2d4d35e fix(trial balance): Show opening and closing of group account in single column (#19509) 2019-11-11 10:59:20 +05:30
rohitwaghchaure
df75b7693a fix: added description, uom fields in material request plan item table (#19463) 2019-11-11 10:59:10 +05:30
Mangesh-Khairnar
2f44480d69 enhancement: Item-wise sales history report (#19500)
* refactor(item-wise-sales-history): convert query report to script report

* refactor: add columns, fetch data

* refactor: shift company set func to utils

* fix: add filters

* fix: minor changes

* fix: fetch all the descendants
2019-11-11 10:54:12 +05:30
rohitwaghchaure
090f9a3dc9 Merge pull request #19533 from rohitwaghchaure/fixed_precision_issue_while_updating_qty_and_rate
fix: precision issue
2019-11-08 14:54:58 +05:30
rohitwaghchaure
b81942404d fix: incorrect balance qty in stock ledger if batch filter set (#19479) 2019-11-08 14:50:48 +05:30
rohitwaghchaure
d36c6068b2 fix: 'NoneType' object has no attribute 'stock_uom' (#19532) 2019-11-08 14:43:53 +05:30
Rohit Waghchaure
e93dc9f1cd fix: precision issue 2019-11-08 13:43:15 +05:30
Deepesh Garg
7a23057eab feat: Enhancement in landed cost voucher (#19252)
* feat: Enhancement in landed cost voucher

* fix: Make GL entries based on ledgers in Landed cost voucher

* fix: Patch to update expense account in Landed Cost Voucher and Stock Entry

* fix: Ability to select expense account in Stock Entry

* fix: Renaming and test case fixes

* fix: Test Cases

* fix: Additional cost in Stock Entry

* fix: Changed filters and test case fixes

* fix: Upadte filters in stokc entry expense account filter

* fix: company filter
2019-11-08 12:52:54 +05:30
Deepesh Garg
7aef9f3b43 fix: Accounting Dimension custom fields should be admin owned (#19525)
* fix: Accounting Dimension custom fileds should be admin owned

* fix: Update query

* fix: Travis
2019-11-08 12:42:38 +05:30
Deepesh Garg
a839510b33 Merge pull request #19528 from deepeshgarg007/gst_check_digit_msg
fix: GSTIN validation msg fix
2019-11-07 23:05:23 +05:30
deepeshgarg007
62fbf37eb4 fix: GSTIN validation msg fix 2019-11-07 21:54:25 +05:30
Deepesh Garg
4a6c723310 Merge pull request #19527 from deepeshgarg007/gstr_1_error_fix
fix: Exception handling in GSTR-1 Report
2019-11-07 20:19:29 +05:30
deepeshgarg007
015285c42f fix: Exception handling in GSTR-1 Report 2019-11-07 19:38:52 +05:30
Rucha Mahabal
b455318f01 fix(Integration): Woocommerce issues (#19487)
* fix: Delivery URL returned response code 500

* fix: set default company in Woocommerce Settings

* fix: remove redundant function calls

* fix: make offset configurable for delivery date in sales order

* fix: remove redundant code from woocommerce_settings.py

* fix: import create_custom_field

* fix: added ignore_mandatory for saving item, customer and sales order

* fix: remove unused woocommerce_check custom field

* fix: do not delete custom fields or item group when sync is disabled
2019-11-07 18:20:32 +05:30
Nabin Hait
628701f1a5 fix: Accounts mandatory depending on share transfer type (#19523) 2019-11-07 18:05:40 +05:30
Himanshu
bac50bc295 fix: remove validate for issue priority (#19522) 2019-11-07 18:04:50 +05:30
Saurabh
28c6a0aeb1 fix: reload global defaults (#19517) 2019-11-07 14:16:26 +05:30
rohitwaghchaure
15382a6f71 Merge pull request #19518 from sahil28297/fix_cart
fix(cart): return rule instead of rule_label_map
2019-11-07 13:03:41 +05:30
Marica
52d888de42 fix[minor]: Payment Entry status patch (#19519) 2019-11-07 13:01:45 +05:30
Marica
e37a67245e fix: Sales and Purchase Invoice Status, Payment Reconciliation Credit/Debit Note (#19388) 2019-11-07 12:52:23 +05:30
Sahil Khan
1c44bb0982 fix(cart): return rule instead of rule_label_map 2019-11-07 12:38:05 +05:30
theopen-institute
36520ef951 fix: Add a setting to make creation of new Student User optional (#19122)
* New setting to skip Student User creation

* Allow skip of new User creation via settings
2019-11-06 19:09:15 +05:30
Raffael Meyer
edba06038e feat(regional): enable transaction log for germany (#19198) 2019-11-06 19:07:04 +05:30
Mitchy25
a5776d16b4 fix: Version 12 Bank Reconciliation fix (#19182)
* Fix Bank Reconciliation

Change fixes Bank Rec upload as well as the duplicatation of bank_account and company filters

* Update bank_reconciliation.js

Removing incorrect fix to filters.

Filters are loaded from Bank Transaction List.

* Update bank_reconciliation.js
2019-11-06 19:04:54 +05:30
Suraj Shetty
7508896bfb perf: Optimise BOM Update Tool (#19236)
* perf: Optimize BOM update tool
- Remove redundant traverse_tree calls
- Cache bom_children data

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

* fix: Replace get_list with db.sql

* fix: Enable versioning for updated BOM

* fix: Directly save doc_before_save from bom obj instead of using  load_doc_before_save

* fix: recurssion check performance issue
2019-11-06 18:46:57 +05:30
Mangesh-Khairnar
a709ae894c feat: duplicate linked task in project (#19271)
* feat: create a duplicate project

* fix: allow duplication via form

* feat: fetch old task and link project

* fix: link task with project

* fix: parse json string as python object

* fix: avoid duplicate task based on the project template

* fix: ask user for the new project name

* fix: display a descriptive message on switching to a new route

* fix: override duplicate in menu

* fix: check for duplicate project name after submitting prompt

* fix: set the project template

* fix: minor changes

* fix: function call

* refactor: add a separate button for duplicate

* Update project.js
2019-11-06 18:20:06 +05:30
Deepesh Garg
02b9472152 Merge pull request #19490 from prssanna/dashboard-fix
fix: fix dashboard with date range
2019-11-06 18:17:08 +05:30
Marica
1beed7db72 fix: Added 'status' field in Payment Entry (#19507) 2019-11-06 18:12:29 +05:30
Shivam Mishra
d743583bf4 fix: contact creation and fetching for shopping cart (#19510) 2019-11-06 18:03:03 +05:30
rohitwaghchaure
0c12eded05 Merge pull request #19505 from rohitwaghchaure/credit_limit_not_defined_in_accounts_receivable_report
fix: unknown column credit limit in accounts receivable report
2019-11-06 17:26:35 +05:30
Deepesh Garg
f67833f249 Merge pull request #19492 from gavindsouza/invoice-creation-tool-py3
fix: invoice creation tool of invoices with no paid and outstanding amounts
2019-11-06 16:40:04 +05:30
rohitwaghchaure
6a50c92087 Update accounts_receivable.js 2019-11-06 16:34:17 +05:30
rohitwaghchaure
e123ec6b45 fix: incorrect number of entries while making deferred revenue entry (#19473) 2019-11-06 15:25:00 +05:30
Saqib
01c19d3b93 internal issues (#19496)
* fix: user remark mandatory in quick entry but not in form

* fix: preview salary slip btn showing in draft and unsaved states

* minor: removed unecessay comma

* fix: department analytics report showing departments of all companies
2019-11-06 14:41:16 +05:30
Rohit Waghchaure
dec5bead9c fix: unknown column credit limit in accounts receivable report 2019-11-06 13:13:31 +05:30
Rohan
f527713b89 Merge branch 'develop' into dev-work-order-bugs 2019-11-06 11:39:24 +05:30
rohitwaghchaure
57f2dce682 Merge pull request #19502 from rohitwaghchaure/removed_in_flag_test_while_creating_default_account
fix: code cleanup
2019-11-05 14:56:01 +05:30
Rohit Waghchaure
730c8a145d minor: code cleanup 2019-11-05 12:46:52 +05:30
Prssanna Desai
167aa7655d Merge branch 'develop' into dashboard-fix 2019-11-04 15:42:20 +05:30
Gavin D'souza
05710804cf fix: invoice creation tool of invoices with no paid and outstanding amounts 2019-11-04 14:45:11 +05:30
Deepesh Garg
50b6976c67 Merge pull request #19488 from DeeMysterio/dev-delivery-dn
fix(sales order): rename delivery to delivery note on sales order mak…
2019-11-04 13:17:12 +05:30
prssanna
7e2b030052 fix: fix dashboard with date range 2019-11-04 13:07:27 +05:30
Diksha
7091a2102c fix(sales order): rename delivery to delivery note on sales order make button 2019-11-04 12:03:35 +05:30
Deepesh Garg
b565e9ba64 Merge pull request #19309 from sagargharge/develop
fix: restricted duplicate guardians on student doctype (#19194)
2019-11-04 09:04:29 +05:30
rohitwaghchaure
475d8e3cdc Merge pull request #19477 from rohitwaghchaure/production_plan_warehouse_not_changed
fix: Wrong warehouse fetched in production plan
2019-11-01 16:46:46 +05:30
Deepesh Garg
0bcf8b64f6 Merge pull request #19422 from marination/search-field
fix: Search field entries included in Item Link field query
2019-11-01 15:38:25 +05:30
Rohit Waghchaure
1bb5d01192 fix: Wrong warehouse fetched in production plan 2019-11-01 14:24:21 +05:30
Deepesh Garg
ebf46120ba Merge pull request #18985 from Alchez/dev-serial-no-statuses
feat: add statuses for Serial No
2019-11-01 14:16:45 +05:30
deepeshgarg007
c82aed0718 fix: Add missing semicolon 2019-11-01 12:36:33 +05:30
Deepesh Garg
9378aacbe5 Merge pull request #17151 from Alchez/develop-company-address-label
fix(selling): Add missing label to company address field
2019-11-01 11:56:08 +05:30
Deepesh Garg
3cbd70a1d9 Merge pull request #19316 from joelios/develop
fix: Unable to create timesheet from project dashboard
2019-10-31 23:28:13 +05:30
Deepesh Garg
2ec7acb592 Merge pull request #19294 from vijaywm/duplicate-attendance
fix: Typo in attendance date filter
2019-10-31 16:46:52 +05:30
Ashish Shah
28710cdf99 fix: coupon code changes suggested by prasad (#19352)
* changes suggested by prasad

* codacy correction
2019-10-31 16:09:06 +05:30
Mangesh-Khairnar
45c18b3184 fix: fetch employee department (#19433) 2019-10-31 16:00:52 +05:30
Suraj Shetty
519ca54f53 feat: Show timesheets related to customer's projects on customer portal (#19443)
* fix: Show timesheets related to customer's projects on customer portal

* style: fix codacy
2019-10-31 16:00:04 +05:30
Suraj Shetty
77e4cf89f8 fix: Pass parent_acc_name (#19450) 2019-10-31 15:57:31 +05:30
deepeshgarg007
4a1d000c33 fix: Test Case 2019-10-31 15:57:15 +05:30
rohitwaghchaure
81c217584a fix: purchase order issue, margin_rate_or_amount not there in the purchase documents (#19466) 2019-10-31 15:56:10 +05:30
Anurag Mishra
a11e738801 feat: Stock value and account balance sync. (#19233)
* feat: Allow user to sync stock_value and account_balance jv if perpetual inventory is checked

* fix(test): Sales Invoice

* fix(test): Purchase Invoice

* fix(test): Delivery Note

* fix: more test_case

* fix(test): Stock Entry

* fix(test): Purchase Receipt

* fix(more-test): Stock Entries

* fix(more-test): Sales Invoice and Delivery Note

* fix: tests for delivery note

* fix: tests for stock reconciliation

* refactor: stock and account balance function

* fix(more-test): Warehouse

* fix(test): Landed Cost Voucher

* fix: changes requested
2019-10-31 15:55:03 +05:30
gavin
7e9b90ad06 Merge pull request #19448 from gavindsouza/hooks-update
chore: moves email digest to long job from regular
2019-10-31 14:35:14 +05:30
gavin
450da16dc2 Merge branch 'develop' into hooks-update 2019-10-31 11:26:37 +05:30
rohitwaghchaure
139c20a736 Merge pull request #19454 from rohitwaghchaure/fix_item_price_stock_report_not_working_v12
fix: item price stock report not working
2019-10-30 22:30:10 +05:30
marination
1e754b161c fix: Fetching catched meta and removed description fetch from Search Fields
Description is conditionally fetched and also used in WHERE clause, that is maintained.
Improved naming
2019-10-30 18:33:44 +05:30
gavin
8ed6772727 Merge branch 'develop' into hooks-update 2019-10-30 17:52:36 +05:30
gavin
ad04d442a1 Merge pull request #19442 from 0Pranav/maintainance-ux-fix
fix: maintenance schedule ux
2019-10-30 17:51:55 +05:30
rohitwaghchaure
99c8245512 Merge pull request #19456 from frappe/revert-19432-showing_untitled_name_in_item_tax_template
Revert "fix: patch, item tax template showing 'Untitled' in the name"
2019-10-30 17:38:02 +05:30
rohitwaghchaure
6bd6039496 Revert "fix: patch, item tax template showing 'Untitled' in the name" 2019-10-30 17:37:22 +05:30
Pranav Nachnekar
c02cb6ca94 Merge branch 'develop' into maintainance-ux-fix 2019-10-30 11:15:44 +00:00
rohitwaghchaure
1545ee914a Merge pull request #19432 from rohitwaghchaure/showing_untitled_name_in_item_tax_template
fix: patch, item tax template showing 'Untitled' in the name
2019-10-30 16:33:56 +05:30
rohitwaghchaure
7b6ab9738d Merge pull request #19446 from rohitwaghchaure/not_able_to_select_project_in_work_order
fix: not able to select the project in the work order
2019-10-30 16:32:34 +05:30
Rohit Waghchaure
d8b64cd199 replaced frappe.db.sql with frappe.get_all 2019-10-30 16:27:58 +05:30
Rohit Waghchaure
2e01573a40 fix: item price stock report not working 2019-10-30 16:22:30 +05:30
Deepesh Garg
fac4eb919b Merge pull request #19445 from scmmishra/typo-fix
fix: typo in production plan
2019-10-30 16:03:56 +05:30
gavin
e0348c9ec8 Merge branch 'develop' into hooks-update 2019-10-30 15:46:46 +05:30
Pranav Nachnekar
66e5e16a2e Merge branch 'develop' into maintainance-ux-fix 2019-10-30 09:54:47 +00:00
Gavin D'souza
d38f5374cb chore: moved email digest to long job 2019-10-30 14:43:58 +05:30
Mangesh-Khairnar
83c7b5b44b fix(bom): maintain a default bom for an item (#19407) 2019-10-30 14:25:50 +05:30
Mangesh-Khairnar
7638788c2f fix: calculate pending leaves (#19411) 2019-10-30 14:23:41 +05:30
Rohit Waghchaure
486a8f67a4 fix: not able to select the project in the work order 2019-10-30 14:22:49 +05:30
Anurag Mishra
5c9d92eabf fix: On Specific case if no item code in name (#19419) 2019-10-30 14:18:16 +05:30
Shivam Mishra
afa03fd654 Merge branch 'develop' into typo-fix 2019-10-30 14:08:20 +05:30
Shivam Mishra
d8abac3278 fix: typo in production plan 2019-10-30 14:06:56 +05:30
0Pranav
c8333d4b41 fix: codacy 2019-10-30 13:48:01 +05:30
0Pranav
07b74533fe fix: error message matches field name 2019-10-30 13:47:49 +05:30
Faris Ansari
e127d937f7 fix(ExpenseClaim): List filter config for Rejected and Unpaid (#19434) 2019-10-30 13:31:05 +05:30
0Pranav
da5bf5a7c4 fix:indentation 2019-10-30 11:24:58 +05:30
0Pranav
be5c6e7aec fix:readability 2019-10-30 11:14:49 +05:30
0Pranav
0f0d6ce25c Remove doctype related to appointment scheduling 2019-10-30 11:08:09 +05:30
Deepesh Garg
d0003408c4 Merge pull request #19438 from ahmadRagheb/patch-1
fix:  getdate get imported twice
2019-10-30 10:58:12 +05:30
0Pranav
846c03889e fix: hide schedule section on new forms 2019-10-30 10:51:25 +05:30
0Pranav
d2d0100c9a fix:better error message when sales person is none 2019-10-30 10:48:13 +05:30
0Pranav
abbc08cb48 fix: hide generate schedule button on new forms 2019-10-30 10:46:16 +05:30
ahmadRagheb
2a72d1fee4 Update salary_slip.py
getdate imported twice
2019-10-29 19:49:08 +02:00
Rohit Waghchaure
b051fa37df fix: patch, item tax template showing 'Untitled' in the name 2019-10-29 14:56:03 +05:30
Faris Ansari
bcf107b9f7 chore: fix unexpected keyword in shopify_settings (#19430)
chore: fix unexpected keyword in shopify_settings
2019-10-29 14:25:37 +05:30
Deepesh Garg
118f2c7d64 Merge pull request #19402 from Mangesh-Khairnar/fix-dn-status
fix: sync delivery note status in both list view and form view
2019-10-29 14:17:38 +05:30
Chinmay D. Pai
702f9f929b chore: rename undefined variable in shopify_log
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-10-29 13:30:13 +05:30
Chinmay D. Pai
4f7885f1aa chore: fix unexpected keyword in shopify_settings
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-10-29 13:20:17 +05:30
rohitwaghchaure
3270ba6d8c Merge pull request #19421 from rohitwaghchaure/account_not_set_for_dasboard_chart_v12
fix: 'NoneType' object is not iterable
2019-10-29 11:30:22 +05:30
Rohan
8728e94dbd Merge branch 'develop' into develop-company-address-label 2019-10-29 11:26:00 +05:30
Rohan
379f38e1cd Merge branch 'develop' into dev-work-order-bugs 2019-10-29 11:25:53 +05:30
Rohan
fba7cae2c9 Merge branch 'develop' into dev-serial-no-statuses 2019-10-29 11:25:36 +05:30
Rohit Waghchaure
88d2c97391 fix: default accounts are not added on creation of company 2019-10-28 17:50:31 +05:30
Anurag Mishra
07b908c0c5 patch: Missing Patch for item Tax template 2019-10-28 16:00:24 +05:30
marination
3dbef9de74 fix: Search field entries included in Item Link field query 2019-10-28 15:48:10 +05:30
Rohit Waghchaure
8916916a03 fix: 'NoneType' object is not iterable 2019-10-28 13:00:18 +05:30
Deepesh Garg
9942fcc8cb fix: Better validation msg for difference account in Stock Entry (#19400)
* fix: Better validation msg for difference account

* fix: Make primary info bold
2019-10-28 12:08:31 +05:30
Suraj Shetty
83b58352ce fix: Overwrite default cost center if item has default cost center set. (#19405) 2019-10-28 12:05:30 +05:30
Deepesh Garg
a8358f0342 Merge pull request #19415 from frappe/jaichavan-fix-typo
fix: typo in Budget Variance Report
2019-10-27 18:39:23 +05:30
Deepesh Garg
8e7bb002e2 Merge pull request #19317 from frappe/revert-19265-issue_fix
refactor: Remove ignore_disabled flag from issue doctype
2019-10-27 18:38:53 +05:30
Shivam Mishra
5e14660dda Merge branch 'develop' into revert-19265-issue_fix 2019-10-27 17:36:08 +05:30
Saurabh
53794a9029 Merge pull request #19417 from frappe/v12-pre-release
V12 pre release
2019-10-26 20:06:53 +05:30
Sahil Khan
0c0604b7ee Merge branch 'v12-pre-release' into version-12 2019-10-26 20:02:19 +05:30
Sahil Khan
e6f86c934d bumped to version 12.1.8 2019-10-26 20:22:19 +05:50
EconCode
07ae3abf34 fix: unregistering url wrong formated string
Fixed the formated string for unregistering webhooks.
String should look like:
"/admin/api/2019-04/webhooks/#{webhook_id}.json"

Taken from shopify api documentation - deleting webhooks:
https://help.shopify.com/en/api/reference/events/webhook?api[version]=2019-04#destroy-2019-04
2019-10-26 16:31:29 +02:00
Sahil Khan
970788c64e Merge branch 'v12-pre-release' of https://github.com/frappe/erpnext into v12-pre-release 2019-10-26 19:56:31 +05:30
Sahil Khan
ce5200d700 bumped to version 12.1.7 2019-10-26 19:56:06 +05:30
Jai Chavan
9f483c1fa9 fix: Spelling of Variance 2019-10-26 18:45:01 +05:30
Saurabh
213785e6d5 Merge pull request #19409 from surajshetty3416/accounting-module-fix
fix: Patch to replace accounting with accounts in home_settings
2019-10-26 11:14:25 +05:30
Suraj Shetty
8f67ef8a75 fix: Add patch to replace accounting with accounts in home_settings 2019-10-25 18:55:57 +05:30
Deepesh Garg
09a6868ccd Merge pull request #19390 from 0Pranav/patch-1
fix: setting incorrect field for party bank account
2019-10-25 12:24:39 +05:30
Ashish Shah
e1f95c0529 fix: allow_items_not_in_stock should be evaluated (#19398) 2019-10-25 12:16:11 +05:30
0Pranav
8c1b88f156 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2019-10-25 11:45:03 +05:30
Aditya Hase
7bdc612013 chore: Update module name (#19404) 2019-10-24 18:01:58 +05:30
Sahil Khan
6d9a300a85 Merge branch 'v12-pre-release' into version-12 2019-10-24 17:30:19 +05:30
Sahil Khan
758635ab91 bumped to version 12.1.7 2019-10-24 17:50:19 +05:50
Mangesh-Khairnar
233c0bc779 fix: sync delivery note status in both list view and form view 2019-10-24 15:46:12 +05:30
rohitwaghchaure
5d0362669d Merge pull request #19386 from rohitwaghchaure/while_making_return_entry_not_able_to_select_null_batch
fix: not able to select the zero qty batch while making the sales ret…
2019-10-23 18:35:58 +05:30
rohitwaghchaure
1da236fdd2 Merge pull request #19322 from ashish-greycube/item_row_link_issue
Item row link issue
2019-10-23 18:06:36 +05:30
Rohan
962f4eb96c Merge branch 'develop' into develop-company-address-label 2019-10-23 15:57:26 +05:30
Pranav Nachnekar
d5166861de fix:setting incorrect field for party bank account
Previously
![wrong](https://user-images.githubusercontent.com/6195660/67369702-0671c000-f569-11e9-9916-a1d1a0c3ddd1.gif)

Corrected
![corrected](https://user-images.githubusercontent.com/6195660/67369663-f9ed6780-f568-11e9-859b-cbfa9857b39e.gif)
2019-10-23 07:46:00 +00:00
Deepesh Garg
d9e27b727f Merge branch 'develop' into item_row_link_issue 2019-10-23 12:20:19 +05:30
Deepesh Garg
275f3f8b91 Merge pull request #19320 from deepeshgarg007/demo-fixes
fix: Demo Script fixes
2019-10-23 12:17:08 +05:30
Deepesh Garg
3f96306986 Merge pull request #19375 from khushalti/develop
fix: date validation, setting up default company, customer/supplier manadatory property on Blanket Order
2019-10-23 12:11:13 +05:30
rohitwaghchaure
5ff377e2bb fix: product link not working in website (#19373) 2019-10-23 11:09:21 +05:30
deepeshgarg007
799f8d4f93 Merge branch 'develop' of https://github.com/frappe/erpnext into demo-fixes 2019-10-23 08:47:11 +05:30
Deepesh Garg
36c97c3128 Merge pull request #19385 from ruchamahabal/fix_moduleview
fix: custom doctypes and reports not visible in Accounts module view
2019-10-22 17:34:38 +05:30
Deepesh Garg
453ad3c155 Merge branch 'develop' into develop 2019-10-22 17:30:13 +05:30
Shivam Mishra
85c028b60d Merge branch 'develop' into revert-19265-issue_fix 2019-10-22 17:26:54 +05:30
Rohan
ee5f0f7c30 Merge branch 'develop' into dev-work-order-bugs 2019-10-22 17:12:00 +05:30
Rohan
8522fdc99c Merge branch 'develop' into dev-serial-no-statuses 2019-10-22 17:11:30 +05:30
gavin
2f63529029 Merge pull request #19384 from gavindsouza/docs-templates
chore(docs): added issue, PR templates, updated SECURITY policy
2019-10-22 15:30:40 +05:30
gavin
e89d4e2b7f Merge branch 'develop' into docs-templates 2019-10-22 15:16:02 +05:30
Nabin Hait
bd6b1806cd fix: fixed asset register report and made skip-dn field hidden 2019-10-22 14:28:37 +05:30
Rohit Waghchaure
d8ddd1e2ec fix: not able to select the zero qty batch while making the sales return entry 2019-10-22 14:05:13 +05:30
Rucha Mahabal
b5bd3f3abf fix: custom doctypes and reports not visible in Accounts module view 2019-10-22 13:38:36 +05:30
Gavin D'souza
ce77c4ac4c fix(docs): link update frappe => erpnext 2019-10-22 13:20:02 +05:30
Gavin D'souza
22bc0a929b chore(docs): Added contribution templates, SECURITY policy 2019-10-22 13:14:57 +05:30
Nabin Hait
bebbc6371b fix: Validation message in work order 2019-10-22 12:35:28 +05:30
0Pranav
d583e412c9 Add generic 'Appointment' doctype 2019-10-22 12:33:09 +05:30
Saurabh
bdc899857c Fix: Shopify payload operations logging (#19366)
* fix: payload logging for shopify

* fix: remove print statements
2019-10-22 12:31:56 +05:30
Anurag Mishra
b7e9e2a1a5 fix: if naming if item-code and index both are same (#19371) 2019-10-22 11:47:03 +05:30
Anurag Mishra
eaff541349 fix: query (#19376) 2019-10-22 11:46:17 +05:30
Deepesh Garg
a324be86d2 Merge branch 'develop' into develop 2019-10-21 21:23:23 +05:30
Khushal Trivedi
e22ca23b81 fix: fix: date validation, setting up default conpany, customer/supplier manadatory property on Blanket Order 2019-10-21 18:17:42 +05:30
gavin
ed8e3b3786 fix: link field country in shopping cart (#19370) 2019-10-21 18:12:29 +05:30
Khushal Trivedi
974f04be24 Merge branch 'develop' of https://github.com/khushalti/erpnext into develop 2019-10-21 17:57:45 +05:30
Khushal Trivedi
ad71307a5e fix: date validation, setting up default conpany, customer/supplier manadatory property on Blanket Order 2019-10-21 17:46:35 +05:30
Khushal Trivedi
ce5c2d8682 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2019-10-21 17:36:19 +05:30
Khushal Trivedi
cdebd400ec [Fix] - changed codacy changers suggested 2019-10-21 16:29:16 +05:30
Saurabh
48eff90d1f fix: Don't show make jv button if equity or liability account and asset account not specified (#19350) 2019-10-21 16:03:28 +05:30
Deepesh Garg
c58d7d8a98 Merge pull request #19363 from rohitwaghchaure/stock_balance_report_not_working_for_stock_recon
fix: stock balance report not working if actual qty is zero
2019-10-21 15:52:40 +05:30
Deepesh Garg
fbae893f07 Merge pull request #19306 from nabinhait/required_date_fix
fix: Always set required date based on min date on item table
2019-10-21 15:25:23 +05:30
Rohit Waghchaure
432b03572a fix: stock balance report not working if actual qty is zero 2019-10-21 13:42:54 +05:30
Abdulla P I
4f4e490d53 fix(HR):adding is_compensatory as default in setup (#19307) 2019-10-21 13:42:17 +05:30
Nabin Hait
dfc10bb5ae fix: Fixed consumed qty based on Stock Ledger Entry (#19305)
* fix: Fixed consumed qty based on Stock Ledger Entry

* Update itemwise_recommended_reorder_level.py
2019-10-21 13:41:42 +05:30
Nabin Hait
dd893254be Update buying_controller.py 2019-10-21 13:40:00 +05:30
Nabin Hait
f2d37a7280 fix: Removed inter-company account filter for inter-company journal entry (#19308) 2019-10-21 13:36:47 +05:30
Nabin Hait
8232bd01d6 fix: Positive qty in sales return print (#19310) 2019-10-21 13:36:26 +05:30
Nabin Hait
49a46f08de fix: Set gross profit in SO item on updating rate after submission (#19311) 2019-10-21 13:35:43 +05:30
Frappe PR Bot
75c5c89909 feat: Updated translation (#19329) 2019-10-21 13:34:14 +05:30
Mangesh-Khairnar
cdf15222e1 fix: half day leave (#19323) 2019-10-21 13:33:46 +05:30
Deepesh Garg
6208755d54 fix: Unable to add details in quotation and opportunity (#19354) 2019-10-21 13:29:44 +05:30
Deepesh Garg
4821f38d25 fix: Item Price changes are not persistent after updating cost on submitted BOM (#19356) 2019-10-21 13:27:40 +05:30
rohitwaghchaure
717ad388be Merge pull request #19319 from deepeshgarg007/asset-fixes-1
fix: Value after depreciation fixes in asset
2019-10-21 12:16:16 +05:30
Deepesh Garg
dc694597f0 Merge branch 'develop' into develop 2019-10-20 22:04:30 +05:30
Deepesh Garg
9474b90fda Merge pull request #19360 from mudux/develop
fix: vitals chart legibility and BMI annotation
2019-10-20 21:56:38 +05:30
Deepesh Garg
721c381df3 Merge branch 'develop' into develop 2019-10-20 18:15:58 +05:30
Deepesh Garg
305ec78c93 Merge pull request #19362 from deepeshgarg007/travis-fix-revert
fix: Travis
2019-10-20 18:15:45 +05:30
deepeshgarg007
737ec6b26e fix: Travis 2019-10-20 17:36:36 +05:30
Mohamud Amin Ali
871193eb62 fix: removed annotations altogether for bmi 2019-10-20 11:50:15 +03:00
Mohamud Amin Ali
02279dff31 fix: appropriate annotations in BMI 2019-10-20 10:46:45 +03:00
Mohamud Amin Ali
43b22b4473 fix: a more legible chart for vitals 2019-10-20 10:34:39 +03:00
Deepesh Garg
c8d9a5305b Merge branch 'develop' into revert-19265-issue_fix 2019-10-20 12:18:34 +05:30
Deepesh Garg
06ace23a32 Merge pull request #18200 from alyf-de/datev_report_headers
feat(regional): enable automatic processing of DATEV reports
2019-10-19 22:56:59 +05:30
Deepesh Garg
979b042675 Merge pull request #19351 from mudux/develop
fix: Vitals chart in Patient History not showing
2019-10-19 17:24:41 +05:30
mudux
0d7359a826 fix: Vitals chart not diplaying 2019-10-19 11:10:42 +03:00
deepeshgarg007
55eff16760 fix: Value after depreciation fixes in asset,
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2019-10-19 12:16:25 +05:30
Deepesh Garg
dcb9c2031b Merge branch 'develop' into datev_report_headers 2019-10-19 11:34:57 +05:30
Khushal Trivedi
d02b026a4d Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2019-10-18 17:04:26 +05:30
Khushal Trivedi
8750caa8e3 [Fix] - if its not multi company set it by default on BO 2019-10-18 17:01:16 +05:30
Rohan Bansal
83740de636 fix(selling): Add missing label to company address field 2019-10-16 15:16:00 +05:30
Rohan
d389ee457c Merge branch 'develop' into dev-work-order-bugs 2019-10-16 15:08:58 +05:30
Rohan
a77f534f7c Merge branch 'develop' into dev-serial-no-statuses 2019-10-16 15:08:57 +05:30
Khushal Trivedi
5f4b6d267c [Fix] - making customer/supplier field manadatory on order type condition on BO 2019-10-16 13:40:58 +05:30
Khushal Trivedi
7084f07dab [Fix] - making customer/supplier field manadatory on order type condition on BO 2019-10-16 13:40:33 +05:30
Khushal Trivedi
1675181e49 [Fix] - making customer/supplier field manadatory on order type condition on BO 2019-10-16 12:02:56 +05:30
Khushal Trivedi
01f8a4966a [Fix] - making customer/supplier field manadatory on order type condition 2019-10-16 11:40:27 +05:30
ashish-greycube
c41e44d964 fix: relative link in href 2019-10-16 10:38:31 +05:30
ashish-greycube
a32618dff4 add coupon code on selling card of desk 2019-10-16 10:26:25 +05:30
Shivam Mishra
8aa0a280b2 Revert "fix: Allow disabled links in issue doctype (#19265)"
This reverts commit 29a5756f87.
2019-10-15 19:17:20 +05:30
deepeshgarg007
3db65ef7e8 fix: Demo Script 2019-10-15 19:16:45 +05:30
joelios
441720df75 fix: linking of time_log to timesheet from project (frappe/erpnext #19315 ) 2019-10-15 15:42:51 +02:00
Kenneth Sequeira
c269c68727 fix: allow read-only on new address form (#19304) 2019-10-15 16:34:55 +05:30
rohitwaghchaure
3af9ea8d7d Merge pull request #17117 from ashish-greycube/affiliate_and_coupon
feat: affiliate sales partner referral code and coupon code
2019-10-15 15:44:16 +05:30
Khushal Trivedi
e2bb950012 [fix] - from date cannot be greater than to date on blanket order 2019-10-15 15:03:13 +05:30
Rohit Waghchaure
a20fb650fe code cleanup 2019-10-15 14:42:09 +05:30
Sagar Gharge
f935e37925 [Fix] restricted duplicate guardians on student doctype (#19194) 2019-10-15 14:38:04 +05:30
Rohit Waghchaure
66072fec5a fixed conflicts 2019-10-15 14:18:59 +05:30
Nabin Hait
19070621af tests: added tests for PO scheduled date 2019-10-15 14:11:40 +05:30
Nabin Hait
a113861b0c fix: Always set required date based on min date on item table 2019-10-15 12:43:27 +05:30
ashish-greycube
cf24191fe5 feat: affiliate sales partner referral code and coupon code 2019-10-15 11:44:45 +05:30
ashish-greycube
74dc3c99de feat: coupon_code and referral_sales_partner functionality 2019-10-15 11:44:45 +05:30
rohitwaghchaure
0bb99c15e5 fix: while submitting landed cost voucher user getting negative stock error (#19269) 2019-10-14 15:18:36 +05:30
Vijaya Raghavan
adc1529567 fixed typo
fixes type in filter parameter
2019-10-13 21:41:02 +05:30
Deepesh Garg
3f2c5c2319 Merge pull request #19288 from deepeshgarg007/analytics_chart_fix
fix: Chart fix in Analytics report when based on item
2019-10-13 09:33:31 +05:30
deepeshgarg007
683a89a415 fix: Chart fix in Analytics report 2019-10-12 23:02:53 +05:30
Mangesh-Khairnar
4ed9b45fb8 feat(Sales Order): Allow to skip delivery note creation (#19222)
* feat(sales-order): add option to skip delivery note creation for order type maintenance

* fix(sales-order): hide delivery date on setting skip delivery note creation

* fix: allow skipping delivery note for all order types

* fix: bypass delivery note creation on setting skip delivery note creation

* fix: show skip delivery note in list view

* fix: check for duplicate project name after submitting prompt

* fix:  toggle delivery note reqd for skip delivery note

* fix: update status based on skip delivery note
2019-10-12 19:33:11 +05:30
rohitwaghchaure
86870b0aa6 fix: production plan not showing grand total against sales order (#19283) 2019-10-12 16:49:38 +05:30
rohitwaghchaure
a0c162c2d6 fix: project has not set in the sub assembly work order from production plan (#19284) 2019-10-12 16:48:57 +05:30
Anurag Mishra
8e937e9640 fix: packed items child table reset on amending docs (#19157) 2019-10-11 11:50:38 +05:30
Saqib
66762380ed fixes: internal issues (#19201)
* fix: Delivery Trip now has editable start address.

* fix: default party type not set in Journal Entry

* fix: maintainence visit purpose table not fetching item name

* fix: maintainence visit purpose table not fetching item name
2019-10-11 11:09:10 +05:30
Mangesh-Khairnar
1d781f13b2 fix: fetch allocated amount for individual invoice (#19259) 2019-10-11 11:06:11 +05:30
Deepesh Garg
29a5756f87 fix: Allow disabled links in issue doctype (#19265)
* fix: Allow disabled links in issue doctype

* fix: Remove unwanted attribute
2019-10-11 11:04:48 +05:30
rohitwaghchaure
285344eb0e fix: over-bill error while making debit note against purchase return e… (#19270)
* fix: overbill error while making debit note against purchase return entry

* Update accounts_controller.py
2019-10-11 11:02:11 +05:30
Marica
f067447d9c fix: Margin and Discount percentage set correctly via 'Update Items' (#19276) 2019-10-11 10:47:09 +05:30
sahil28297
39d9cbc43d fix(patch): use db_insert instead of save to escape validations (#19279) 2019-10-11 10:43:50 +05:30
Deepesh Garg
2d064ee67a fix: Remove bold property from disable checkbox (#19280) 2019-10-11 10:43:38 +05:30
Himanshu
eba3a8e802 fix: get contact details (#19281) 2019-10-11 10:43:24 +05:30
Deepesh Garg
0fde204074 Merge pull request #19278 from Mangesh-Khairnar/fix-fixed-asset-register-name
fix: change category name from in store to in location
2019-10-11 09:14:46 +05:30
Kenneth Sequeira
a54b7542f1 fix: sales invoice labels (#19267) 2019-10-10 18:50:39 +05:30
Rohan
d8cbbc7d65 Merge branch 'develop' into dev-work-order-bugs 2019-10-10 17:47:31 +05:30
Rohan
6c8fe5ae02 Merge branch 'develop' into dev-serial-no-statuses 2019-10-10 17:47:30 +05:30
Mangesh-Khairnar
9cf818d347 fix: change category name from in store to in location 2019-10-10 14:28:52 +05:30
Suraj Shetty
a1de447662 Merge pull request #19277 from rohitwaghchaure/not_able_to_use_webhook
fix: name 'link_link_doctype' is not defined
2019-10-10 14:24:04 +05:30
Suraj Shetty
a6e53410b0 Merge branch 'develop' into not_able_to_use_webhook 2019-10-10 14:22:48 +05:30
Rohit Waghchaure
4494d46020 fix: name 'link_link_doctype' is not defined 2019-10-10 14:17:06 +05:30
rohitwaghchaure
95161a0df4 Merge pull request #19266 from rohitwaghchaure/fixed_imponibileimporto_for_the_previous_row_total_develop
fix: ImponibileImporto not getting calculated properly
2019-10-09 18:16:26 +05:30
Marica
ccad0a4cf9 feat: Stock Quick Balance (#19123)
* feat: Stock Quick Balance

It will display the stock balance and stock value given the date and warehouse
Item code can be fed or barcode can be scanned to retrieve the values

* fix: Codacy fixes

* fix: Renamed to Quick Stock Balance and minor fixes

Refactored code , combined functions to make it DRY
Added permissions for Stock User and Manager
Added more context to naming
2019-10-09 15:24:58 +05:30
Rohit Waghchaure
c10064ae2c fix: ImponibileImporto not getting calculated properly 2019-10-09 13:50:16 +05:30
Faris Ansari
38ac7f7350 Enhancements to Supplier Portal (#19221)
* fix: Add Purchase Order to portal

* fix: Create Customer or Supplier on first login

Based on default role set in Portal Settings, a Customer or Supplier
will be created when the user logs in for the first time.

* fix: Styling for transaction_row

* fix: Styling for RFQ page

* fix: Add Purchase Invoice route

- Make Purchase Invoice from PO

* fix: minor

- Admissions for Student role
- Remove print statement
2019-10-09 11:41:33 +05:30
Deepesh Garg
a00c98bea7 Merge pull request #19260 from Anurag810/Trends-Fixes
fix: Query Condition On Billing date filters in Purchase invoice trends Report.
2019-10-07 17:40:24 +05:30
Mangesh-Khairnar
3cc41634c5 Merge pull request #19161 from vijaywm/lwp_half_day_fix
fix: LWP calculation in multi-day leaves having half day
2019-10-07 17:05:22 +05:30
Mangesh-Khairnar
d5e9cd72df Merge branch 'develop' into lwp_half_day_fix 2019-10-07 16:08:30 +05:30
Mangesh-Khairnar
75397b441f style(salary-slip): fixed formatting 2019-10-07 16:08:15 +05:30
Anurag Mishra
fe5890b828 fix: Query Condition On Billing date filters 2019-10-07 14:27:07 +05:30
Deepesh Garg
817443c5dd Merge pull request #19253 from Thunderbottom/e-invoice-disc-fix
chore: check if discount_percentage exists
2019-10-06 23:47:52 +05:30
rohitwaghchaure
16b8e7c432 Merge pull request #19248 from rohitwaghchaure/not_able_to_submit_work_order_v12
fix: not able to submit the work order
2019-10-05 23:29:44 +05:30
Chinmay D. Pai
01aca675ef chore: check if discount_percentage exists
fixes TypeError: '>' not supported between instances of 'NoneType' and 'float'

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-10-05 10:18:21 +05:30
Rohit Waghchaure
484e1fb218 fix: not able to submit the work order 2019-10-04 17:58:21 +05:30
sahil28297
2caf32d421 fix(patch): Reload Leave Type (#19240) 2019-10-04 16:24:53 +05:30
Saqib
d5067b4d73 chore: label changes in retail and stock (#19243) 2019-10-04 16:24:26 +05:30
Deepesh Garg
41a6548acb fix: Label and dependes on fixes in Bank Account (#19245) 2019-10-04 16:22:00 +05:30
Shivam Mishra
ba2faecdc7 fix: null check for valuation rate (#19195)
* fix: null check for valuatiomn rate

* fix: add rate for item in test records

* refactor: use flt instead of throwing error

* Revert "fix: add rate for item in test records"

This reverts commit f8cebe65f5.
2019-10-04 11:58:04 +05:30
Deepesh Garg
8b741cfefb Merge pull request #19228 from Mangesh-Khairnar/fix-stock-ageing-report
fix(stock-ageing): filter none values from the fifo queue
2019-10-04 09:00:13 +05:30
Deepesh Garg
894604201b Merge pull request #19242 from thefalconx33/git-issues
fix: ‘EmployeeAdvance’ object has no attribute ‘conversion_rate’
2019-10-03 22:39:04 +05:30
Mangesh-Khairnar
9351313186 Merge branch 'develop' of https://github.com/frappe/erpnext into fix-stock-ageing-report 2019-10-03 19:21:17 +05:30
Mangesh-Khairnar
ea70c6f696 fix: dynamically filter fifo queue 2019-10-03 19:19:42 +05:30
thefalconx33
4723da0251 fix: #19239 2019-10-03 13:06:43 +05:30
rohitwaghchaure
f4245a2d9c minor: show BOM related operations (#19237) 2019-10-03 11:41:36 +05:30
gavin
be8f6f0d65 fix: report ~ lead conversion time (#19232) 2019-10-03 11:36:04 +05:30
Frappe PR Bot
045ca33692 feat: Updated translation (#19227) 2019-10-03 11:15:41 +05:30
Suraj Shetty
91c17a6f14 Merge pull request #19204 from hrwX/global_search_modules
fix(Global Search): add doctypes for modules
2019-10-02 21:14:58 +05:30
Himanshu
c18b54fc08 Merge branch 'develop' into global_search_modules 2019-10-02 16:39:38 +05:30
Sahil Khan
c5a6e9da15 Merge branch 'develop' into version-12 2019-10-02 16:36:54 +05:30
Sahil Khan
80ed98c87a bumped to version 12.1.6 2019-10-02 16:56:54 +05:50
Himanshu
2985cffc52 Merge branch 'develop' into global_search_modules 2019-10-02 16:36:19 +05:30
Himanshu Warekar
2935751f75 Merge branch 'global_search_modules' of https://github.com/hrwx/erpnext into global_search_modules 2019-10-02 16:34:19 +05:30
Himanshu Warekar
23c916c0d6 fix: global search dict in hooks 2019-10-02 16:32:53 +05:30
Saurabh
509dcd9ad0 Merge pull request #19097 from prssanna/shopify
fix(Integrations): Shopify Integration
2019-09-30 20:07:04 +05:30
Saurabh
039679cad1 Merge branch 'develop' into shopify 2019-09-30 19:08:44 +05:30
Chinmay Pai
5dfc74c851 fix(amazon-mws): python3 compatibility changes (#19210)
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-09-30 16:59:58 +05:30
Chinmay Pai
9d26c69c4a fix(amazon-mws): python3 compatibility changes (#19209)
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-09-30 16:59:42 +05:30
DeeMysterio
20194c4cc5 rename return/invoice to Purchase return/invoice (#19212) 2019-09-30 16:59:15 +05:30
Rohan
d463c346fe fix: set no-copy on some contract fields (#19208) 2019-09-30 16:37:29 +05:30
Nabin Hait
25e043766a fix: Get leave approvers in Employee leave balance report (#19211) 2019-09-30 16:36:23 +05:30
Mangesh-Khairnar
905573700b feat(report): fixed asset register (#19164)
* feat(report): fixed asset register

* fix: fetch supplier and check for asset status

* fix: fetch vendor name from purchase invoice

* style(fixed-asset-register): use conventional column name

* Update fixed_asset_register.py
2019-09-30 16:10:46 +05:30
Himanshu
37f4316df0 Update setup_wizard.py 2019-09-30 16:02:24 +05:30
Marica
de15cc1387 fix: Work order dialog box 'Select Quantity' on clicking 'Finish' (#19136)
The dialog box fetched 0 as Quantity to Manufacture and Max Quantity on finishing a Work Order
2019-09-30 15:36:33 +05:30
rohitwaghchaure
8d889ef80e fix: update the pending qty in production plan on completion of work order (#19180) 2019-09-30 15:22:12 +05:30
Deepesh Garg
b54f0fb388 fix: Party column empty in accounts receivable/ payable summary (#19205) 2019-09-30 15:19:56 +05:30
Suraj Shetty
1da81d8755 Merge pull request #19206 from hrwX/disp_mobile_no
fix: Show primary mobile no
2019-09-30 15:18:01 +05:30
Suraj Shetty
b093ea1f0a feat: Remove Leaderboard from ERPNext (#19156)
feat: remove Leaderboard from ERPNext
2019-09-30 15:17:26 +05:30
rohitwaghchaure
ed1cc18ab5 fix: stock ledger report not showing data if the UOM filter has selected (#19179) 2019-09-30 15:15:52 +05:30
Marica
147af15268 fix: Added 'Manual' % Complete Method in Project (#19175)
Added additional '% Complete Method' in Project so that Project can be set to 'Completed' irrespective of presence of Tasks
2019-09-30 15:11:15 +05:30
prssanna
1f512b36c5 fix(patch): set app_type as private 2019-09-30 14:57:21 +05:30
hrwx
ebc0e1ca8a fix: remove return statement 2019-09-30 14:56:39 +05:30
hrwx
bf09fbe6b9 fix: sku 2019-09-30 14:56:39 +05:30
hrwx
5c036d9aaf fix: permissions 2019-09-30 14:56:39 +05:30
hrwx
5aa8743024 changes 2019-09-30 14:56:39 +05:30
prssanna
c6b7695ab5 fix: default private app type 2019-09-30 14:56:39 +05:30
prssanna
c8ad8bb7aa fix: default private app type 2019-09-30 14:56:39 +05:30
prssanna
09f4e0b19c fix: default private app type 2019-09-30 14:56:39 +05:30
prssanna
a9aac02b90 fix: default private app type 2019-09-30 14:56:39 +05:30
prssanna
e64bdcd12b fix: default private app type 2019-09-30 14:56:39 +05:30
prssanna
f380b215b2 fix: shopify integration 2019-09-30 14:56:39 +05:30
Himanshu
201bcaf2ca fix(Company): Do not set default account if left blank (#19131)
* chore: use dict to set_default_account

* fix: dont override expense account if left empty

* fix: set accounts only if new company

* chore: fix alignment

* fix: test cases
2019-09-30 14:56:08 +05:30
Himanshu
7d6f52f4ab fix: add system user perm in patient (#19133) 2019-09-30 14:40:56 +05:30
Mangesh-Khairnar
d8763d7d65 fix: allow rename/merge in opportunity (#19202) 2019-09-30 14:39:46 +05:30
Himanshu Warekar
46831c4c20 fix: show mobile no 2019-09-30 14:34:56 +05:30
Himanshu
32b587b3a0 Merge branch 'develop' into global_search_modules 2019-09-30 13:44:42 +05:30
Himanshu Warekar
21abc3aa50 fix: add doctypes for modules 2019-09-30 13:40:02 +05:30
Suraj Shetty
4c3f0b94a4 Merge branch 'develop' into leaderboard 2019-09-30 13:11:19 +05:30
Suraj Shetty
fcb6edf571 Merge branch 'leaderboard' of github.com:prssanna/erpnext into leaderboard 2019-09-30 13:09:53 +05:30
Suraj Shetty
d23c9987ed style: Fix Codacy 2019-09-30 13:09:12 +05:30
Rohan
60b852bb12 Merge branch 'develop' into dev-work-order-bugs 2019-09-30 13:08:12 +05:30
Rohan
c86cdd609e Merge branch 'develop' into dev-serial-no-statuses 2019-09-30 13:08:10 +05:30
Deepesh Garg
91aa671a23 Merge pull request #19137 from marination/invoice-discounting
fix: Outstanding Amount field of Discounted Invoices Table in Invoice Discounting
2019-09-30 12:43:09 +05:30
Suraj Shetty
6bd4509923 Merge branch 'develop' into leaderboard 2019-09-30 12:35:39 +05:30
Rucha Mahabal
34326470b8 fix: produced_qty field hidden and not updated in sales order item (#19037)
* fix: produced_qty field hidden and not updated in sales order item

* fix: added patch for old sales orders

* fix: produced_qty for sales order item linked to multiple work orders

* fix: comment

* fix: function for updating produced_qty in SO Item

* fix: remove frappe.db.commit
2019-09-30 12:15:39 +05:30
Suraj Shetty
38794c0ca1 Merge branch 'develop' into leaderboard 2019-09-30 11:54:28 +05:30
prssanna
b874922404 fix: whitelist leaderboard functions 2019-09-30 11:12:10 +05:30
Deepesh Garg
296bf9ef42 chore: Add standard chart of accounts template for El Salvador (#19151)
* chore: Add standard chart of accounts template for El Salvador

* fix: Renane template file
2019-09-30 11:02:49 +05:30
Deepesh Garg
7b1b3f0fa8 fix: Allow alternative item in stock entry while transfering material to subcontractor (#19189) 2019-09-30 11:01:05 +05:30
Rucha Mahabal
3564ac7c88 fix: don't create debit/credit note automatically (#19185) 2019-09-30 10:59:28 +05:30
DeeMysterio
5ef26b42a8 feat(delivery note): make the delivery trip plus button fetch data from delivery note (#19046) 2019-09-30 10:57:32 +05:30
Roland
6edce82aef do not require address in webshop (#19096)
fix: #17559 - in webshop adding address should not be mandatory e.g. for online service goods, button to add address remains available
2019-09-30 10:56:22 +05:30
Rohan
e19e16fbf1 fix: remove internal fields from print (#19101) 2019-09-30 10:54:01 +05:30
Nabin Hait
2a10b02c68 Merge branch 'develop' into invoice-discounting 2019-09-30 10:10:50 +05:30
Himanshu
25ab1e41df fix(Contact): mobile_no re-introduced and travis fixes (#19009)
* fix: mobile_no re-introduced

* fix: test cases

* fix: set email as primary

* fix: add primary email and phone

* fix: utils for contact creation

* chore: remove = from dict
2019-09-30 10:08:15 +05:30
Mangesh-Khairnar
77f22635f2 fix(stock-ageing): filter none values from the fifo queue 2019-09-27 17:50:52 +05:30
prssanna
119c976ad1 fix: missing comma 2019-09-27 16:28:08 +05:30
prssanna
8f7ed71e9e fix: add df to leaderboard config 2019-09-27 15:09:40 +05:30
Himanshu
83b0b2adec feat(Global Search): Add fixtures for global search (#19049) 2019-09-27 00:59:48 +05:30
Mangesh-Khairnar
9a8549a361 Merge pull request #19187 from Mangesh-Khairnar/rename-job-applicant
feat(job-applicant): allow rename/merge with existing
2019-09-26 19:09:31 +05:30
Mangesh-Khairnar
a01ebe0a54 Merge branch 'develop' into rename-job-applicant 2019-09-26 18:41:28 +05:30
Nabin Hait
001edb4464 refactor: Reposting utility of Stock ledger (#19155) 2019-09-26 16:44:35 +05:30
sahil28297
a9ff4f6688 fix(Report): Sales Register 2019-09-26 13:58:00 +05:30
prssanna
d095acdad5 fix: use orm for queries 2019-09-26 13:41:24 +05:30
Shivam Mishra
8781dc8ca3 fix: footer link redirect to landing pages (#19181) 2019-09-26 12:53:52 +05:30
Mangesh-Khairnar
f82ea857a0 feat(job-applicant): allow rename/merge with existing 2019-09-26 12:29:41 +05:30
Marica
54becbb33a fix: Codacy fix(whitespaces) 2019-09-26 11:24:34 +05:30
marination
a877115ff4 fix: Minor changes
Added value in fetch from and removed client side code
2019-09-26 11:08:39 +05:30
marination
e7f67592a8 fix: Made outstanding amount field read only and added validation
Made the field editable so that outstanding amount can be adjusted
2019-09-26 10:58:02 +05:30
marination
ed004018d6 fix: Outstanding Amount field of Discounted Invoices Table in Invoice Discounting
It wrongly fetched grand total from sales invoice instead of outstanding amount.
2019-09-26 10:58:02 +05:30
Deepesh Garg
d138633c5b Merge pull request #19163 from thefalconx33/small-fixes
fix: Supplier field not getting populated in serial no on creation of asset
2019-09-25 22:09:41 +05:30
Marica
23d7b09389 fix: Item Rate within Update Items in Sales order (#19172)
Blocked negative discount percentage, which affected the item rate every time Update Items action was taken
2019-09-25 17:17:36 +05:30
Rucha Mahabal
132323462c fix(Report): Sales Register (#19166) 2019-09-25 16:03:45 +05:30
Nabin Hait
2064dfc5a9 fix: Handling payments against credit/debit notes and party currency (#19154) 2019-09-24 19:52:33 +05:30
Mangesh-Khairnar
1e6e1dd451 enhancement(tds-monthly-payable): remove zero value transaction (#19141) 2019-09-24 19:46:06 +05:30
Rucha Mahabal
c6b548b5b2 fix(Stock): item variant description (#19134) 2019-09-24 19:17:13 +05:30
gavin
fed5788c50 fix: patch fix (#19147) 2019-09-24 19:15:29 +05:30
Rucha Mahabal
824376a045 fix(Journal Entry): Opening Entry not fetching accounts (#19148) 2019-09-24 19:13:55 +05:30
Saqib
451d1a1744 fix: Bypass credit limit and Project Template field not visible(#19162)
* Fix: Allow Project Template in Quick Entry

* Fix: Label Changes
2019-09-24 19:10:59 +05:30
thefalconx33
c15cc8fc28 fix: #18624 2019-09-24 18:49:16 +05:30
Sahil Khan
6211a5bc3b Merge branch 'develop' into version-12 2019-09-24 18:16:53 +05:30
Sahil Khan
946f68f7f0 bumped to version 12.1.5 2019-09-24 18:36:53 +05:50
Vijaya Raghavan
e9affd97ac LWP for half day in multi day leave 2019-09-24 17:04:32 +05:30
prssanna
3f1444e410 fix: get leaderboards using hooks 2019-09-24 13:51:22 +05:30
prssanna
3bd15d3aaa feat: remove leaderboard from erpnext 2019-09-24 13:06:31 +05:30
Rohan
a51a304cf0 Merge branch 'develop' into dev-work-order-bugs 2019-09-24 11:53:00 +05:30
Nabin Hait
786d7bd3d4 Merge branch 'develop' into dev-serial-no-statuses 2019-09-24 11:50:33 +05:30
Deepesh Garg
d9e9d562f8 fix: Travis (develop) (#19140)
* fix: Travis

* fix: Syntax Error
2019-09-24 11:44:52 +05:30
Deepesh Garg
2e7419d78f fix: Do not validate warehouse in case of Repack (#19050) 2019-09-24 10:05:42 +05:30
Himanshu
fdad33309b fix: get correct warehouse for product bundle (#19130) 2019-09-24 10:03:34 +05:30
Anurag Mishra
5a61880e6a fix: provided delete permission (#19143) 2019-09-24 09:54:54 +05:30
Mangesh-Khairnar
5dcf2c669f chore: remove unlinked letter head references (#19138) 2019-09-24 09:53:06 +05:30
rohitwaghchaure
8dd4699f10 feat: Allow to make landed cost voucher against the asset item (#19121) 2019-09-23 15:03:52 +05:30
rohitwaghchaure
e18f7b91c3 Merge pull request #19127 from rohitwaghchaure/removed_mandatory_property_for_address_field_in_quick_entry_develop
fix: removed mandatory property for address field in quick entry
2019-09-23 14:48:27 +05:30
Anurag Mishra
2c60f6419e feat: missmatching amount in GST Sales report and itemised sales report (#19116) 2019-09-20 23:00:09 +05:30
Suraj Shetty
462d9cb331 feat: "Purchase Order items to be Received or Billed" report (#19091)
* feat: Init "Purchase Order items to be received or billed" report

* fix: Rename report

* fix: Column name
2019-09-20 18:30:22 +05:30
Mangesh-Khairnar
a44e8afe71 feat: add bank account in payroll entry (#19021)
* fix(journal-entry): change fieldname from bank account no to bank account

* fix: add payroll entry in bank dashboard

* fix: fetch account from bank account

* fix: minor changes

* patch: check for bank account no column before updating

* fix: use rename field function
2019-09-20 18:19:47 +05:30
Sahil Khan
5888efbb4e Merge branch 'develop' into version-12 2019-09-20 15:17:21 +05:30
Sahil Khan
0c665e5638 bumped to version 12.1.4 2019-09-20 15:37:21 +05:50
Rohit Waghchaure
1f9a84f165 fix: removed mandatory property for address field in quick entry 2019-09-20 12:18:23 +05:30
rohitwaghchaure
30f3354a7a Merge pull request #19114 from marination/report-fix
fix: Report 'Payment Period based On Invoice Date'
2019-09-19 19:01:05 +05:30
Anurag Mishra
c16fb9eb9d fix: dashboard button not working (#19094) 2019-09-19 18:12:39 +05:30
rohitwaghchaure
6bbc834f8f Merge pull request #19112 from rohitwaghchaure/fixed_get_bin_details_and_serial_nos_arugument_passing_issue
fix: get_bin_details_and_serial_nos() takes at least 3 arguments (4 g…
2019-09-19 18:01:03 +05:30
marination
8590112faa fix: Report 'Payment Period based On Invoice Date' 2019-09-19 17:48:23 +05:30
Rohit Waghchaure
6daab3ca89 fix: get_bin_details_and_serial_nos() takes at least 3 arguments (4 given) 2019-09-19 17:01:49 +05:30
Rucha Mahabal
51eabfe352 fix: subcontracting material transfer dialog in Purchase Order (#19111)
* fix: subcontracting material transfer dialog in Purchase Order

* fix: dialog title
2019-09-19 16:57:03 +05:30
Mangesh-Khairnar
231472bc20 Merge pull request #19102 from ruchamahabal/attendance_template_fix
fix(HR): upload attendance template not marking attendance
2019-09-19 14:20:05 +05:30
Mangesh-Khairnar
68a4c70b72 Merge branch 'develop' into attendance_template_fix 2019-09-19 13:34:39 +05:30
Suraj Shetty
28d182af15 fix: Permission issue in Total Stock Summary report (#19110)
Data in "Total Stock Summary" report were not getting filtered
based on applied user permissions because some link fields had
wrong options
2019-09-19 11:13:22 +05:30
Rohan
8a097c8627 fix: only set times if job card is filled (#19107) 2019-09-18 20:05:49 +05:30
Rucha Mahabal
1ba83427e5 fix: asset maintenance TypeError during date comparisons (#19098) 2019-09-18 20:04:15 +05:30
Marica
cef75a5987 fix: Customer Credit Balance Report query fix (#19105) 2019-09-18 20:00:39 +05:30
Marica
d793e39b6d fix: Customer Credit Balance Report query fix (#19104) 2019-09-18 19:59:31 +05:30
Rohan
b9c1dad2e6 Merge branch 'develop' into dev-serial-no-statuses 2019-09-18 13:24:28 +05:30
Rucha Mahabal
aeaf416d6d fix: upload attendance template not marking attendance 2019-09-18 13:11:30 +05:30
rohitwaghchaure
780fb8a4e5 fix: set stock adjustment account for the raw materials instead of COGS (#19090) 2019-09-17 18:46:49 +05:30
rohitwaghchaure
d019d28bc9 fix: Customer Ledger Summary report not working on python 3 (#19092) 2019-09-17 18:45:59 +05:30
Sahil Khan
50e591b815 Merge branch 'develop' into version-12 2019-09-17 17:11:15 +05:30
Sahil Khan
4f96ec1b6c bumped to version 12.1.3 2019-09-17 17:31:14 +05:50
sahil28297
0816c0bd5e Merge pull request #19093 from Aerele/fix_indentation
fix: indentation error in stock ageing
2019-09-17 17:08:35 +05:30
sahil28297
c1930fa64d Merge branch 'develop' into fix_indentation 2019-09-17 17:08:16 +05:30
kaviya
9e4f674fb9 fix: indentation error in stock ageing
fixes https://travis-ci.com/frappe/erpnext/jobs/235815591#L1720
2019-09-17 16:02:11 +05:30
Suraj Shetty
627a3dcd6d feat: Default energy point rules (#19003)
* feat: Add default energy point rules during install

* fix: Add completed_by field to task doctype

* fix: Rule data

* fix: Add default rules for opportunity

* fix: Add a patch to create default energy point rules

* fix: Default success action message

* fix: Use .items() instead of .iteritems()

* fix: Add "create_default_energy_points" patch entry

* fix: Reload Energy Point Rule to fix patch

* fix: Import frappe
2019-09-17 15:54:41 +05:30
Suraj Shetty
af2eac4334 fix: Create error log if something goes wrong while call log creation (#19055)
* fix: Create error log if something goes wrong while call log creation

- For better debbugging

* fix: Rollback if any error occurs during call log creation
2019-09-17 15:53:23 +05:30
Suraj Shetty
f9069a9873 fix: Return employee_emails instead of employee (#19085)
fix: Return employee_emails instead of employee
2019-09-17 13:50:42 +05:30
Suraj Shetty
7563bdf6f8 Merge branch 'develop' into fix-exotel-call-log 2019-09-17 13:28:59 +05:30
rohitwaghchaure
ad5fc07652 Merge pull request #19084 from rohitwaghchaure/offline_pos_currency_conversion_issue_for_v11
fix: plc conversion issue for offline pos
2019-09-17 13:24:41 +05:30
Suraj Shetty
6b9b92afb0 fix: Return employee emails instead of employee 2019-09-17 13:22:40 +05:30
Rohit Waghchaure
094612dc02 fix: plc conversion issue for offline pos 2019-09-17 13:04:28 +05:30
Faris Ansari
4fe67236ed fix: Python 3 fixes for MWS Connector (#18986) 2019-09-17 12:57:51 +05:30
Deepesh Garg
c5c3860c5c fix: Mandatory accounting dimensions while creating asset depreciation entry (#19073)
* fix: Mandatory accounting dimensions while creating asset depreciation entry

* fix: Consider account types while assigning accounting dimensions
2019-09-17 12:50:28 +05:30
rohitwaghchaure
6de526ff42 fix: not able to change the account type in parent company account head (#19083) 2019-09-17 12:49:52 +05:30
Mangesh-Khairnar
5d41e3848d fix: do not submit depreciation journal entry when workflow is enabled (#19000) 2019-09-17 12:45:14 +05:30
Frappe PR Bot
abd434f656 feat: Updated translation (#19077) 2019-09-16 19:57:27 +05:30
Suraj Shetty
bc001d2d9a feat: Add stock ageing data to stock balance report (#19036)
* feat: Add stock ageing data to stock balance report

* fix: Use fifo queue warehouse wise

* fix: "Stock Ledger Entry" get query

* fix: Remove unwanted quotes in item details query

* fix: Check if no SLE was passed

* fix: Codacy

* fix: Add logic to include additional UOM columns

* fix: Show stock ageing data optionally
2019-09-16 19:57:04 +05:30
Nabin Hait
b50b5095ad fix: Added field disabled instead of enabled in cost center (#19065) 2019-09-16 19:44:37 +05:30
Marica
bac4b93639 fix: Displaying manufacturer part no along with manufacturer and added Manufacturers validation in Item master (#19066)
Manufacturer Link field options in Items Table of transactions will also display manufacturer part no.
Manufacturers table in Item master will check for duplicate entries.
2019-09-16 19:44:28 +05:30
rohitwaghchaure
76df782006 fix: Decimal point issue for e-invoice (#19068) 2019-09-16 19:43:17 +05:30
Mangesh-Khairnar
dce04b7335 fix: filter for payment order (#19070) 2019-09-16 19:40:27 +05:30
Chinmay Pai
7e8e4783a1 fix: remove function call from kwarg (#19072)
this commit fixes mail not being sent for leave applications

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-09-16 19:14:42 +05:30
rohitwaghchaure
bb5f99a34d Merge pull request #19071 from rohitwaghchaure/naming_series_added_for_the_asset_movement_develop
minor: naming series added in the asset movement
2019-09-16 19:10:54 +05:30
Rohit Waghchaure
40c5bf9e94 fix: naming series added in the asset movement 2019-09-16 16:42:42 +05:30
Faris Ansari
8beca68948 feat: Scan Barcode using Camera in mobile (#19033)
* feat: Scan Barcode using Camera in mobile

* fix: Use input-group for scan button

* fix: Muted camera button
2019-09-16 15:20:10 +05:30
Rucha Mahabal
2818b5bbe7 fix: 'link to material request' button not showing any message if no Material Request found (#19064) 2019-09-16 15:16:38 +05:30
Deepesh Garg
8cc2f83bd5 fix: Fetch scrap items from BOM if purpose is repack (#19056) 2019-09-16 14:49:12 +05:30
Nabin Hait
57835f0a37 fix: Company is required to get bin details (#19058) 2019-09-16 14:48:16 +05:30
Rushabh Mehta
72dcb51177 fix(minor): opportunity_from may not be selected (#19063) 2019-09-16 14:47:43 +05:30
Sammish Thundiyil
a2a9b39794 modified: erpnext/accounts/doctype/account/account.json (#19032) 2019-09-16 13:29:25 +05:30
Nabin Hait
c2a9b14c96 fix: Invalid reference doctypes for accounting dimensions (#19027)
* fix: Invalid reference doctypes for accounting dimensions

* fix: Add server side validation for accounting doctypes

* fix: set fieldname and label before insert
2019-09-16 13:26:37 +05:30
Nabin Hait
4432a874de Merge branch 'develop' into dev-work-order-bugs 2019-09-16 13:10:47 +05:30
Nabin Hait
74fdfff5b5 fix: Set todo status as Closed if task completed (#19059) 2019-09-16 13:06:37 +05:30
rohitwaghchaure
87000977d5 Merge pull request #19061 from rohitwaghchaure/user_can_edit_rate_and_discount_in_offline_pos_develop
fix: user can able to change rate and discount even if they don't have permissions
2019-09-16 11:50:52 +05:30
Rohit Waghchaure
a9435cc6b0 fix: user can able to change rate and discount even if they don't have permission 2019-09-16 11:15:22 +05:30
barredterra
5bd8562b5a Merge branch 'develop' into datev_report_headers 2019-09-14 20:09:39 +02:00
rohitwaghchaure
4a323463f7 fix: for pos, paid amount has not considered the tax amount due to which outstanding amount showing for the pos invoices (#19039) 2019-09-13 18:36:57 +05:30
Deepesh Garg
9c3fd8dbc3 Merge pull request #19044 from marination/gstr-error
fix: Changed error message in GSTR-1 Report
2019-09-13 18:04:38 +05:30
marination
3d433efdfe fix[minor]: Changed error message in GSTR-1 Report
Error message didn't prompt where the user has to add the missing value(GSTIN No.)
2019-09-13 16:28:11 +05:30
Nabin Hait
93a9c08116 fix: Allocate payment amount in reference table on change of payment amount (#19041) 2019-09-13 15:48:50 +05:30
Chinmay Pai
b3c732daf5 refactor(plaid): move configuration from site_config to doctype (#18712)
* feat(plaid): move plaid from site_config to doctype

plaid requires accessing site_config and cloud users cannot access
site_config and hence, plaid integration doesn't work on the cloud.
Moving all the configuration from site_config to the Plaid Settings
doctype fixes this issue.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* feat(plaid): make changes to plaid_settings and add patch

* remove all references for get()-ing plaid variables from frappe.conf
  and replace them with values from doctype
* add patch to move all existing plaid settings variable values from
  frappe.conf to plaid_settings doctype

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* fix(plaid): use get_single_value for Plaid Settings

Co-Authored-By: Himanshu <himanshuwarekar@yahoo.com>

* chore: reload plaid_settings before running patch

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: remove useless semicolon

fuck codacy

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-09-13 15:48:08 +05:30
Suraj Shetty
f8899827e0 fix: Add Exotel Settings to integration module (#19025)
* fix: Add Exotel Settings to integration module

* fix: Add description
2019-09-13 12:27:00 +05:30
Suraj Shetty
6996c2d17d fix: Fetch image from user if available (#19030) 2019-09-13 12:25:06 +05:30
Mangesh-Khairnar
755020843b fix: leave balance reports (#18984)
* fix: process allocation expiry

* fix: leave balance summary filter

* fix: opening and closing balance

* fix: check for department leave approvers

* fix: minor changes

* fix: consider leave approver in employee

* Update employee_leave_balance_summary.py
2019-09-13 11:07:09 +05:30
Rucha Mahabal
72949e7f73 fix: share transfer validations for journal entry (#19018)
* fix share transfer validations for journal entry

* fix: share transfer test

* fix: tests
2019-09-13 11:05:40 +05:30
Suraj Shetty
e4f8bda1ea Merge pull request #19031 from surajshetty3416/fix-call-popup-name
fix: Make -> Create in call popup
2019-09-12 22:14:24 +05:30
Suraj Shetty
cdce6c746f fix: Make -> Create 2019-09-12 22:04:49 +05:30
Himanshu
d51f7af9ab fix: add contact phone to sales order (#19012) 2019-09-12 19:19:17 +05:30
Suraj Shetty
3b0ec48b0c fix: Naming series check to avoid duplicate entry error (#19015)
* fix: Naming series check to avoid duplicate key error

* fix: Check for existence of naming series
2019-09-12 19:18:44 +05:30
Nabin Hait
a5dfe0725f fix: payment against shareholder (#19019) 2019-09-12 19:17:24 +05:30
Shivam Mishra
a3095c987a fix: optimized query (#19026)
Co-authored-by: nabinhait
Co-authored-by: sahil28297 <sahilkhan28297@gmail.com>
2019-09-12 17:28:37 +05:30
Rohan
a656151ee9 fix: operating cost calculation in JS 2019-09-12 16:00:25 +05:30
Sammish Thundiyil
504e52ff46 refactor: cost center (#19011)
* 	modified:   erpnext/accounts/doctype/cost_center/cost_center.json

* fix: removed unique property from cost_center_name
2019-09-12 13:48:41 +05:30
sahil28297
b1604a24ed fix(add_to_cart): show add_to_card button only if specific conditions are satisfied (#19007) 2019-09-12 11:20:55 +05:30
Himanshu
e3ef56804c fix(Issue): track split from in issue (#18994)
* fix: track split from in issue

* fix: rename field name

* fix: remove first_mins to response
2019-09-11 19:20:20 +05:30
Fisher Yu
cd38ba4833 fix: several bugs and improvement ideas for education module #18599 (#18600)
* Update student_report_generation_tool.py

bug fix

* Update student_applicant.json

* Update program_course.json

* Update course_activity.json
2019-09-11 19:10:39 +05:30
Nabin Hait
1d1858a8b0 Show draft future payments as well 2019-09-11 18:39:49 +05:30
Nabin Hait
ff09b412f4 feat: Allowed multiple payment requests against a reference document (#18988) 2019-09-11 12:43:27 +05:30
Mangesh-Khairnar
7bcb24efbf fix(purchase-invoice): Update paid amount on creation of debit note (#18830)
* fix(purchase-invoice): set paid amount for purchase return

* fix(purchase-invoice): remove payment schedule on creation of debit note
2019-09-11 10:49:33 +05:30
rohitwaghchaure
bb736248a2 fix: incorrect qty calculation in the production plan fopr the sub assembely work orders (#18970) 2019-09-11 10:20:49 +05:30
Saurabh
e919388ee6 fix: do not cache value while creating item group, in setup wizard it will raise link validation error (#18992) 2019-09-11 10:07:50 +05:30
rohitwaghchaure
358a01a226 fix: Quotation Trends report not working for filter group by customer (#18989) 2019-09-10 19:18:30 +05:30
Rohan Bansal
bf7e012bde feat: add statuses for Serial No 2019-09-10 15:55:54 +05:30
Nabin Hait
a035428d43 fix: handling of key does not exists error 2019-09-10 14:51:02 +05:30
Sahil Khan
d2315e5c5c Merge branch 'develop' into version-12 2019-09-10 14:38:39 +05:30
Sahil Khan
a2fd1f22da bumped to version 12.1.2 2019-09-10 14:58:39 +05:50
Sammish Thundiyil
bcda12f4bb modified: erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json (#18829) 2019-09-10 14:11:02 +05:30
Shivam Mishra
e851346b4c fix: dont make dashboards if company is not set (#18975)
* fix: dont make dashboardss if company is not set

* fix: function call

* Update dashboard_charts.py
2019-09-10 14:08:31 +05:30
Nabin Hait
88e8688a4b fix: set raw material's batch based on main item's batch only if RM has batch no (#18977) 2019-09-10 14:07:45 +05:30
Suraj Shetty
0254217314 fix: Make address fields mandatory (#18979) 2019-09-10 14:07:05 +05:30
Mangesh-Khairnar
1853a83453 fix(packing-slip): add a descriptive message (#18981) 2019-09-10 13:21:01 +05:30
rohitwaghchaure
d312d11062 fix: port from hotfix (#18974)
* fix: '>' not supported between instances of 'int' and 'str'

* fix: not able to save item because price list has disabled
2019-09-10 10:47:36 +05:30
Deepesh Garg
69aeff15ef Merge pull request #18971 from Anurag810/sales_invoice_print_format_fixes_v13
fix: sales invoice return print format overriding the meta default print format
2019-09-09 18:35:05 +05:30
Anurag Mishra
89d3bc0b54 fix: sales invoice return print format overideing the meta default print format 2019-09-09 15:58:25 +05:30
Mangesh-Khairnar
cbcede79b1 Merge pull request #18964 from nabinhait/max_carry_forwarded_leaves
feat: Added input field for max carry forwarded leaves
2019-09-09 14:38:06 +05:30
Faris Ansari
32eccb8fb2 fix: Rename duplicate label Image to Website Image (#18912) 2019-09-09 14:29:01 +05:30
Nabin Hait
632fc6af79 feat: Added input field for max carry forwarded leaves 2019-09-09 13:33:00 +05:30
Suraj Shetty
f43825e4dd fix: convert dict to list for iteration (#18963) 2019-09-09 13:23:01 +05:30
Shivam Mishra
5f59c2ae75 fix: reload account timeline before creating dashboards (#18934)
* fix: sync account balance timeline.json before running patch

* fix: reload account timeline before creating dashboards
2019-09-09 13:20:53 +05:30
Mangesh-Khairnar
fd312be79f Merge pull request #18958 from surajshetty3416/employee-leave-balance-summary
feat: Employee Leave Balance Summary report
2019-09-09 13:18:41 +05:30
Nabin Hait
fb7c7b53ba feat: Added input field for max carry forwarded leaves 2019-09-09 12:08:58 +05:30
Suraj Shetty
d2f22b52a5 Merge branch 'develop' into employee-leave-balance-summary 2019-09-09 10:21:06 +05:30
MorezMartin
ffc4f8f2a5 feat: [stock -> packed_items] Enable modification of Description on packed items (#18907)
* Change packed item

* Remove description field on update_packed_items

* add possibility to modify description on packed items
2019-09-09 10:16:23 +05:30
rohitwaghchaure
cdcff6c26d Multiple port from v11 hotfix (#18954)
* fix: circular dependency during asset cancellation

* fix: ImponibileImporto for On Previous Row Total

* fix: PrezzoUnitario decimal issue
2019-09-09 10:15:01 +05:30
Faris Ansari
e352fb754b fix: Reload doctype in variants patch (#18962) 2019-09-08 21:25:33 +05:30
Suraj Shetty
5ae40a9500 fix: Use absolute import instead of relative import
Co-Authored-By: Mangesh-Khairnar <mkhairnar10@gmail.com>
2019-09-08 15:16:35 +05:30
Suraj Shetty
40dbb63042 Merge branch 'develop' into employee-leave-balance-summary 2019-09-08 14:15:47 +05:30
Faris Ansari
594918bd3a fix: Include Item variant patch in patches.txt (#18961) 2019-09-08 13:13:05 +05:30
Deepesh Garg
5343631708 Merge pull request #18960 from deepeshgarg007/gstr-1-remove-customer
fix: Minor fix in GSTR-1
2019-09-08 09:52:38 +05:30
deepeshgarg007
366451fc62 fix: Minor fix in GSTR-1 2019-09-08 09:51:15 +05:30
Suraj Shetty
a14ee7f1fe Merge branch 'develop' of github.com:frappe/erpnext into employee-leave-balance-summary 2019-09-07 22:02:02 +05:30
Suraj Shetty
c5588a9b93 fix: Column value and data indentation 2019-09-07 21:26:43 +05:30
Suraj Shetty
21a4f82f69 fix: Re-arrange filters 2019-09-07 20:21:56 +05:30
Nabin Hait
3b366c30a8 feat: Added default Leave Approver in Employee (#18953) 2019-09-07 12:31:07 +05:30
Saurabh
8e67a3a8a8 fix: check if 'All Item Group' exists before settings it as parent_item_group (#18956)
* fix: check if 'All Item Group' exists before settings it as parent_item_group

* feat: get cached value to avoid db call on each insert
2019-09-07 12:29:29 +05:30
Nabin Hait
4726fc4893 fix: Deleted unwanted production order files 2019-09-06 15:45:17 +05:30
Shivam Mishra
c69cc13c85 fix: updated footer message (#18949) 2019-09-06 15:40:15 +05:30
Prssanna Desai
ddfbb07c3b fix: fix accounts balance timeline dashboard chart source (#18942)
* fix: fix accounts balance timeline dashboard chart source

* fix: pass chart_name to get function instead of chart object
2019-09-06 15:38:06 +05:30
Nabin Hait
d30f87bbdf Merge branch 'Mangesh-Khairnar-feat-customer-credit-limit' into develop 2019-09-06 14:39:59 +05:30
Nabin Hait
4ce38059ac feat: Company wise credit limit 2019-09-06 14:33:10 +05:30
Anurag Mishra
bbc1b5cdcf feat: added date filter based on billing date and based date (#18935) 2019-09-06 12:10:37 +05:30
Anurag Mishra
ac0c1edd23 feat: added date filter based on billing date and based date (#18936) 2019-09-06 12:10:10 +05:30
Marica
a93b665427 fix: Print Format 'Point of Sale' removed from Sales invoice Print Format List (#18937)
'Point of Sale' Print Format for offline POS ,now doesn't appear in the Print Format Labels List in Sales Invoice for v12.
2019-09-05 18:26:45 +05:30
Sahil Khan
ede7050afe Merge branch 'develop' into version-12 2019-09-05 17:30:44 +05:30
Sahil Khan
0906bc8430 bumped to version 12.1.1 2019-09-05 17:50:44 +05:50
Nabin Hait
ac2b5ed84f fix: credit limit patch 2019-09-05 16:57:26 +05:30
Nabin Hait
b847731482 Merge branch 'feat-customer-credit-limit' of https://github.com/Mangesh-Khairnar/erpnext into Mangesh-Khairnar-feat-customer-credit-limit 2019-09-05 16:47:08 +05:30
Nabin Hait
b5bd91417d fix: Print/PDF of AR/AP report after refactoring (#18931) 2019-09-05 16:43:20 +05:30
Himanshu
6298da4458 fix: treeview fixes (#18803) 2019-09-05 16:12:33 +05:30
Deepesh Garg
cffe577028 fix: Add UOM in anlytics report when viewing based on item (#18902) 2019-09-05 16:03:15 +05:30
Raffael Meyer
48d1463825 fix(CoA): SKR04 (#18820)
- move debitors into receivables
- move creditors into payables
- rename "C - Verb." to "C-Verbindlichkeiten" for consitency
- move "Erlösschmälerungen" into a root of type "Expense"
-  move "Erhaltene Boni" and "Erhaltene Rabatte" into a root of type "Income"
2019-09-05 15:15:28 +05:30
hendrik
c257ce82c5 Party accounts if don't have default company (#18771)
Add check for get_default company
2019-09-05 15:14:09 +05:30
Anurag Mishra
867ac10ffd fix: handle for product bundle (#18420)
* fix: handle for product bundle

* fix: Requested changes and some general fixes
2019-09-05 15:13:21 +05:30
KanchanChauhan
d114c8f88f fix(Purchase Order): Status updater (#18612) 2019-09-05 15:11:43 +05:30
Karthikeyan S
1d1427de60 fix(auto attendance): handling None case for IN/OUT Logs (#18867) 2019-09-05 15:02:33 +05:30
Andy Zhu
91596f2467 Change the field name for Payment Entry (#18874)
In the Payment Entry Form, the field name for customer name is 'party' instead of 'party_name'. 
Need to change the customer_dashboard file accordingly.
2019-09-05 15:01:38 +05:30
John Clarke
a7d448dcba fix: Error "TypeError: unorderable types: int() > str()" When Trying to Create Packing Slip (#18913)
User report here https://discuss.erpnext.com/t/error-typeerror-unorderable-types-int-str-when-trying-to-create-packing-slip/52445

This has not been noted to github issues and is just a suggested fix, an expert may need to refactor more here?

User and traceback does not state whether Python 2 or 3 but perhaps 3 since that apparently does not 'guess' when types do not match?

See also https://stackoverflow.com/questions/14886881/unorderable-types-int-str
2019-09-05 14:55:35 +05:30
Rohan
77da3b4347 fix: pull project from task (#18776) 2019-09-05 14:53:43 +05:30
Rohan
9d77e9f719 fix: error while trying to get directions (#18827) 2019-09-05 14:51:22 +05:30
Govind S Menokee
c901d6322c fix(18837): Student creation error (#18838)
Academic user not able to create student
2019-09-05 14:50:23 +05:30
rohitwaghchaure
7496548c39 fix: not able to create invoice against patient (#18858) 2019-09-05 14:48:51 +05:30
rohitwaghchaure
f1fab871b8 fix: mismatch between warehouse tree value and warehouse based stock balance report value (#18879) 2019-09-05 14:47:43 +05:30
rohitwaghchaure
5aaf15d145 fix: healthcare practitioner not showing in the dropdown (#18929) 2019-09-05 14:42:28 +05:30
Nabin Hait
16a7ec95dc fix: tax category is optional argument 2019-09-05 13:01:15 +05:30
Suraj Shetty
607a21e02a feat: Init Employee Leave Balance Summary report 2019-09-05 12:42:29 +05:30
Nabin Hait
b03fa8a441 Merge branch 'develop' into feat-customer-credit-limit 2019-09-05 12:34:34 +05:30
Nabin Hait
f4fde51bba Update customer.py 2019-09-05 12:33:29 +05:30
Nabin Hait
c78c86663d Update customer_credit_balance.py 2019-09-05 12:24:37 +05:30
Nabin Hait
7834a0182b Update move_credit_limit_to_customer_credit_limit.py 2019-09-05 12:22:48 +05:30
sahil28297
1e0b0da7ad fix(patch): add company in filters to get proper parent account (#18905) 2019-09-05 12:21:44 +05:30
Faris Ansari
a2db94761a fix: Honor Shopping Cart Price List (#18885) 2019-09-05 12:19:50 +05:30
rohitwaghchaure
805b8634da fix: incorrect stock value difference when stock move from negative to positive (#18887) 2019-09-05 12:18:33 +05:30
Rohan
1635967c4e fix: attribute error when trying to fetch items (#18900) 2019-09-05 12:16:49 +05:30
Nabin Hait
a5907e17d5 Update accounts_receivable.py 2019-09-04 11:04:27 +05:30
Suraj Shetty
0252c1478e Merge pull request #18917 from surajshetty3416/fix-call-popup
fix: Use medium instead of to number to get schedule
2019-09-04 11:04:14 +05:30
Suraj Shetty
f5bece1afa Merge branch 'develop' into fix-call-popup 2019-09-04 11:03:58 +05:30
Suraj Shetty
e46c56bfe8 fix: Use medium instead of to number to get schedule 2019-09-04 11:02:52 +05:30
Nabin Hait
561a2e966e Update accounts_receivable.py 2019-09-04 11:02:48 +05:30
rohitwaghchaure
a9b0c55bcb Merge pull request #18914 from rohitwaghchaure/pos_search_item_not_working
fix: offline pos item search not working
2019-09-04 06:02:34 +05:30
Rohit Waghchaure
93bad51659 fix: offline pos item search not working 2019-09-03 23:29:41 +05:30
Rucha Mahabal
1e2dc2c8f1 feat: Employee Incentive and Retention Bonus added in Salary Slip (Additional Salary) (#18647)
* feat: employee incentive and retention bonus added in additional salary

* fix: added salary component field, logic improved

* fix: codacy review
2019-09-03 20:45:52 +05:30
Sahil Khan
2691991d9a Merge branch 'develop' into version-12 2019-09-03 16:33:06 +05:30
Sahil Khan
e8b1c82531 bumped to version 12.1.0 2019-09-03 16:53:06 +05:50
Saurabh
67e4186360 Merge pull request #18909 from sahil28297/changelog_v12_1_0
fix(change_log): add v12_1_0 changelog
2019-09-03 16:26:07 +05:30
Saurabh
3f8f8d36b7 Merge branch 'develop' into changelog_v12_1_0 2019-09-03 16:25:44 +05:30
Sahil Khan
a70e2bdbc9 fix(change_log): add v12_1_0 changelog 2019-09-03 16:20:01 +05:30
Nabin Hait
1ab75db0ac refactor: Accounts Receivable / Payable report (#18906) 2019-09-03 16:07:46 +05:30
Nabin Hait
e85c320501 Merge branch 'develop' into feat-customer-credit-limit 2019-09-03 14:20:17 +05:30
Mangesh-Khairnar
cb44f3a7c3 fix(purchase-invoice): add rounded total property setter for purchase invoice (#18841) 2019-09-03 14:18:15 +05:30
Deepesh Garg
c174e4d01a fix: Default message from Payment Gateway Account not fetching (#18848) 2019-09-03 14:17:41 +05:30
Rohan
7fa3f3fe98 fix: include start and end date for contract status (#18866) 2019-09-03 14:16:12 +05:30
Mangesh-Khairnar
4bcc221ee3 Merge branch 'develop' of https://github.com/frappe/erpnext into feat-customer-credit-limit 2019-09-02 23:18:56 +05:30
Mangesh-Khairnar
cf901da25d test: create customer credit limit on change 2019-09-02 23:18:36 +05:30
Suraj Shetty
496f8e966f Merge pull request #18889 from deepeshgarg007/contacts-ref
fix: Travis
2019-09-02 18:32:28 +05:30
deepeshgarg007
4dd8895133 Merge branch 'contacts-ref' of https://github.com/deepeshgarg007/erpnext into contacts-ref 2019-09-02 17:42:27 +05:30
deepeshgarg007
8666ecc26f fix: Purchase receipt test 2019-09-02 17:41:12 +05:30
Suraj Shetty
152360d999 Merge branch 'develop' into contacts-ref 2019-09-02 16:24:57 +05:30
Mangesh-Khairnar
e7c7a0e648 fix: loan application (#18882)
* fix: loan application

* Update loan_application.py
2019-09-02 15:59:44 +05:30
Nabin Hait
4d553b7a84 Merge branch 'develop' into contacts-ref 2019-09-02 15:58:06 +05:30
Himanshu
fffdb6f575 feat(Contacts): Multiple Emails in a Contact (#18675)
* feat: render multiple addresses

* feat: move to newer contacts structure

* fix: iterate over valid variable

* fix: use primary label instead of bold letters

* fix: call popup get contact name from number

* fix: make contact structure  call popup compatible

* fix: query

* fix: add city, state and country

* fix: display address

* fix: get address in single line

* fix: review fixes

* fix: translation strings

* fix: fix query for contacts

* fix: remove references of mobile_no
2019-09-02 15:57:45 +05:30
Suraj Shetty
063144c514 fix: Check in_patch before adding 'All Item Group' 2019-09-02 15:53:28 +05:30
deepeshgarg007
402d82b4c5 fix: Remove delete_doc from tests 2019-09-02 14:37:18 +05:30
Himanshu Warekar
711d1acffd fix: remove references of mobile_no 2019-09-02 13:31:10 +05:30
Himanshu Warekar
81472e4c08 Merge branch 'contacts-ref' of https://github.com/hrwx/erpnext into contacts-ref 2019-09-02 13:21:29 +05:30
Himanshu Warekar
b8f23c2657 fix: fix query for contacts 2019-09-02 13:20:27 +05:30
Suraj Shetty
f33dfc2121 Merge branch 'develop' into contacts-ref 2019-09-02 12:38:45 +05:30
Deepesh Garg
e26b55265f Merge pull request #18840 from netchampfaris/missing-parent-item-group
fix: Set default Parent Item Group
2019-09-02 12:22:49 +05:30
Himanshu Warekar
26dfd5b314 fix: translation strings 2019-09-02 12:21:41 +05:30
Himanshu Warekar
e31c6964f3 Merge branch 'contacts-ref' of https://github.com/hrwx/erpnext into contacts-ref 2019-09-02 12:11:15 +05:30
Himanshu Warekar
fd85b1689d fix: review fixes 2019-09-02 12:10:15 +05:30
Suraj Shetty
4a8710ef75 Merge pull request #18611 from surajshetty3416/fix-paid-amount
fix: Paid amount 0 while creating advanced payment entry
2019-09-02 08:38:34 +05:30
Suraj Shetty
58e6b67886 Merge pull request #18613 from surajshetty3416/fix-timesheet-creation
fix(timesheet): Hours automatically used to set 0
2019-09-02 08:38:12 +05:30
Suraj Shetty
f268562256 Merge branch 'develop' into contacts-ref 2019-09-02 06:32:11 +05:30
Mangesh-Khairnar
86720deeae fix: bypass credit limit check 2019-09-01 10:15:23 +05:30
Suraj Shetty
ae587dbd83 Merge pull request #18524 from surajshetty3416/feature-pick-list
feat: Pick List
2019-08-31 19:44:45 +05:30
Suraj Shetty
72bea0dff4 test: Add test to check creation of pick list from multiple sales order 2019-08-31 18:34:25 +05:30
Suraj Shetty
736b5e07cc fix: Maintain the order of Item List 2019-08-31 18:33:23 +05:30
Suraj Shetty
ca58fde552 test: Enable basic tests 2019-08-31 16:58:51 +05:30
Mangesh-Khairnar
bb3cec1556 test: fetch data from customer credit limit 2019-08-31 14:32:07 +05:30
Mangesh-Khairnar
42d0da8f5a Revert "fix: process allocation expiry"
This reverts commit b654dc0e28.
2019-08-31 14:28:10 +05:30
Mangesh-Khairnar
dbc69da409 fix: minor fixes 2019-08-31 14:28:02 +05:30
Mangesh-Khairnar
e3bb247868 fix: check column in credit limit 2019-08-31 13:16:14 +05:30
Mangesh-Khairnar
f856b3b559 fix: fetch customer group of the customer 2019-08-31 01:40:58 +05:30
Mangesh-Khairnar
89433b4bea fix: get credit limit 2019-08-30 22:57:51 +05:30
Suraj Shetty
bcfec77e2c style: Use single quotes 2019-08-30 19:44:37 +05:30
Suraj Shetty
744b92d233 fix: Commonify item not available alert
- Reorganise code
- UX fixes
2019-08-30 19:39:28 +05:30
Suraj Shetty
0eed0a9abe test: Temporarily comment out tests 2019-08-30 19:12:16 +05:30
Mangesh-Khairnar
b3e5d11e1d fix: multiple fixes 2019-08-30 18:18:48 +05:30
Suraj Shetty
0df38891a1 fix: Update pick list print format 2019-08-30 15:59:35 +05:30
Suraj Shetty
f75481fa23 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-30 15:45:18 +05:30
Suraj Shetty
5e84ce55ae fix: Add is_stock_item filter for item in locations table 2019-08-30 10:01:49 +05:30
Suraj Shetty
effe53d4ae fix: Set default value for qty 2019-08-30 09:52:08 +05:30
Suraj Shetty
88885184dc fix: Show separate button for pick list creation in work order 2019-08-30 09:30:18 +05:30
Suraj Shetty
9641edc562 fix: Set item locations before save 2019-08-29 22:23:13 +05:30
Suraj Shetty
9b42682575 fix: Check parent warehouse for batch as well 2019-08-29 21:14:26 +05:30
Mangesh-Khairnar
dcd5be0d07 patch: move credit limit in customer to child table 2019-08-29 20:53:51 +05:30
Mangesh-Khairnar
c059bc3e36 fix: grid view of customer credit limit 2019-08-29 20:51:31 +05:30
Deepesh Garg
52c61904c8 Merge pull request #18870 from rohitwaghchaure/not_able_to_save_sales_order_develop
fix: not able to save sales order
2019-08-29 20:32:06 +05:30
Suraj Shetty
a6ab00162e style: Remove commented code 2019-08-29 20:17:04 +05:30
Suraj Shetty
9e4282e130 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-29 20:09:55 +05:30
Rohit Waghchaure
13c7e183a6 fix: not able to save sales order 2019-08-29 20:03:52 +05:30
Mangesh-Khairnar
5755d2d32f fix: customer credit limit report 2019-08-29 19:51:38 +05:30
Mangesh-Khairnar
79525327f0 feat: bypass credit limit check 2019-08-29 19:50:23 +05:30
Suraj Shetty
3e11338ed5 fix: Validate count of serial numbers 2019-08-29 19:46:49 +05:30
Mangesh-Khairnar
233ee277ef Merge pull request #18853 from Mangesh-Khairnar/fix-allocation-expiry
fix: process allocation expiry
2019-08-29 18:29:07 +05:30
Mangesh-Khairnar
36b30911a8 feat: customer credit limit 2019-08-29 18:06:23 +05:30
Suraj Shetty
acd00df8fb Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-29 17:24:23 +05:30
Suraj Shetty
ed1ec82d2f refactor: Item picking logic
- Fix serial number selection
- Get limited item location based on required qty
- Store total item count to properly track available locations
- Pass missing serial no.
2019-08-29 17:23:09 +05:30
Mangesh-Khairnar
232b5dab81 Merge pull request #18854 from ruchamahabal/fixes
fix: exception in Shopify Settings
2019-08-29 16:33:46 +05:30
Deepesh Garg
dbe8dab3ce Merge pull request #18794 from deepeshgarg007/supplier_items
fix: Enhancement in Purchase Order
2019-08-29 16:29:02 +05:30
Rucha Mahabal
f5b2db76cb Merge branch 'develop' into fixes 2019-08-29 13:32:30 +05:30
Suraj Shetty
1c29c520bd Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-29 13:18:57 +05:30
Mangesh-Khairnar
2f322609d7 Merge pull request #18852 from mbhavesh95863/patch-1
fix(selling): remove redundant listing
2019-08-29 13:12:38 +05:30
Mangesh-Khairnar
74c7b04b29 Merge branch 'develop' into fixes 2019-08-29 12:31:38 +05:30
rohitwaghchaure
c20e66e0be Merge pull request #18860 from rohitwaghchaure/added_purchase_invoice_in_buying_module
fix: added purchase invoice in buying module
2019-08-29 12:13:50 +05:30
rohitwaghchaure
445a93e5f5 Merge pull request #18859 from rohitwaghchaure/incorrect_valuation_rate_calculated_for_serial_no_develop
fix: incorrect valuation rate calculated because of string replacement
2019-08-29 12:13:02 +05:30
Suraj Shetty
66f2bc69a6 fix: Item mapping of stock entry with no reference 2019-08-29 09:23:31 +05:30
Suraj Shetty
55a2699f4c fix: Update dashboard of doctypes that are linked with pick list 2019-08-29 09:14:27 +05:30
Rohit Waghchaure
354d0af44e fix: added purchase invoice in buying module 2019-08-28 17:51:31 +05:30
Suraj Shetty
f455c92d02 fix: Remove Pick List Reference Item use Item locations table instead 2019-08-28 17:44:22 +05:30
Mangesh-Khairnar
b654dc0e28 fix: process allocation expiry 2019-08-28 17:22:56 +05:30
Rohit Waghchaure
d03d8204ab fix: incorrect valuation rate calculated because of string replacement issue 2019-08-28 17:22:50 +05:30
Rucha Mahabal
1707c3da95 fix: exception
Co-Authored-By: Himanshu <himanshuwarekar@yahoo.com>
2019-08-28 13:55:26 +05:30
Rucha Mahabal
b606d4d2ad Merge branch 'develop' into fixes 2019-08-28 13:50:31 +05:30
Rucha Mahabal
9fa5dbd6e4 fix: raised exception in shopify 2019-08-28 13:29:03 +05:30
Suraj Shetty
1cf7270049 fix: Add picklist dashboard config 2019-08-28 12:40:58 +05:30
Suraj Shetty
be0ae7a430 fix: Doctype changes
- Check no copy for work order series field
- Add dashboard
- Set naming_series for pick list
2019-08-28 12:40:26 +05:30
Shivam Mishra
0aeccbf4b2 feat: added dashboard fixtures (#18812)
* feat: add dashboard charts fixture

* fix: remove return statement

* feat: added patch for creating default dashboards

* chore: renamed dashboard charts

* feat: add add_dashboard function to install fixtures

* fix: reload doctype issue in patches

* fix (travis): reloaded dashboard chart source

* fix (travis): reloaded dashboard chart source

* fix (travis): reloaded dashboard doctype

* fix (travis): reloaded dashboard chart link doctype
2019-08-28 11:39:45 +05:30
Suraj Shetty
8f32ac0edd fix: Batch selection logic 2019-08-28 10:16:20 +05:30
Himanshu Warekar
a5b78f3c0d fix: get address in single line 2019-08-28 00:04:05 +05:30
Mangesh-Khairnar
671c20ec56 Merge branch 'develop' into patch-1 2019-08-27 22:42:35 +05:30
Mangesh-Khairnar
17d3de1821 fix: process allocation expiry 2019-08-27 22:37:12 +05:30
mbhavesh95863
cfec328c74 Same report 2 times in list 2019-08-27 19:17:19 +05:30
Suraj Shetty
c5e0838890 fix: Import get_conversion factor method 2019-08-27 12:14:17 +05:30
Suraj Shetty
974ac3e6ad fix: Update item detail for items without reference 2019-08-27 10:17:16 +05:30
Suraj Shetty
dc675b1eb0 fix: Re-order stock qty field 2019-08-27 08:06:22 +05:30
Himanshu Warekar
9057239c3c fix: display address 2019-08-26 22:40:54 +05:30
Suraj Shetty
d6be8989e4 fix: Remove "Material Issue" purpose from pick list
- Because in material issue we already define source warehouse
2019-08-26 22:11:49 +05:30
Faris Ansari
8ac2a2f0c4 fix: Set default Parent Item Group 2019-08-26 13:00:17 +05:30
Himanshu Warekar
1c538b9b43 Merge branch 'develop' of https://github.com/frappe/erpnext into contacts-ref 2019-08-26 12:51:51 +05:30
Himanshu Warekar
ba6fe6cde5 Merge branch 'contacts-ref' of https://github.com/hrwx/erpnext into contacts-ref 2019-08-26 12:49:45 +05:30
Himanshu Warekar
7243e774c2 fix: add city, state and country 2019-08-26 12:49:20 +05:30
Shivam Mishra
db3bb793e9 feat: added domain info on footer (#18839) 2019-08-26 11:29:18 +05:30
Suraj Shetty
8de8a78235 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-26 10:51:12 +05:30
Mangesh-Khairnar
5dd1b50802 fix: update show in website on disabling item (#18831) 2019-08-26 10:27:25 +05:30
Suraj Shetty
00f9930fbf style: Remove leftout print statements 2019-08-26 10:09:07 +05:30
Suraj Shetty
457da47dba fix: set for_qty instead of pick_list 2019-08-26 10:05:35 +05:30
Suraj Shetty
2b9e256002 fix: Rename method name 2019-08-26 10:05:01 +05:30
Suraj Shetty
a1aa85712b Merge branch 'develop' into fix-timesheet-creation 2019-08-26 10:01:45 +05:30
Suraj Shetty
05f243590d fix: Show option to create pick list or work order 2019-08-26 09:29:31 +05:30
Suraj Shetty
94d7096c8c fix: Show create button only if target doc does not exists 2019-08-26 08:40:02 +05:30
Suraj Shetty
ecc801d3d8 fix: Add pick list field to delivery note 2019-08-26 08:39:11 +05:30
Suraj Shetty
be9f4ea487 fix: Add button to create pick list from material request 2019-08-26 08:38:37 +05:30
Suraj Shetty
a1dc152695 fix: Move get items location button below items table 2019-08-26 06:57:43 +05:30
Suraj Shetty
9209570937 feat: Add option to create pick list from material request 2019-08-26 06:33:27 +05:30
Nabin Hait
d8c262fd5c fix: Translations of strings (#18825) 2019-08-23 16:32:58 +05:30
Mangesh-Khairnar
fe579c2efd fix: show a descriptive message on submission of duplicate account (#18486)
* fix: show a descriptive message on submission of duplicate account

* Update account.py
2019-08-23 16:31:20 +05:30
Mangesh-Khairnar
d94a389dd3 chore: remove unwanted code (#18645) 2019-08-23 16:31:09 +05:30
Deepesh Garg
98b86ecbc2 Merge branch 'develop' into supplier_items 2019-08-23 15:41:30 +05:30
Himanshu
dc0fb08ec7 Merge branch 'develop' into contacts-ref 2019-08-23 15:03:03 +05:30
Tufan Kaynak
a7ab51c5ba Update vehicle_expenses.py (#18768) 2019-08-23 12:50:52 +05:30
deepeshgarg007
59432418c6 fix: Consider multiple stock entry against a purchase order 2019-08-23 12:45:48 +05:30
Nabin Hait
6e7b9b5cb7 Update sales_invoice.py 2019-08-23 12:27:05 +05:30
Suraj Shetty
8b4d604cfd fix: Use purpose field and remove item_base_on field 2019-08-23 11:57:16 +05:30
Suraj Shetty
4affe4b939 Merge branch 'develop' into fix-timesheet-creation 2019-08-23 11:51:59 +05:30
Michelle Alva
c890401fec fix: added payroll period in HR module (#18543) 2019-08-23 11:50:48 +05:30
Suraj Shetty
7f94a58bf1 Merge branch 'develop' into fix-timesheet-creation 2019-08-23 11:46:01 +05:30
Deepesh Garg
f3d78dd29c fix: Duplicate items check in Sales Invoice (#18660)
* fix: Duplicate items check in sales Invoice

* fix: Commonified function for duplicate items check in selling controller

* fix: Set valuation rate and transaction date in child tabel
2019-08-23 11:42:35 +05:30
KanchanChauhan
23b5f4ec99 fix: Leave Application status filter (#18770)
When we click on Status Open in list view it throws an error.


After fix, it filters the results on Open status
2019-08-23 11:40:09 +05:30
Nabin Hait
bdfd69a2fe Merge branch 'develop' into contacts-ref 2019-08-23 11:34:42 +05:30
Harshit
56d03a456b fix: add contract to CRM module (#18817) 2019-08-23 11:34:25 +05:30
Michelle Alva
680e098b87 fix(dash): Added Tax exemption category and sub category in Employee Tax and Benefits (#18545)
section
2019-08-23 11:32:43 +05:30
Anurag Mishra
db88476f8b feat: refactor invoice_discounting (#18629)
* feat: refactor invoice_discountig

* Update invoice_discounting.py

* Update invoice_discounting.js
2019-08-23 11:27:00 +05:30
rohitwaghchaure
88ee7d8dbe fix: POS Sync Issue (#18807) 2019-08-23 11:13:58 +05:30
Suraj Shetty
6689ed543a Merge branch 'develop' into fix-paid-amount 2019-08-23 10:42:23 +05:30
deepeshgarg007
f2798eab50 fix: Conside multiple stock entry against a purchase order 2019-08-23 10:07:52 +05:30
Anurag Mishra
210317c0b5 fix: division by zero in asset Depereciation (#18637)
* fix: division by zero in asset Depereciation

* fix: requested changes
2019-08-23 00:21:26 +05:30
Himanshu Warekar
362c89ca73 Merge branch 'develop' of https://github.com/frappe/erpnext into contacts-ref 2019-08-22 17:29:38 +05:30
Suraj Shetty
687b1a5b1f fix: Make pick list submittable and add few fields
- Add material request & item fields
- Add pick_list field to Stock Entry
- Add purpose field to pick list
2019-08-22 16:41:14 +05:30
Suraj Shetty
8d55f81baa fix: Fix raw matterial selection based on finished item qty 2019-08-22 16:37:44 +05:30
Sahil Khan
7ff82fccf3 Merge branch 'develop' into version-12 2019-08-22 13:10:17 +05:30
Sahil Khan
cd25d6dc7f bumped to version 12.0.8 2019-08-22 13:30:17 +05:50
Suraj Shetty
c1f25ff9e3 fix: Add option to select qty of finished goods Item 2019-08-22 09:53:44 +05:30
Himanshu Warekar
447134d308 Merge develop into contacts-ref 2019-08-22 09:21:30 +05:30
rohitwaghchaure
224d857928 Merge pull request #18703 from rohitwaghchaure/reconciled_entry_still_has_no_clearance_date_develop
fix: reconciled entry has not clearance date set
2019-08-21 23:36:06 +05:30
rohitwaghchaure
a23fc327df Merge pull request #18785 from rohitwaghchaure/payment_recon_for_debit_entry_not_working_properly_develop
fix: debit note not reconciled with another purchase invoice using pa…
2019-08-21 23:35:35 +05:30
Suraj Shetty
ec92486377 fix: Add option to create Stock Entry from Pick List 2019-08-21 22:10:27 +05:30
Anastes Mp
a6c6e02c49 Incorrect database table (#18558)
Fixed Unknow Column tax_type error on offline pos
2019-08-21 16:53:06 +05:30
Suraj Shetty
298d38cde3 test: Fix existing tests 2019-08-21 16:37:49 +05:30
Himanshu Warekar
81f20891c1 fix: query 2019-08-21 16:09:35 +05:30
Suraj Shetty
109a07b834 fix: Fix get_employees_with_number query
if the passed number is 7039392929 then it should match 
with the employee cell_number set as `7039392929, 0288382222`
2019-08-21 15:19:08 +05:30
Mangesh-Khairnar
5619db28cb fix: fetch capital work in progress as expense account (#18780) 2019-08-21 14:49:24 +05:30
Nabin Hait
bcb0f6038e fix: Single gl entry should only be considered once either in opening or closing entry (#18792) 2019-08-21 14:47:33 +05:30
Deepesh Garg
e9e0c0e7d4 fix: Minor fix in GSTR-1 report (#18797) 2019-08-21 14:40:35 +05:30
Suraj Shetty
e84de50147 fix: check if number exists after striping '0' (#18805)
fix: check if number exists after striping '0'
2019-08-21 14:22:59 +05:30
Himanshu Warekar
c6e02e2a74 fix: make contact structure call popup compatible 2019-08-21 13:36:41 +05:30
Himanshu Warekar
ea97a6cb5b Merge develop into contacts-ref 2019-08-21 13:19:22 +05:30
Suraj Shetty
da2a623e38 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-21 11:48:27 +05:30
Suraj Shetty
6affeaa9c1 fix: check if number exists after striping '0'
- Absract number striping logic to separate method
- Rename a confusing variable name
- Remove leftout print statement
2019-08-21 09:14:56 +05:30
Suraj Shetty
d79a16c9f3 fix: Warehouse selection login
- Rename item_loactions -> locations, reference_items -> items
- Add customer and work_order field
- fix "Get Items" button UX
- fix get_pending_work_orders query

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2019-08-21 09:03:26 +05:30
rohitwaghchaure
d36ff39498 Merge pull request #18799 from scmmishra/cart-fix
fix: shopping cart item availability
2019-08-21 08:58:47 +05:30
Himanshu Warekar
9f4dc3fcd4 fix: call popup get contact name from number 2019-08-20 22:20:02 +05:30
Himanshu Warekar
128f5dbff1 Merge branch 'version-12-hotfix' of https://github.com/frappe/erpnext into contacts-ref 2019-08-20 20:38:18 +05:30
Mangesh-Khairnar
576f51d89e Merge pull request #18791 from Mangesh-Khairnar/fix-ledger-entry
fix: ledger entries
2019-08-20 19:57:50 +05:30
Shivam Mishra
eab5be1110 fix: shopping cart item availability 2019-08-20 19:31:54 +05:30
Mangesh-Khairnar
c9b6c9bb61 fix: calculate opening leave balance 2019-08-20 19:18:45 +05:30
Mangesh-Khairnar
6d549b03f1 Merge branch 'develop' into fix-ledger-entry 2019-08-20 17:58:44 +05:30
Saurabh
128db172f0 Merge pull request #18796 from sahil28297/merge_v12_hotfix_1
Merge version-12-hotfix into develop
2019-08-20 17:49:24 +05:30
Suraj Shetty
dd63b656c7 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-20 16:59:43 +05:30
Sahil Khan
5f2c030ddc Merge branch 'version-12-hotfix' into merge_v12_hotfix_1 2019-08-20 16:22:49 +05:30
deepeshgarg007
9e6abc4948 fix: Test case fixes 2019-08-20 16:14:44 +05:30
deepeshgarg007
cb38cc96c3 fix: Enhancement in Purchase Order 2019-08-20 15:00:48 +05:30
Mangesh-Khairnar
79414a8d36 fix: fetch employee name on leave ledger creation 2019-08-20 14:45:57 +05:30
Mangesh-Khairnar
5cdda19494 fix: ledger entries after expiry 2019-08-20 14:45:57 +05:30
rohitwaghchaure
16dda1a991 fix: group by voucher consolidated showing incorrect data for deferred entries (#18779) 2019-08-20 12:37:32 +05:30
Suraj Shetty
5124b2806d Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-20 12:05:51 +05:30
Suraj Shetty
060ff62178 Merge branch 'feature-pick-list' of github.com:surajshetty3416/erpnext into feature-pick-list 2019-08-20 12:04:11 +05:30
Suraj Shetty
1a090432d9 fix: Quantity while creating pick list from work order
- Fix get_mapped_doc config to filter items
- Fix erroneous condition in get_mapped_doc used for creation of pick_list
in sales order

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2019-08-20 12:04:07 +05:30
Suraj Shetty
a251267dd7 fix: Quantity while creating pick list from work order
- Fix get_mapped_doc config to filter items
- Fix erroneous condition in get_mapped_doc used for creation of pick_list
in sales order
2019-08-20 12:03:03 +05:30
rohitwaghchaure
9ef7d5edaf Merge pull request #18789 from rohitwaghchaure/asset_pro_rata_cal_for_wdv_remaining_amt_develop
Asset pro rata cal for wdv remaining amt develop
2019-08-20 10:33:15 +05:30
Rohit Waghchaure
5d3dee206f fixed test cases and the logic for pro rata calculation 2019-08-20 10:30:56 +05:30
Rohit Waghchaure
1583925080 fix: Pro rata calculation is not working for WDV depreciation method 2019-08-20 10:30:38 +05:30
Mangesh-Khairnar
becb89213f Merge pull request #18737 from Mangesh-Khairnar/fix-payment-order
fix: restrict the payment order to non received type payment entries
2019-08-20 00:13:32 +05:30
Rohit Waghchaure
1008e6e450 fix: debit note not reconciled with another purchase invoice using payment reconciliation 2019-08-19 20:27:15 +05:30
Mangesh-Khairnar
09ddc84c3a Merge pull request #18774 from deepeshgarg007/test_case_fix
fix: Failing sales and purchase return test cases
2019-08-19 19:20:52 +05:30
Deepesh Garg
33b392ac2b Update erpnext/controllers/sales_and_purchase_return.py
Co-Authored-By: Mangesh-Khairnar <mkhairnar10@gmail.com>
2019-08-19 17:43:10 +05:30
Deepesh Garg
3965451c7a Update erpnext/controllers/sales_and_purchase_return.py
Co-Authored-By: Mangesh-Khairnar <mkhairnar10@gmail.com>
2019-08-19 17:40:29 +05:30
deepeshgarg007
0487ad5515 fix: Code cleanup 2019-08-19 16:40:29 +05:30
deepeshgarg007
e2acc748c8 fix: Check for return against delivery noteas well 2019-08-19 16:38:04 +05:30
Mangesh-Khairnar
4645727163 Merge branch 'develop' into fix-payment-order 2019-08-19 16:29:30 +05:30
deepeshgarg007
7d288437d8 fix: Assignment 2019-08-19 16:19:48 +05:30
deepeshgarg007
c80e5fe7a1 fix: Failing sales and purchase return test cases 2019-08-19 14:38:15 +05:30
Deepesh Garg
5efedd7a60 fix: Travis (#18772) 2019-08-19 12:56:22 +05:30
Deepesh Garg
960a1cbd8f fix: Party dashboard heatmap not capturing sales, purchase and other activities (#18753) 2019-08-19 11:51:16 +05:30
Suraj Shetty
6450be5e58 fix: Get Items button 2019-08-19 10:48:21 +05:30
Suraj Shetty
669cff88d1 fix: Get items button 2019-08-19 10:38:01 +05:30
Anurag Mishra
19c3cb0d5b fix: removed filters(not required) (#18729) 2019-08-19 10:31:02 +05:30
Anurag Mishra
bc5712a1b3 fix: validated cost center in financial_statement (#18733)
* fix: validated cost center in financial_statement

* Update financial_statements.py
2019-08-19 10:24:44 +05:30
Mangesh-Khairnar
0df513434e fix: valuation rate in stock ledger (#18744)
* fix: valuation rate in stock ledger

* test: allow zero valuation rate for items
2019-08-19 10:04:52 +05:30
Karthikeyan S
d5e5e22adb Merge pull request #18523 from Vigneshsekar/attendance_grace_period
feat(Auto Attendance): Add grace period
2019-08-18 13:25:48 +05:30
Deepesh Garg
77ec3cf402 Merge pull request #18757 from deepeshgarg007/accounting_dimension_fix
fix: Default dimensions in child doctypes
2019-08-16 17:27:14 +05:30
deepeshgarg007
0a2ed6da37 fix: Add missing semicolon 2019-08-16 15:50:17 +05:30
Deepesh Garg
6e80cbfd1e Merge pull request #18761 from deepeshgarg007/symbol_fix_develop
fix: Symbol fix in chart of accounts
2019-08-16 15:48:17 +05:30
Faris Ansari
ac3579d2c6 Merge pull request #17624 from Mangesh-Khairnar/leave-management
feat: Carry Forward Leave Expiry
2019-08-16 15:39:24 +05:30
deepeshgarg007
8d0b6f9a60 fix: Handling if no default dimension exists 2019-08-16 14:00:26 +05:30
deepeshgarg007
42d9298318 fix: Remove extra space 2019-08-16 13:06:47 +05:30
Mangesh-Khairnar
4b71d9ca9f Merge branch 'develop' into fix-payment-order 2019-08-16 12:42:26 +05:30
Suraj Shetty
ec1fe9e2ca Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-16 08:17:26 +05:30
Suraj Shetty
182f4def00 fix: Delivery note creation from pick list
- Changes in serial no and batch no seletion
- Changes in warehouse overrwite logic

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2019-08-16 08:16:22 +05:30
deepeshgarg007
2fb6bc9867 fix: Default dimensions in child doctypes 2019-08-15 17:06:32 +05:30
Deepesh Garg
98a6e5cb6c Merge pull request #18742 from rohitwaghchaure/incorrect_sequnce_between_name_and_contact
fix: sequence of customer name and contact in the AR report
2019-08-14 23:20:55 +05:30
Rohit Waghchaure
c5d41af10f fix: sequence of customer name and contact in the AR report 2019-08-14 18:49:19 +05:30
Mangesh-Khairnar
dbb44c8950 fix: restrict the payment order to non received type payment entries 2019-08-14 17:38:44 +05:30
Mangesh-Khairnar
ae2a0fb4c7 chore: remove unused code 2019-08-14 16:50:31 +05:30
Mangesh-Khairnar
2e1d7cbdc2 Merge pull request #18736 from Mangesh-Khairnar/fix-travis
fix: travis
2019-08-14 16:33:34 +05:30
Mangesh-Khairnar
ca55af836b fix: travis 2019-08-14 16:32:02 +05:30
Mangesh-Khairnar
3a42631e65 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-08-14 16:11:08 +05:30
Mangesh-Khairnar
107b2768fd refactor: replace raw sql with orm 2019-08-14 16:09:16 +05:30
Mangesh-Khairnar
760b078dc9 fix(payroll-entry): commit submitted salary slip check on change (#18694)
* fix(payroll-entry): commit submitted salary slip check onchange

* fix: track submitted ss via flags
2019-08-14 14:40:00 +05:30
Deepesh Garg
2c5dcbe819 fix: Error handling in payment entry (#18720) 2019-08-14 14:26:37 +05:30
Mangesh-Khairnar
06ce1f5a40 fix(quality-inspection): fetch all items for inspection type in process (#18716)
* fix(quality-inspection): fetch all items for inspection type in process

* fix(quality-inspection): add server side validation for in process items
2019-08-14 14:25:59 +05:30
Vignesh S
4454630549 feat(Auto Attendance): Add grace period
Co-authored-by: Karthikeyan S <skarthikeyan1410@gmail.com>
2019-08-14 13:40:02 +05:30
Deepesh Garg
612b0ff9cd Merge pull request #18719 from Anurag810/company_fix_v13
fix: removed hard coded string
2019-08-14 12:12:26 +05:30
Anurag Mishra
de20b083a0 Merge branch 'develop' into company_fix_v13 2019-08-14 12:10:02 +05:30
Raffael Meyer
17166a5662 fix typo 2019-08-14 01:22:29 +02:00
Raffael Meyer
e6013fb02d improve error messages 2019-08-14 01:15:23 +02:00
Raffael Meyer
c29f594fc1 Check existance of DATEV Settings 2019-08-14 00:39:59 +02:00
Raffael Meyer
5fe44f906d Add fiscal year 2019-08-14 00:31:00 +02:00
Raffael Meyer
df4edaa0fd Use values from DATEV Settings 2019-08-14 00:13:31 +02:00
alyf-de
02522a0df5 Add DATEV Settings 2019-08-14 00:06:21 +02:00
Raffael Meyer
e4e7468972 Merge branch 'develop' into datev_report_headers 2019-08-13 23:17:28 +02:00
Anurag Mishra
904cbef4dc fix: removed hard coded string 2019-08-13 19:48:42 +05:30
Sagar Vora
33d00bfeae fix: v12 patches sequence (#18610) 2019-08-13 19:39:48 +05:30
rohitwaghchaure
4d7a0aaee1 Merge pull request #18705 from surajshetty3416/fix-payment-entry-account-permission
fix: Check if account passed is accessible under Payment Entry
2019-08-13 18:37:17 +05:30
Mangesh-Khairnar
dab5b1f319 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-08-13 13:33:26 +05:30
Mangesh-Khairnar
8b9b77959d fix: fetch min date when carry forward expiry is greater than leave allocation expiry 2019-08-13 13:20:10 +05:30
Anurag Mishra
d2f13fe0a6 fix: query (#18709) 2019-08-13 13:19:24 +05:30
Suraj Shetty
469e430d38 Merge branch 'fix-payment-entry-account-permission' of github.com:surajshetty3416/erpnext into fix-payment-entry-account-permission 2019-08-13 12:12:03 +05:30
Suraj Shetty
64a962ce97 fix: Re-organise code 2019-08-13 12:10:00 +05:30
Suraj Shetty
1a2600c9ea fix: Ignore account permission check 2019-08-13 12:09:06 +05:30
Himanshu
7df50b6ec7 fix(QMS): TreeView fixes (#18595)
* fix: TreeView fixes

* test: test case fix
2019-08-13 11:58:42 +05:30
Suraj Shetty
80afee04a4 fix: Set address while creating Opportunity from Lead (#18702)
* fix: Set address while creating Opportunity from Lead

* fix: Setting of address in opportunity from Lead
2019-08-13 10:58:29 +05:30
Suraj Shetty
bd2e7c0e53 fix: Comment description 2019-08-12 16:32:14 +05:30
Suraj Shetty
3234f0d299 fix: Check if account passed is accessible under Payment Entry 2019-08-12 16:18:36 +05:30
Faris Ansari
9002a6c195 Merge pull request #18353 from surajshetty3416/refactor-call-popup
fix(call popup): Multiple changes
2019-08-12 15:56:59 +05:30
Faris Ansari
9eda500dbc Merge branch 'develop' into refactor-call-popup 2019-08-12 15:56:35 +05:30
Rohit Waghchaure
fb23773935 fix: reconciled entry has not clearance date set 2019-08-12 15:35:19 +05:30
Frappe PR Bot
037caf096b feat: Updated translation (#18597) 2019-08-12 15:32:37 +05:30
Suraj Shetty
f81b6c7cfb fix: Set address while creating Opportunity from Lead (#18700) 2019-08-12 13:05:22 +05:30
DeeMysterio
1c728a7cf8 fix(delivery note): change the text invoice to sales invoice on make button (#18658) 2019-08-12 13:04:25 +05:30
Michelle Alva
af969d664f Added Employee Tax Exxxemption category and sub-category links (#18659) 2019-08-12 12:59:59 +05:30
Himanshu
ebf38c5ebd fix: misc fixes (#18616) 2019-08-12 12:17:16 +05:30
Andrew McLeod
c97ffaeac3 fix: Python3 urllib use in item_group.py (now uses six.moves) (#18643) 2019-08-12 12:06:30 +05:30
Shivam Mishra
8363a6e585 refactor: remove from date and to date from standard filter (#18696) 2019-08-12 11:58:14 +05:30
sahil28297
214815eb62 fix(patch): force reload child docs (#18672) 2019-08-12 11:49:21 +05:30
Deepesh Garg
43dc351209 Merge pull request #18692 from deepeshgarg007/gstr-3b-non-gst-develop
fix: GSTR 3B report fixes
2019-08-11 19:50:29 +05:30
deepeshgarg007
9db6471fae fix: Test Case 2019-08-11 17:29:09 +05:30
deepeshgarg007
4b28b3216b fix: Test Cases 2019-08-11 17:28:55 +05:30
deepeshgarg007
c36abbcda3 fix: GSTR 3B report fixes 2019-08-11 11:01:02 +05:30
Deepesh Garg
e6b076cb34 Merge pull request #18632 from netchampfaris/fix-item-template-description-fp
fix(Item Template): Fallback description string
2019-08-10 17:33:59 +05:30
Deepesh Garg
0b711d1f8a Merge pull request #18684 from marination/fixes_v12
fix: Fixed error message in Payment Entry for outstanding invoices not found via filters
2019-08-10 17:26:54 +05:30
Suraj Shetty
3f7a757e80 Merge branch 'refactor-call-popup' of github.com:surajshetty3416/erpnext into refactor-call-popup 2019-08-09 19:23:09 +05:30
Suraj Shetty
d4edd284e6 fix: Set Contact or Lead for call log
- Set contact or lead to call log on new Contact or Lead creation
2019-08-09 19:23:04 +05:30
Suraj Shetty
b282f1f154 Merge branch 'develop' into refactor-call-popup 2019-08-09 18:18:17 +05:30
Himanshu Warekar
3fbfac64c2 Merge contacts-ref into contacts-ref 2019-08-09 17:51:14 +05:30
Himanshu Warekar
12fbecf48b fix: use primary label instead of bold letters 2019-08-09 17:50:03 +05:30
Himanshu
59a6821299 Merge branch 'version-12-hotfix' into contacts-ref 2019-08-09 16:52:39 +05:30
marination
4583100537 fix: Fixed error message in Payment Entry for outstanding invoices not found via filters 2019-08-09 15:30:05 +05:30
Deepesh Garg
ca5fdeb9bb Merge pull request #18683 from Mangesh-Khairnar/fix-translation-test
test: Translation in search
2019-08-09 15:29:33 +05:30
rohitwaghchaure
208eb05519 Merge pull request #18682 from Anurag810/get-item-from-product-bundle-v13
fix: get item from product bundle
2019-08-09 15:18:15 +05:30
Mangesh-Khairnar
7c7e9ecfcd test: translation fix 2019-08-09 14:48:36 +05:30
Anurag Mishra
8d4b04e719 fix: get item from product bundle 2019-08-09 14:34:09 +05:30
Mangesh-Khairnar
e173d54054 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-08-09 13:37:51 +05:30
Mangesh-Khairnar
261d132f3a fix: calculate earned leaves based on annual allocation 2019-08-09 13:18:52 +05:30
Himanshu
0184c981ee Merge branch 'version-12-hotfix' into contacts-ref 2019-08-09 11:15:28 +05:30
Suraj Shetty
e047de854b Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-09 11:14:14 +05:30
Himanshu Warekar
86f3310ac1 fix: iterate over valid variable 2019-08-09 11:05:04 +05:30
Himanshu Warekar
f94d183297 feat: move to newer contacts structure 2019-08-08 23:50:03 +05:30
Himanshu Warekar
224c2ddaf4 feat: render multiple addresses 2019-08-08 23:34:34 +05:30
Mangesh-Khairnar
3662ed50d2 fix: multiple changes 2019-08-08 19:47:17 +05:30
Suraj Shetty
7e818067eb Merge branch 'develop' into refactor-call-popup 2019-08-08 19:18:03 +05:30
Suraj Shetty
44b906a43d Merge branch 'refactor-call-popup' of github.com:surajshetty3416/erpnext into refactor-call-popup 2019-08-08 19:16:37 +05:30
Suraj Shetty
429bfcfd83 fix: Make requested changes 2019-08-08 19:16:32 +05:30
Faris Ansari
99c26e068d fix: Set Maintenance Status fields as Read Only (#18634)
Maintenance Status is set based on warranty_expiry_date and
amc_expiry_date. Even if they are editable they are set programmatically
server side. Better to make them as read only.
2019-08-08 17:45:49 +05:30
Mangesh-Khairnar
bafc89f439 refactor: convert raw sql to orm 2019-08-08 17:43:23 +05:30
Mangesh-Khairnar
f3a5188bec fix: accounting period (#18477)
* fix: accounting period

* test: accounting period

* fix: account period creation

* fix: remove status field from accounting period
2019-08-08 17:39:13 +05:30
Mangesh-Khairnar
9bc4232af6 feat: calculate remaining leaves both multiple simultaneous allocation 2019-08-08 17:11:08 +05:30
Mangesh-Khairnar
5cbe6160ca feat: consider carry forwarded leaves on creation of encashment 2019-08-08 17:06:15 +05:30
Deepesh Garg
f2bf76a2ef fix: Show Cr or Dr symbol in chart of accounts based on balance (#18653)
* fix: Show Cr or Dr symbol in chart of accounts based on balance

* fix: Typo fix in comment
2019-08-08 15:52:39 +05:30
Deepesh Garg
065e8f3650 fix: Changes in print format due to attribute name changes in frappe (#18639) 2019-08-08 15:51:56 +05:30
Faris Ansari
afae8a0c46 fix: Show created serial nos as links in message (#18636)
Fixes #18623
2019-08-08 15:50:17 +05:30
Aditya Hase
472050bb8a fix(quickbooks): Do not build global search for QuickBooks Migrator (#18628) 2019-08-08 15:48:35 +05:30
Suraj Shetty
c7716f0bbc Merge branch 'develop' into refactor-call-popup 2019-08-08 12:50:20 +05:30
Faris Ansari
3623452839 fix(Item Template): Fallback description string
Fixes #18572
2019-08-07 17:21:51 +05:30
Rushabh Mehta
6276f1adc5 fix(minor): don't update modified timestamp for overdue tasks 2019-08-07 16:32:44 +05:30
Suraj Shetty
cab8e9be89 fix(timesheet): Hours automatically used to set 0
- Case: If the company had standard working hour set
and when the user creates a timesheet with same date for
"To" and "From" then the hours field automatically used to
get reset to 0 after saving the form.
2019-08-07 10:40:29 +05:30
Suraj Shetty
0c699f0726 fix: Paid amount 0 while creating advanced payment entry
Paid amount is set 0 while creating advanced payment entry
against multi-currency purchase order.

Solution: Populate paid amount value after applying conversion rate
2019-08-07 10:17:05 +05:30
Suraj Shetty
9f4b270116 fix: prev_doc 2019-08-06 09:03:23 +05:30
Suraj Shetty
4ca82f9308 fix: Show contact and lead name in list view 2019-08-06 05:49:01 +05:30
Suraj Shetty
207f218db3 Merge branch 'refactor-call-popup' of github.com:surajshetty3416/erpnext into refactor-call-popup 2019-08-06 05:44:28 +05:30
Suraj Shetty
89d8a0b6fd fix: reset_employee_emails_cache method 2019-08-06 05:44:13 +05:30
Suraj Shetty
f6f849226e Merge branch 'develop' into refactor-call-popup 2019-08-05 21:25:12 +05:30
Suraj Shetty
7d3f1fef1c fix: Employee selection for call popup
- Check if employee with matched number is also
 scheduled to receive popup
2019-08-05 21:21:45 +05:30
Mangesh-Khairnar
314647572c fix: check for old unexpired allocation 2019-08-05 15:35:19 +05:30
Mangesh-Khairnar
6bed870dfa feat: pro-rata leave allocation 2019-08-05 14:47:53 +05:30
Mangesh-Khairnar
f281f00d43 feat: auto leave encashment 2019-08-05 14:47:53 +05:30
Deepesh Garg
e4abaa7cdd Merge pull request #18591 from deepeshgarg007/utils_fix_develop
fix: Ambigious column in query
2019-08-05 14:45:30 +05:30
Rucha Mahabal
d9fa83b196 fix: added Company by default in session defaults (#18471) 2019-08-05 14:15:16 +05:30
deepeshgarg007
043f70e9a6 fix: Aambigious column in query 2019-08-05 12:40:50 +05:30
Faris Ansari
9983d90e24 chore: Remove package-lock.json (#18565)
Yarn uses yarn.lock
2019-08-05 12:32:41 +05:30
Suraj Shetty
0957480305 fix: Show popup to employees with same phone number 2019-08-05 11:32:51 +05:30
Frappe PR Bot
833afea3e3 feat: Updated translation (#18542) 2019-08-05 10:38:37 +05:30
Mangesh-Khairnar
31c5c1e562 fix(payroll-entry): show make bank entry button (#18497)
* fix(payroll-entry): show make bank entry button when manually submitting salary slip

* Update payroll_entry.py
2019-08-05 10:21:19 +05:30
Anurag Mishra
f9fb92ebb0 feat: validate cwip accoutns in journal entry (#18519) 2019-08-05 10:18:37 +05:30
Mangesh-Khairnar
a3d5200194 fix(sales-order): update items (#18535)
* fix(sales-order): update items

* fix: minor changes

* Update: accounts controller
2019-08-05 10:16:40 +05:30
Deepesh Garg
cfb899451f fix: Make conversion rate optional for non itemized items (#18541) 2019-08-05 10:14:05 +05:30
Deepesh Garg
fb5aa43e77 fix: Type error handling while getting material request items (#18549)
* fix: Type error handling while getting material request items

* fix: Remove flt
2019-08-05 10:12:42 +05:30
Deepesh Garg
a7eaa4de14 fix: Customer price list not honored in shopping cart (#18556) 2019-08-05 10:10:53 +05:30
Mangesh-Khairnar
06a0afa039 Feat: Notify by email feature (#18587)
* feat: notify user by email in employee onboarding control

* fix: create task on update after submit
2019-08-05 10:07:05 +05:30
Mangesh-Khairnar
d66396f4e9 fix(employee-advance): update employee advance on change in expense claim (#18588)
* fix(employee-advance): update employee advance on rejection/cancellation of expense claim

* fix(expense-claim): display appropriate buttons only if linked transactions are valid

* Update employee_advance.py
2019-08-05 10:04:05 +05:30
Suraj Shetty
35c4b78e66 Merge branch 'develop' of github.com:frappe/erpnext into refactor-call-popup 2019-08-04 22:23:03 +05:30
Deepesh Garg
7668cd7053 Merge pull request #18577 from deepeshgarg007/taxes_and_totals_v13
fix: Error handling in taxes and totals
2019-08-03 18:26:54 +05:30
deepeshgarg007
b656529818 fix: Error handling in taxes and totals 2019-08-03 13:49:33 +05:30
Deepesh Garg
4d38a5043f Merge pull request #18573 from deepeshgarg007/error_report_develop
fix: Remove payment order from bank dashboard
2019-08-03 12:17:13 +05:30
deepeshgarg007
93e46310b8 fix: Remove payment order from bank dashboard 2019-08-03 10:17:44 +05:30
Suraj Shetty
4b3b358ac6 fix: Show correct label instead of showing undefined (#18559) 2019-08-02 21:46:38 +05:30
Suraj Shetty
6fd3a86012 fix: Option to create pick list from work order 2019-08-02 16:48:31 +05:30
sahil28297
7d7e4534dd Merge pull request #18566 from scmmishra/task-fix
fix: task not updated issue
2019-08-02 14:15:19 +05:30
sahil28297
c7abc025ff Merge branch 'develop' into task-fix 2019-08-02 14:14:52 +05:30
Shivam Mishra
dc53e8ebb0 fix: task not updated issue 2019-08-02 13:56:49 +05:30
Suraj Shetty
c6857e562b fix: Check zero valuation rate only for valid doctypes (#18529)
fix: Check zero valuation rate only for valid doctypes
2019-08-02 11:22:31 +05:30
Suraj Shetty
3f31a56fb3 feat(customer): Add report to show item prices per Customer (#17930)
feat(customer): Add report to show item prices per Customer
2019-08-02 11:11:51 +05:30
Suraj Shetty
c154e57603 Merge branch 'develop' into stock-ledger-fix_develop 2019-08-02 08:44:21 +05:30
Suraj Shetty
c57328669a feat: Add pick list print format 2019-08-02 08:14:27 +05:30
Suraj Shetty
b35c0410b1 fix: Add option to get items from work order 2019-08-02 08:12:30 +05:30
Rohan
fc04d334da Merge branch 'develop' into develop-customer-item-price-report 2019-08-01 17:51:03 +05:30
Suraj Shetty
a7dc3735ae fix: Move folders to right location 2019-08-01 15:49:29 +05:30
Deepesh Garg
4be00502cc Merge pull request #18546 from deepeshgarg007/bank_dashboard_fix
fix: Payment Order link fix in bank dashboard
2019-08-01 15:24:53 +05:30
deepeshgarg007
8704bc6f39 fix: Payment Order link fix in bank dashboard 2019-08-01 13:24:48 +05:30
Suraj Shetty
e06f486aee fix: Rename methods 2019-08-01 12:54:33 +05:30
Suraj Shetty
bb7a2dbb6a fix: Rename file 2019-08-01 12:38:26 +05:30
Suraj Shetty
0c1dbb116f Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-08-01 12:06:20 +05:30
Suraj Shetty
fbcc56536b fix: Rename Pick TIcket -> Pick List 2019-08-01 12:05:20 +05:30
Suraj Shetty
fa9111ebe2 fix: Add and rename some fields
- Add ability to create delivery note from pick ticket
- Minor fix related to create button
2019-08-01 11:07:14 +05:30
Mangesh-Khairnar
8fb600162e fix: remove all leaves via scheduler 2019-07-31 19:31:26 +05:30
Mangesh-Khairnar
5eac8703da fix: create reverse expiry for back dated leaves 2019-07-31 19:28:21 +05:30
Deepesh Garg
d301d26fda fix: Enhancement in credit note (#18511)
* fix: Credit note enhancement

* Fix: Print format for Sales Invoice Return

* fix: Zero quantity validation fix for credit note
2019-07-31 15:58:19 +05:30
deepeshgarg007
f9c0ef3eb3 fix: Check zero valuation rate only for valid doctypes 2019-07-30 19:01:53 +05:30
Suraj Shetty
72d03464dc fix: Show "Get Item Location" only if there are reference items 2019-07-30 11:56:24 +05:30
Suraj Shetty
14fb1600ec fix: Select location based on group warehouse 2019-07-30 11:47:21 +05:30
Suraj Shetty
341f7733d1 fix: Make item read-only in item location table 2019-07-30 10:02:50 +05:30
Suraj Shetty
e260e8239f fix: Batch number selection code 2019-07-30 10:02:10 +05:30
Suraj Shetty
55ab31314c fix: Add code to set batch no
- And split item based on batch availibility
2019-07-30 09:02:03 +05:30
Suraj Shetty
36c724d7b5 fix(Issue): reset issue fulfilled indicator (#18454)
fix(Issue): reset issue fulfilled indicator
2019-07-29 18:27:53 +05:30
Suraj Shetty
9ad10cb425 test: Add basic tests 2019-07-29 16:52:26 +05:30
Deepesh Garg
62daa43a4c Merge pull request #18513 from deepeshgarg007/trail_balance_fix
fix: Opening balance not getting calculated in trail balance report
2019-07-29 15:38:39 +05:30
rohitwaghchaure
a55e4e2c03 Merge pull request #18452 from rohitwaghchaure/scrap_item_not_adding
fix: scrap item not adding while doing finished good entry
2019-07-29 15:30:24 +05:30
deepeshgarg007
4c652396d0 fix: Opening balance not getting calculated in trail_balance_report 2019-07-29 14:57:33 +05:30
Deepesh Garg
8d00ee4f81 Merge pull request #18403 from deepeshgarg007/defaut_accounting_dimension
fix: Company specific default accounting dimensions
2019-07-29 12:12:40 +05:30
Suraj Shetty
7e20324776 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-07-29 09:41:08 +05:30
deepeshgarg007
ec421df4e4 fix: Code cleanup 2019-07-29 08:58:56 +05:30
Suraj Shetty
27bdba49d4 test: Add test case statements 2019-07-28 22:04:07 +05:30
Suraj Shetty
d43764c8e5 fix: Use .set method to set serial no. 2019-07-28 22:03:28 +05:30
deepeshgarg007
6a43f6718a fix: Reload doc in patch 2019-07-28 10:30:32 +05:30
deepeshgarg007
a65ad10c62 fix: GL entry validation fix 2019-07-27 19:06:36 +05:30
deepeshgarg007
4fce891241 Merge branch 'develop' of https://github.com/frappe/erpnext into defaut_accounting_dimension 2019-07-27 18:11:34 +05:30
Himanshu
9443e8e85f Merge branch 'develop' into iss_ful_fix_v13 2019-07-26 12:51:09 +00:00
Deepesh Garg
ce63b1f669 Merge pull request #18317 from deepeshgarg007/stock_ageing_fix
fix: Enhancement in stock ageing report
2019-07-26 15:45:48 +05:30
Saurabh
af19347376 Merge branch 'develop' into scrap_item_not_adding 2019-07-26 15:10:17 +05:30
Suraj Shetty
64f174fcaa feat: Get item location from reference items
- Add option to get items from multiple sales order
- Add some required fiels to Pick TIcket Reference Item
2019-07-26 13:22:05 +05:30
Himanshu
e87fbcc286 Merge branch 'develop' into iss_ful_fix_v13 2019-07-26 07:31:44 +00:00
Deepesh Garg
941e21092c Merge branch 'develop' into stock_ageing_fix 2019-07-26 12:47:05 +05:30
Deepesh Garg
c391d65dc3 Merge pull request #18488 from adityahase/faster
perf(travis): Faster builds
2019-07-26 12:41:01 +05:30
Himanshu
0162d0a2ea Merge branch 'develop' into iss_ful_fix_v13 2019-07-26 06:58:55 +00:00
rohitwaghchaure
ad89b029c2 Merge pull request #18494 from netchampfaris/parent-account-child-account-currency-fp
fix(Account): Pass parent currency to child currency
2019-07-26 12:13:27 +05:30
deepeshgarg007
15154d4bd0 Merge branch 'develop' of https://github.com/frappe/erpnext into stock_ageing_fix 2019-07-26 10:30:22 +05:30
deepeshgarg007
dda6b5cd53 fix: Add accounting dimensions to subscription and opening invoice tool 2019-07-26 09:14:42 +05:30
deepeshgarg007
aa92df4ddc fix: Test cases for accounting dimensions 2019-07-26 09:14:42 +05:30
deepeshgarg007
0ce2afc9bc fix: Test Cases for accounting dimensions 2019-07-26 09:14:42 +05:30
deepeshgarg007
41a1cd954c fix: Set query fix 2019-07-26 09:14:42 +05:30
deepeshgarg007
b124aff0bb fix: Codacy Fixes 2019-07-26 09:14:42 +05:30
deepeshgarg007
703fc08467 fix: Patch 2019-07-26 09:14:42 +05:30
deepeshgarg007
6dd5f74671 fix: Remove dimensions from boot 2019-07-26 09:14:42 +05:30
deepeshgarg007
ada1ac8013 fix: Added default dimension and filter in bootinfo 2019-07-26 09:14:42 +05:30
deepeshgarg007
efd6307bc4 fix: Default Accounting Dimensions in doctypes 2019-07-26 09:14:42 +05:30
Faris Ansari
0ec747f57c fix(Account): Pass parent currency to child currency
In a scenario where Parent Company Account's Currency is different
from it's default currency, the Account Currency of Child would be set
from the default currency of Company which might be wrong
2019-07-26 08:55:34 +05:30
Deepesh Garg
059c568f08 Merge pull request #18482 from deepeshgarg007/bank_reco_develop
fix: Dynamic link issue fix in Bank reconciliation statement
2019-07-26 08:48:49 +05:30
Deepesh Garg
641e8fea02 Merge branch 'develop' into bank_reco_develop 2019-07-26 08:48:02 +05:30
Deepesh Garg
cd645de4f9 Merge pull request #18474 from deepeshgarg007/gstr-1-query-v13
fix: GSTR-1 query fix
2019-07-26 08:45:59 +05:30
Aditya Hase
96eec7e2cd chore: Empty commit 2019-07-26 05:06:42 +05:30
Aditya Hase
1e82638ae8 perf(tests): Remove unnecessary tearDown code 2019-07-26 03:52:17 +05:30
Aditya Hase
ff79463e36 perf(travis): Use setUpClass instead of setUp 2019-07-26 03:08:45 +05:30
Aditya Hase
6bc2988623 fix(stock): Fix travis builds 2019-07-26 03:08:45 +05:30
Aditya Hase
0f072d7d40 perf(tests): Use country with lesser fixtures 2019-07-26 01:11:57 +05:30
Aditya Hase
0ae786adec perf(tests): Do not unnecessarily create companies 2019-07-26 00:38:51 +05:30
Aditya Hase
6a5b7f751c perf(tests): Use setUpClass and tearDownClass instead of setUp and tearDown 2019-07-26 00:23:13 +05:30
Aditya Hase
a630a24040 fix(travis): Install wkhtmltopdf 2019-07-25 22:40:26 +05:30
Aditya Hase
fdb395c977 fix(travis): Remove redundant arguments 2019-07-25 21:51:12 +05:30
Aditya Hase
dac46ed6e1 fix(travis): Use --site parameter 2019-07-25 21:50:46 +05:30
Aditya Hase
6002fd7820 fix(travis): Merge install and before_script 2019-07-25 21:39:30 +05:30
Aditya Hase
4b680178be fix(travis): Execute get-app before bench start 2019-07-25 21:38:07 +05:30
Aditya Hase
5542af9be8 perf(travis): Use travis optimizations 2019-07-25 21:36:22 +05:30
Aditya Hase
1de45877b1 perf(travis): Do not build assets 2019-07-25 21:28:15 +05:30
Aditya Hase
13919440a7 perf(travis): Remove unnecessary processes from Procfile 2019-07-25 21:27:20 +05:30
Aditya Hase
543996652b fix(travis): Use MariaDB credentials from site_config.json 2019-07-25 21:25:53 +05:30
Aditya Hase
6f978d2497 perf(travis): Do not waste 10 seconds 2019-07-25 21:23:43 +05:30
Aditya Hase
97ad6352af fix(travis): Execute get-app and reinstall after bench start 2019-07-25 21:23:24 +05:30
Aditya Hase
6e2fa02c56 fix(travis): Do not disable scheduler using CLI 2019-07-25 21:21:54 +05:30
Aditya Hase
6f025e7b4f fix(travis): Do not use use_site 2019-07-25 21:21:19 +05:30
Aditya Hase
8005022508 fix(travis): Setup MariaDB 2019-07-25 21:19:30 +05:30
Aditya Hase
06ca6f7705 fix(travis): Remove unused files 2019-07-25 21:18:05 +05:30
Aditya Hase
ac185989ff fix(travis): Remove travis/bench_init.sh 2019-07-25 21:15:30 +05:30
Aditya Hase
306a410b77 fix(travis): Do not execute install.py 2019-07-25 21:11:18 +05:30
Aditya Hase
c49d45497c fix(travis): Install coverall after tests 2019-07-25 21:10:06 +05:30
Aditya Hase
828699f26a fix(travis): Use MariaDB 10.3 2019-07-25 21:09:34 +05:30
Aditya Hase
7204bcb932 fix(travis): Restructure build matrix 2019-07-25 17:48:17 +05:30
Mangesh-Khairnar
5ca3e83a00 feat: add ledger link in hr config 2019-07-25 14:35:39 +05:30
deepeshgarg007
f56284b0c1 Dynamic link issue fix in Bank reconciliation statement 2019-07-25 12:47:32 +05:30
Suraj Shetty
3b31800533 fix: Add logic to set batch no [WIP]
- Add pick ticket reference item
2019-07-25 11:22:45 +05:30
deepeshgarg007
b1f3e0224c fix: GSTR-1 query fix 2019-07-24 21:36:56 +05:30
Anurag Mishra
0505135f90 Merge branch 'develop' into refactor-call-popup 2019-07-24 18:33:14 +05:30
Aditya Hase
14600e6a3e fix(travis): Remove unnecessary commands 2019-07-24 15:18:52 +05:30
Suraj Shetty
0576ad5ef9 fix: Move pick list creation code to picklist.py file 2019-07-24 15:16:03 +05:30
Suraj Shetty
778b4926bf fix: Fetch warehouse location from Bin 2019-07-24 11:27:32 +05:30
Himanshu Warekar
20e1a3e199 fix: reset issue fulfilled indicator 2019-07-23 17:00:23 +05:30
Rohit Waghchaure
bcfbc792b4 fix: scrap item not adding while doing finished good entry 2019-07-23 16:05:29 +05:30
Suraj Shetty
ed4f8cf65d Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-07-23 13:29:41 +05:30
Mangesh-Khairnar
bb1be2e2ee chore: change fieldname for carried forward leave expiry 2019-07-23 13:18:40 +05:30
Aditya Hase
48d9cfe304 fix(website): Remove references to Product Settings.products_a… (#18448)
This was accidentally added back in 34c551d9a5 (diff-f0a387cdb305471e74e523ecc4e646ac)
2019-07-23 12:05:31 +05:30
deepeshgarg007
a19d1d6926 fix: Fixes in stock ageing report 2019-07-23 08:30:09 +05:30
Mangesh-Khairnar
fd1d4c2927 chore: split expire allocation 2019-07-22 18:05:27 +05:30
Mangesh-Khairnar
08c02287dd fix: expiry allocaton after creating all the transactions 2019-07-22 17:47:03 +05:30
deepeshgarg007
d9cc84892b fix: Use get_serial_no and remove batch 2019-07-22 15:56:41 +05:30
Mangesh-Khairnar
f6cf58fa8c fix: change get all to sql list 2019-07-22 15:32:41 +05:30
deepeshgarg007
3877b5407c fix: Remove batch 2019-07-22 15:30:18 +05:30
Suraj Shetty
1e9a6e6b7e Merge branch 'refactor-call-popup' of github.com:surajshetty3416/erpnext into refactor-call-popup 2019-07-22 15:19:31 +05:30
Suraj Shetty
4177ecb6b2 Merge branch 'develop' of github.com:frappe/erpnext into refactor-call-popup 2019-07-22 15:18:03 +05:30
Mangesh-Khairnar
cbc22e6369 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-07-22 13:57:04 +05:30
Mangesh-Khairnar
29e9f14f95 fix: minor changes 2019-07-22 13:54:39 +05:30
deepeshgarg007
55ca054cb4 Merge branch 'develop' of https://github.com/frappe/erpnext into stock_ageing_fix 2019-07-22 12:46:30 +05:30
Suraj Shetty
4bf65dd0d9 Merge branch 'develop' into develop-customer-item-price-report 2019-07-18 10:15:20 +05:30
Suraj Shetty
06b56adc71 Merge branch 'develop' into develop-customer-item-price-report 2019-07-17 17:29:42 +05:30
Suraj Shetty
6824838ab0 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-07-17 15:39:09 +05:30
Suraj Shetty
9eb091162a Merge branch 'develop' into refactor-call-popup 2019-07-17 13:23:54 +05:30
Suraj Shetty
82cfccab2f fix: Get user_id of employee instead of name
- Remove caching from lead
2019-07-17 11:52:35 +05:30
deepeshgarg007
4a7f370b15 fix: Consider serial no and batches in Stock ageing report 2019-07-16 16:08:50 +05:30
Suraj Shetty
2295921821 Merge branch 'develop' into refactor-call-popup 2019-07-16 13:54:07 +05:30
Suraj Shetty
e7d277d51e fix: Last communication query 2019-07-16 13:53:41 +05:30
Suraj Shetty
f5dd494716 fix(call popup): Multiple changes
- Remove summary from call log use comments instead
- Add contact and lead if matched to the call log
- Add received by field with Employee Link
- DocPerm to allow Employees to have read access on call log
- Remove unwanted code
- Add a method to get lead just by providing phone number
- Show popup only to Employee to which the system is trying to connect.
- Remove custom code from call popup dialog and replace it with
 standard fields
- Increase timeout to hide popup after the call has been disconnected.
2019-07-16 11:07:25 +05:30
deepeshgarg007
6ecbd97fbe Merge branch 'develop' of https://github.com/frappe/erpnext into stock_ageing_fix 2019-07-16 09:02:48 +05:30
deepeshgarg007
581d931031 fix: Enhancement in stock ageing report 2019-07-13 21:58:32 +05:30
deepeshgarg007
d43d19acfd Merge branch 'develop' of https://github.com/frappe/erpnext into stock_ageing_fix 2019-07-13 11:40:05 +05:30
Suraj Shetty
ca872381a1 Merge branch 'develop' of github.com:frappe/erpnext into feature-pick-list 2019-07-12 12:13:09 +05:30
Suraj Shetty
32371c8755 feat: Init Pick Ticket and Pick Ticket Item 2019-07-12 11:56:42 +05:30
deepeshgarg007
1dc124cf75 fix: Changed columns to new dict form 2019-07-10 14:49:25 +05:30
Raffael Meyer
59cee369ce add header row 2019-07-08 14:48:54 +02:00
Mangesh-Khairnar
80fb0bf520 fix: add employee leave balance report to the dashboard 2019-07-03 13:06:46 +05:30
Mangesh-Khairnar
8d19faa598 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-07-03 11:44:00 +05:30
Mangesh-Khairnar
0d4db95d99 fix: skip expired leaves on allocation end date 2019-07-03 11:35:51 +05:30
Mangesh-Khairnar
bd999b0908 fix: minor changes 2019-06-21 00:49:48 +05:30
Mangesh-Khairnar
439313e524 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-06-19 13:10:53 +05:30
Mangesh-Khairnar
12a2b21465 fix: track status for pending leaves 2019-06-19 13:00:52 +05:30
Rohan Bansal
0426636a32 fix(customer): Improve performance by reducing queries 2019-06-17 12:16:12 +05:30
Mangesh-Khairnar
1db0fc91a5 fix: check generated ledger entries to avoid overlap 2019-06-14 15:48:31 +05:30
Mangesh-Khairnar
fefdac432c refactor: add json changes 2019-06-14 15:39:50 +05:30
Mangesh-Khairnar
24fbe23c8d fix: add indicators for expire in the leave allocation list 2019-06-14 15:36:26 +05:30
Mangesh-Khairnar
87adaed933 fix: generate ledger entries for all leave transactions 2019-06-14 15:13:53 +05:30
Mangesh-Khairnar
4e1b60d401 style: change formatting 2019-06-14 11:15:54 +05:30
Rohan Bansal
e3a3306b30 feat(customer): Add report to show item prices per Customer 2019-06-13 14:53:33 +05:30
Mangesh-Khairnar
283d2c5ca2 fix: only create leave application ledger on intermediate allocation expiry 2019-06-11 16:35:29 +05:30
Mangesh-Khairnar
b16d395a8f Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-06-07 11:33:06 +05:30
Mangesh-Khairnar
e4d03bf0d0 fix: consider expiry in leaves 2019-06-07 11:30:27 +05:30
Mangesh-Khairnar
368a974368 style: change formatting 2019-06-06 20:43:32 +05:30
Mangesh-Khairnar
86e0f4c617 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-06-06 20:41:28 +05:30
Mangesh-Khairnar
c7b9ae9c5e fix: get leave balance based on the ledger entries 2019-06-06 20:38:59 +05:30
Mangesh-Khairnar
b840ba4407 feat: show dashboard on submit 2019-06-06 20:38:23 +05:30
Mangesh-Khairnar
00c607116b fix: handle negative leaves without allocation 2019-06-06 20:37:34 +05:30
Mangesh-Khairnar
f13243a92e feat: fetch annual allocation based on leave policy 2019-06-06 20:35:10 +05:30
Mangesh-Khairnar
3863fc5fb2 feat: create ledger entry for each earned leave 2019-06-06 20:34:10 +05:30
Mangesh-Khairnar
050f65beb4 feat: fetch leave allocation from ledger entry 2019-06-06 20:32:01 +05:30
Mangesh-Khairnar
351f4d53a0 feat: add employee filter to employee leave balance 2019-06-05 21:22:07 +05:30
Mangesh-Khairnar
62011c9dc4 feat: add link to policy 2019-06-05 21:16:27 +05:30
Mangesh-Khairnar
afa1dc4ffa feat: expire current allocation 2019-06-03 20:09:22 +05:30
Mangesh-Khairnar
c5385e141b fix: add mandatory reason fields in leave application 2019-05-31 00:53:28 +05:30
Mangesh-Khairnar
95e5d812fe fix: UX changes 2019-05-30 22:22:15 +05:30
Mangesh-Khairnar
91e62f575e fix: department filters in employee leave balance 2019-05-30 13:38:35 +05:30
Mangesh-Khairnar
2124d9884b fix: pass positional arguments on creation of leave application 2019-05-30 13:21:34 +05:30
Mangesh-Khairnar
aafb5cb6f6 fix: ignore expired non-carry forwarded allocation on calculating leaves taken 2019-05-30 13:13:14 +05:30
Mangesh-Khairnar
ded33a7e2e fix: ledger entries creation 2019-05-29 19:12:19 +05:30
Mangesh-Khairnar
7cc6a67c18 add department filter to employee leave balance 2019-05-29 15:59:20 +05:30
Mangesh-Khairnar
8f47bffa0e fix: create an instance 2019-05-29 15:54:14 +05:30
Mangesh-Khairnar
ae4228aed4 fix: fetch queries 2019-05-28 13:24:15 +05:30
Mangesh-Khairnar
9d6151d200 patch: add reload doc for leave ledger entry 2019-05-28 11:45:51 +05:30
Mangesh-Khairnar
c6d6adcbf3 fix: ledger entry creation for encashment 2019-05-28 09:44:38 +05:30
Mangesh-Khairnar
61bb236cfa test: delete ledger entry after each test to maintain balance 2019-05-27 19:36:40 +05:30
Mangesh-Khairnar
35786c0067 Merge branch 'leave-management' of https://github.com/Mangesh-Khairnar/erpnext into leave-management 2019-05-27 15:42:11 +05:30
Mangesh-Khairnar
6f69bbe1d7 test: leave ledger balance 2019-05-27 15:40:36 +05:30
Mangesh-Khairnar
7fbaef5de3 fix: expiry ledger creation 2019-05-27 15:39:48 +05:30
Nabin Hait
c9a4111f4d Merge branch 'develop' into leave-management 2019-05-27 13:59:27 +05:30
Mangesh-Khairnar
705b7dc9c2 Merge branch 'develop' of https://github.com/frappe/erpnext into leave-management 2019-05-27 11:21:06 +05:30
Mangesh-Khairnar
71cdcb3593 style: add a more descriptive method name 2019-05-27 11:00:04 +05:30
Mangesh-Khairnar
24248f687b patch: create entries for only missing transactions 2019-05-27 10:58:42 +05:30
Mangesh-Khairnar
45197965d7 fix: give cancellation permission to hr manager 2019-05-27 03:26:48 +05:30
Mangesh-Khairnar
d751281fa7 fix: application and leave encashment test cases 2019-05-27 03:23:58 +05:30
Mangesh-Khairnar
e7d307e6bf fix: only expire carry forwarded allocation via scheduler 2019-05-27 03:21:32 +05:30
Mangesh-Khairnar
2417c93d0e feat: create expiry and carry forward calculation on leave allocation creation 2019-05-27 03:20:10 +05:30
Mangesh-Khairnar
c99f644ffe test: carry forward and expiry allocation 2019-05-27 03:13:47 +05:30
Mangesh-Khairnar
7a7f4bd822 fix: leave balance calculation 2019-05-27 03:12:57 +05:30
Mangesh-Khairnar
9e3b688333 test: create leave policy 2019-05-27 03:10:39 +05:30
Mangesh-Khairnar
f3926d0fcb patch: leave ledger entries 2019-05-26 20:17:16 +05:30
Mangesh-Khairnar
45cf02308e fix: prevent manual creation of ledger entries 2019-05-23 20:29:18 +05:30
Mangesh-Khairnar
8ef81870bb test: create leave ledger entry for encashment 2019-05-23 20:28:16 +05:30
Mangesh-Khairnar
5ba17c87e5 feat: remove update allocation after submit 2019-05-22 18:29:22 +05:30
Mangesh-Khairnar
afb0c4aa43 fix: delete entry on cancellation of transaction 2019-05-15 21:50:34 +05:30
Mangesh-Khairnar
f8f02c508d feat: create leave ledger entry on leave encashment creation 2019-05-15 21:50:06 +05:30
Mangesh-Khairnar
50037f8609 fix: consider min days remaining as remaining leaves 2019-05-15 21:49:27 +05:30
Mangesh-Khairnar
6ba9a128e7 feat: calculate leave balance using ledger entries 2019-05-15 15:53:54 +05:30
Mangesh-Khairnar
964deaca96 test: creation of ledger entries on application submit 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
201aeeb20d test: creation of ledger entries on allocation submit 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
170b8dded8 fix: expiry logic for carry forwarded allocation 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
9bb4b8e8b2 feat: create expiry ledger entry on allocation period completion 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
cf8f4bda8f fix: skip application fetch for non allocation records 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
783bd89413 feat: handle cancellation workflow for leave application 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
5448edff2c feat: delete cancelled allocation from ledger 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
01490f1560 feat: add cancellation workflow for leave allocation ledger entry 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
5ad83c06c2 feat: add ledger entries on leave addition 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
679371e397 feat: get carry forwarded leaves via ledger entries 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
2b421c39b5 feat: add transaction details in ledger 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
1de990b2ac feat: create leave ledger entry 2019-05-15 15:53:53 +05:30
Mangesh-Khairnar
5e2b067107 feat: display carry forwarded allocation days and total leaves allocated 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
0abf5d340c fix: carry forwarded allocation period validation 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
d01863707c test: pass leave type as params 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
70cf4a6796 feat: validate leave allocation period to be within expiry limits 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
99c9cfaaed feat: generate leave allocation for carry forwarded leaves 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
4badca54af feat: validate leave expiry days 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
0c0bfb1ef0 feat: calculate carry forward leaves allocation 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
d6c5b6320f feat: add a field for conditionally displaying carry forwarded leave 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
e46d3a87ea feat: set carry forwarded leave allocation 2019-05-15 15:53:52 +05:30
Mangesh-Khairnar
c28d2e4b2a test: create leave allocation check 2019-05-15 15:53:51 +05:30
Mangesh-Khairnar
bd3b3ea12c test: create leave type 2019-05-15 15:53:51 +05:30
Mangesh-Khairnar
7c6b6eae5b feat: set leave allocation on carry forward check 2019-05-15 15:53:51 +05:30
Mangesh-Khairnar
1208ca6a36 feat: add old leaves to track carry forward leave allocation 2019-05-15 15:53:51 +05:30
Mangesh-Khairnar
c182a5687e feat: add validation for carry forward leave expiry 2019-05-15 15:53:51 +05:30
Mangesh-Khairnar
fd53c64d5d feat: create carried forward leave expiry option 2019-05-15 15:53:51 +05:30
616 changed files with 519877 additions and 509300 deletions

47
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,47 @@
---
name: Bug report
about: Report a bug encountered while using ERPNext
labels: bug
---
<!--
Welcome to ERPNext issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to ERPNext
- For questions and general support, checkout the manual https://erpnext.com/docs/user/manual/en or use https://discuss.erpnext.com
- For documentation issues, refer to https://github.com/frappe/erpnext_com
2. Use the search function before creating a new issue. Duplicates will be closed and directed to
the original discussion.
3. When making a bug report, make sure you provide all required information. The easier it is for
maintainers to reproduce, the faster it'll be fixed.
4. If you think you know what the reason for the bug is, share it with us. Maybe put in a PR 😉
-->
## Description of the issue
## Context information (for bug reports)
**Output of `bench version`**
```
(paste here)
```
## Steps to reproduce the issue
1.
2.
3.
### Observed result
### Expected result
### Stacktrace / full error message
```
(paste here)
```
## Additional information
OS version / distribution, `ERPNext` install method, etc.

View File

@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea to improve ERPNext
labels: feature-request
---
<!--
Welcome to ERPNext issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to ERPNext
- For questions and general support, checkout the manual https://erpnext.com/docs/user/manual/en or use https://discuss.erpnext.com
- For documentation issues, refer to https://github.com/frappe/erpnext_com
2. Use the search function before creating a new issue. Duplicates will be closed and directed to
the original discussion.
3. When making a feature request, make sure to be as verbose as possible. The better you convey your message, the greater the drive to make it happen.
-->
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,17 @@
---
name: Question about using ERPNext
about: This is not the appropriate channel
labels: invalid
---
Please post on our forums:
for questions about using `ERPNext`: https://discuss.erpnext.com
for questions about using the `Frappe Framework`: https://discuss.frappe.io
for questions about using `bench`, probably the best place to start is the [bench repo](https://github.com/frappe/bench)
For documentation issues, use the [ERPNext Documentation](https://erpnext.com/docs/) or [Frappe Framework Documentation](https://frappe.io/docs/user/en) or the [developer cheetsheet](https://github.com/frappe/frappe/wiki/Developer-Cheatsheet)
> **Posts that are not bug reports or feature requests will not be addressed on this issue tracker.**

View File

@@ -1,2 +1,33 @@
Please read the pull request checklist to make sure your changes are merged: https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist
<!--
Some key notes before you open a PR:
1. Select which branch should this PR be merged in?
2. PR name follows [convention](http://karma-runner.github.io/4.0/dev/git-commit-msg.html)
3. All tests pass locally, UI and Unit tests
4. All business logic and validations must be on the server-side
5. Update necessary Documentation
6. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes
Also, if you're new here
- Documentation Guidelines => https://github.com/frappe/erpnext/wiki/Updating-Documentation
- Contribution Guide => https://github.com/frappe/erpnext/blob/develop/.github/CONTRIBUTING.md
- Pull Request Checklist => https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist
-->
> Please provide enough information so that others can review your pull request:
<!-- You can skip this if you're fixing a typo or updating existing documentation -->
> Explain the **details** for making this change. What existing problem does the pull request solve?
<!-- Example: When "Adding a function to do X", explain why it is necessary to have a way to do X. -->
> Screenshots/GIFs
<!-- Add images/recordings to better visualize the change: expected/current behviour -->

7
SECURITY.md Normal file
View File

@@ -0,0 +1,7 @@
# Security Policy
The ERPNext team and community take security issues seriously. To report a security issue, fill out the form at [https://erpnext.com/security/report](https://erpnext.com/security/report).
You can help us make ERPNext and all it's users more secure by following the [Reporting guidelines](https://erpnext.com/security).
We appreciate your efforts to responsibly disclose your findings. We'll endeavor to respond quickly, and will keep you updated throughout the process.

View File

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

View File

@@ -3,6 +3,7 @@
from __future__ import unicode_literals
import frappe, json
from frappe import _
from frappe.utils import add_to_date, date_diff, getdate, nowdate, get_last_day, formatdate
from erpnext.accounts.report.general_ledger.general_ledger import execute
from frappe.core.page.dashboard.dashboard import cache_source, get_from_date_from_timespan
@@ -12,15 +13,26 @@ from frappe.utils.nestedset import get_descendants_of
@frappe.whitelist()
@cache_source
def get(chart_name=None, from_date = None, to_date = None):
chart = frappe.get_doc('Dashboard Chart', chart_name)
def get(chart_name = None, chart = None, no_cache = None, from_date = None, to_date = None):
if chart_name:
chart = frappe.get_doc('Dashboard Chart', chart_name)
else:
chart = frappe._dict(frappe.parse_json(chart))
timespan = chart.timespan
if chart.timespan == 'Select Date Range':
from_date = chart.from_date
to_date = chart.to_date
timegrain = chart.time_interval
filters = json.loads(chart.filters_json)
filters = frappe.parse_json(chart.filters_json)
account = filters.get("account")
company = filters.get("company")
if not account and chart:
frappe.throw(_("Account is not set for the dashboard chart {0}").format(chart))
if not to_date:
to_date = nowdate()
if not from_date:
@@ -81,7 +93,8 @@ def get_gl_entries(account, to_date):
fields = ['posting_date', 'debit', 'credit'],
filters = [
dict(posting_date = ('<', to_date)),
dict(account = ('in', child_accounts))
dict(account = ('in', child_accounts)),
dict(voucher_type = ('!=', 'Period Closing Voucher'))
],
order_by = 'posting_date asc')

View File

@@ -174,6 +174,8 @@ def make_gl_entries(doc, credit_account, debit_account, against,
# GL Entry for crediting the amount in the deferred expense
from erpnext.accounts.general_ledger import make_gl_entries
if amount == 0: return
gl_entries = []
gl_entries.append(
doc.get_gl_dict({

File diff suppressed because it is too large Load Diff

View File

@@ -100,7 +100,10 @@ class Account(NestedSet):
if ancestors:
if frappe.get_value("Company", self.company, "allow_account_creation_against_child_company"):
return
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
if not frappe.db.get_value("Account",
{'account_name': self.account_name, 'company': ancestors[0]}, 'name'):
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
else:
descendants = get_descendants_of('Company', self.company)
if not descendants: return
@@ -114,23 +117,7 @@ class Account(NestedSet):
if not parent_acc_name_map: return
for company in descendants:
if not parent_acc_name_map.get(company):
frappe.throw(_("While creating account for child Company {0}, parent account {1} not found. Please create the parent account in corresponding COA")
.format(company, parent_acc_name))
doc = frappe.copy_doc(self)
doc.flags.ignore_root_company_validation = True
doc.update({
"company": company,
# parent account's currency should be passed down to child account's curreny
# if it is None, it picks it up from default company currency, which might be unintended
"account_currency": self.account_currency,
"parent_account": parent_acc_name_map[company]
})
doc.save()
frappe.msgprint(_("Account {0} is added in the child company {1}")
.format(doc.name, company))
self.create_account_for_child_company(parent_acc_name_map, descendants, parent_acc_name)
def validate_group_or_ledger(self):
if self.get("__islocal"):
@@ -172,6 +159,49 @@ class Account(NestedSet):
if frappe.db.get_value("GL Entry", {"account": self.name}):
frappe.throw(_("Currency can not be changed after making entries using some other currency"))
def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name):
for company in descendants:
if not parent_acc_name_map.get(company):
frappe.throw(_("While creating account for child Company {0}, parent account {1} not found. Please create the parent account in corresponding COA")
.format(company, parent_acc_name))
filters = {
"account_name": self.account_name,
"company": company
}
if self.account_number:
filters["account_number"] = self.account_number
child_account = frappe.db.get_value("Account", filters, 'name')
if not child_account:
doc = frappe.copy_doc(self)
doc.flags.ignore_root_company_validation = True
doc.update({
"company": company,
# parent account's currency should be passed down to child account's curreny
# if it is None, it picks it up from default company currency, which might be unintended
"account_currency": self.account_currency,
"parent_account": parent_acc_name_map[company]
})
doc.save()
frappe.msgprint(_("Account {0} is added in the child company {1}")
.format(doc.name, company))
elif child_account:
# update the parent company's value in child companies
doc = frappe.get_doc("Account", child_account)
parent_value_changed = False
for field in ['account_type', 'account_currency',
'freeze_account', 'balance_must_be']:
if doc.get(field) != self.get(field):
parent_value_changed = True
doc.set(field, self.get(field))
if parent_value_changed:
doc.save()
def convert_group_to_ledger(self):
if self.check_if_child_exists():
throw(_("Account with child nodes cannot be converted to ledger"))

View File

@@ -123,7 +123,8 @@ frappe.treeview_settings["Account"] = {
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 dr_or_cr = node.data.balance_in_account_currency > 0 ? "Dr": "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">'

View File

@@ -406,7 +406,11 @@
"is_group": 1,
"Bewertungskorrektur zu Forderungen aus Lieferungen und Leistungen": {
"account_number": "9960"
},
},
"Debitoren": {
"is_group": 1,
"account_number": "10000"
},
"Forderungen aus Lieferungen und Leistungen": {
"account_number": "1200",
"account_type": "Receivable"
@@ -1077,7 +1081,7 @@
}
}
},
"C - Verb.": {
"C - Verbindlichkeiten": {
"account_type": "Payable",
"1 - Anleihen": {
"is_group": 1,
@@ -1193,7 +1197,15 @@
"is_group": 1,
"Bewertungskorrektur zu Verb. aus Lieferungen und Leistungen": {
"account_number": "9964"
},
},
"Kreditoren": {
"account_number": "70000",
"is_group": 1,
"Wareneingangs-­Verrechnungskonto" : {
"account_number": "70001",
"account_type": "Stock Received But Not Billed"
}
},
"Verb. aus Lieferungen und Leistungen": {
"account_number": "3300",
"account_type": "Payable"
@@ -1682,90 +1694,6 @@
"account_type": "Income Account"
}
},
"Erl\u00f6sschm\u00e4lerungen (Gruppe)": {
"is_group": 1,
"Erl\u00f6sschm\u00e4lerungen": {
"account_number": "4700"
},
"Erl\u00f6sschm\u00e4lerungen aus steuerfreien Ums\u00e4tzen \u00a7 4 Nr. 1a UStG": {
"account_number": "4705"
},
"Erl\u00f6sschm\u00e4lerungen 7 % USt": {
"account_number": "4710"
},
"Erl\u00f6sschm\u00e4lerungen 19 % USt": {
"account_number": "4720"
},
"Erl\u00f6sschm\u00e4lerungen 16 % USt": {
"account_number": "4723"
},
"Erl\u00f6sschm\u00e4lerungen aus steuerfreien innergem. Lieferungen": {
"account_number": "4724"
},
"Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 7 % USt": {
"account_number": "4725"
},
"Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 19 % USt": {
"account_number": "4726"
},
"Erl\u00f6sschm\u00e4lerungen aus im anderen EU-Land steuerpfl. Lieferungen": {
"account_number": "4727"
},
"Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 16 % USt": {
"account_number": "4729"
},
"Gew\u00e4hrte Skonti (Gruppe)": {
"is_group": 1,
"Gew. Skonti": {
"account_number": "4730"
},
"Gew. Skonti 7 % USt": {
"account_number": "4731"
},
"Gew. Skonti 19 % USt": {
"account_number": "4736"
},
"Gew. Skonti aus Lieferungen von Mobilfunkger./Schaltkr., f. die der Leistungsempf. die Ust. schuldet": {
"account_number": "4738"
},
"Gew. Skonti aus Leistungen, f. die der Leistungsempf. die Umsatzsteuer nach \u00a7 13b UStG schuldet": {
"account_number": "4741"
},
"Gew. Skonti aus Erl\u00f6sen aus im anderen EU-Land steuerpfl. Leistungen, f. die der Leistungsempf. die Ust. schuldet": {
"account_number": "4742"
},
"Gew. Skonti aus steuerfreien innergem. Lieferungen \u00a7 4 Nr. 1b UStG": {
"account_number": "4743"
},
"Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen": {
"account_number": "4745"
},
"Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen 7% USt": {
"account_number": "4746"
},
"Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen 19% USt": {
"account_number": "4748"
}
},
"Gew\u00e4hrte Boni 7 % USt": {
"account_number": "4750"
},
"Gew\u00e4hrte Boni 19 % USt": {
"account_number": "4760"
},
"Gew\u00e4hrte Boni": {
"account_number": "4769"
},
"Gew\u00e4hrte Rabatte": {
"account_number": "4770"
},
"Gew\u00e4hrte Rabatte 7 % USt": {
"account_number": "4780"
},
"Gew\u00e4hrte Rabatte 19 % USt": {
"account_number": "4790"
}
},
"Grundst\u00fccksertr\u00e4ge (Gruppe)": {
"is_group": 1,
"Grundst\u00fccksertr\u00e4ge": {
@@ -2049,48 +1977,6 @@
"Erh. Skonti aus Erwerb Waren als letzter Abnehmer innerh. Dreiecksgesch. 19% Vorst. u. 19% Ust.": {
"account_number": "5793"
}
},
"Erhaltene Boni (Gruppe)": {
"is_group": 1,
"Erhaltene Boni 7 % Vorsteuer": {
"account_number": "5750"
},
"Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe": {
"account_number": "5753"
},
"Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": {
"account_number": "5754"
},
"Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": {
"account_number": "5755"
},
"Erhaltene Boni 19 % Vorsteuer": {
"account_number": "5760"
},
"Erhaltene Boni": {
"account_number": "5769"
}
},
"Erhaltene Rabatte (Gruppe)": {
"is_group": 1,
"Erhaltene Rabatte": {
"account_number": "5770"
},
"Erhaltene Rabatte 7 % Vorsteuer": {
"account_number": "5780"
},
"Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe": {
"account_number": "5783"
},
"Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": {
"account_number": "5784"
},
"Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": {
"account_number": "5785"
},
"Erhaltene Rabatte 19 % Vorsteuer": {
"account_number": "5790"
}
}
},
"Bezugsnebenkosten (Gruppe)": {
@@ -2409,7 +2295,49 @@
},
"6 - sonstige betriebliche Ertr\u00e4ge": {
"root_type": "Income",
"is_group": 1,
"is_group": 1,
"Erhaltene Boni (Gruppe)": {
"is_group": 1,
"Erhaltene Boni 7 % Vorsteuer": {
"account_number": "5750"
},
"Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe": {
"account_number": "5753"
},
"Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": {
"account_number": "5754"
},
"Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": {
"account_number": "5755"
},
"Erhaltene Boni 19 % Vorsteuer": {
"account_number": "5760"
},
"Erhaltene Boni": {
"account_number": "5769"
}
},
"Erhaltene Rabatte (Gruppe)": {
"is_group": 1,
"Erhaltene Rabatte": {
"account_number": "5770"
},
"Erhaltene Rabatte 7 % Vorsteuer": {
"account_number": "5780"
},
"Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe": {
"account_number": "5783"
},
"Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": {
"account_number": "5784"
},
"Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": {
"account_number": "5785"
},
"Erhaltene Rabatte 19 % Vorsteuer": {
"account_number": "5790"
}
},
"Andere aktivierte Eigenleistungen": {
"account_number": "4820"
},
@@ -2732,7 +2660,91 @@
},
"7 - sonstige betriebliche Aufwendungen": {
"root_type": "Expense",
"is_group": 1,
"is_group": 1,
"Erl\u00f6sschm\u00e4lerungen (Gruppe)": {
"is_group": 1,
"Erl\u00f6sschm\u00e4lerungen": {
"account_number": "4700"
},
"Erl\u00f6sschm\u00e4lerungen aus steuerfreien Ums\u00e4tzen \u00a7 4 Nr. 1a UStG": {
"account_number": "4705"
},
"Erl\u00f6sschm\u00e4lerungen 7 % USt": {
"account_number": "4710"
},
"Erl\u00f6sschm\u00e4lerungen 19 % USt": {
"account_number": "4720"
},
"Erl\u00f6sschm\u00e4lerungen 16 % USt": {
"account_number": "4723"
},
"Erl\u00f6sschm\u00e4lerungen aus steuerfreien innergem. Lieferungen": {
"account_number": "4724"
},
"Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 7 % USt": {
"account_number": "4725"
},
"Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 19 % USt": {
"account_number": "4726"
},
"Erl\u00f6sschm\u00e4lerungen aus im anderen EU-Land steuerpfl. Lieferungen": {
"account_number": "4727"
},
"Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 16 % USt": {
"account_number": "4729"
},
"Gew\u00e4hrte Skonti (Gruppe)": {
"is_group": 1,
"Gew. Skonti": {
"account_number": "4730"
},
"Gew. Skonti 7 % USt": {
"account_number": "4731"
},
"Gew. Skonti 19 % USt": {
"account_number": "4736"
},
"Gew. Skonti aus Lieferungen von Mobilfunkger./Schaltkr., f. die der Leistungsempf. die Ust. schuldet": {
"account_number": "4738"
},
"Gew. Skonti aus Leistungen, f. die der Leistungsempf. die Umsatzsteuer nach \u00a7 13b UStG schuldet": {
"account_number": "4741"
},
"Gew. Skonti aus Erl\u00f6sen aus im anderen EU-Land steuerpfl. Leistungen, f. die der Leistungsempf. die Ust. schuldet": {
"account_number": "4742"
},
"Gew. Skonti aus steuerfreien innergem. Lieferungen \u00a7 4 Nr. 1b UStG": {
"account_number": "4743"
},
"Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen": {
"account_number": "4745"
},
"Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen 7% USt": {
"account_number": "4746"
},
"Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen 19% USt": {
"account_number": "4748"
}
},
"Gew\u00e4hrte Boni 7 % USt": {
"account_number": "4750"
},
"Gew\u00e4hrte Boni 19 % USt": {
"account_number": "4760"
},
"Gew\u00e4hrte Boni": {
"account_number": "4769"
},
"Gew\u00e4hrte Rabatte": {
"account_number": "4770"
},
"Gew\u00e4hrte Rabatte 7 % USt": {
"account_number": "4780"
},
"Gew\u00e4hrte Rabatte 19 % USt": {
"account_number": "4790"
}
},
"Sonstige betriebliche Aufwendungen": {
"account_number": "6300"
},
@@ -3609,18 +3621,6 @@
"Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen f. sonstige Steuern": {
"account_number": "7694"
}
},
"Debitoren": {
"root_type": "Asset",
"is_group": 1
},
"Kreditoren": {
"root_type": "Liability",
"is_group": 1,
"Wareneingangs-­Verrechnungskonto" : {
"account_number": "70001",
"account_type": "Stock Received But Not Billed"
}
}
}
}

View File

@@ -0,0 +1,809 @@
{
"country_code": "sv",
"name": "El Salvador Standard",
"tree": {
"100000 - ACTIVOS - xmC": {
"11000000 - ACTIVOS CORRIENTES - xmC": {
"11010000 - EFECTIVO Y EQUIVALENTES AL EFECTIVO - xmC": {
"11010100 - Caja general - xmC": {
"account_number": "11010100",
"account_type": "Cash"
},
"Caja chica": {
"account_number": "11010200",
"account_type": "Cash",
"is_group": 1
},
"Efectivo en bancos": {
"account_number": "11010300",
"account_type": "Bank",
"is_group": 1
},
"account_number": "11010000",
"account_type": "Cash"
},
"CUENTAS POR COBRAR ARRENDAMIENTOS FINANCIEROS": {
"Arrendamientos financieros por cobrar": {
"account_number": "11040100",
"is_group": 1
},
"Estimaci\u00f3n para cuentas de cobro dudoso (CR)": {
"account_number": "11040200",
"is_group": 1
},
"account_number": "11040000"
},
"DEUDORES COMERCIALES Y OTRAS CUENTAS POR COBRAR": {
"11030100 - Deudores comerciales - xmC": {
"account_number": "11030100",
"account_type": "Receivable"
},
"Estimaci\u00f3n para cuentas de cobro dudoso (CR)": {
"account_number": "11030200",
"account_type": "Receivable",
"is_group": 1
},
"Otras cuentas por cobrar no comerciales": {
"account_number": "11030300",
"account_type": "Receivable",
"is_group": 1
},
"account_number": "11030000",
"account_type": "Receivable"
},
"GASTOS PAGADOS POR ANTICIPADO": {
"Adelantos a empleados": {
"account_number": "110904",
"account_type": "Temporary",
"is_group": 1
},
"Papeler\u00eda y \u00fatiles en existencia": {
"account_number": "11090300",
"account_type": "Temporary",
"is_group": 1
},
"Primas de seguros aun no vendidas": {
"account_number": "11090100",
"account_type": "Temporary",
"is_group": 1
},
"Rentas aun no corridas por los inmuebles": {
"account_number": "11090200",
"account_type": "Temporary",
"is_group": 1
},
"account_number": "11090000",
"account_type": "Temporary"
},
"INVENTARIOS": {
"11050100 - Inventarios en bodega al costo - xmC": {
"account_number": "11050100",
"account_type": "Stock"
},
"11050300 - Pedidos en transito - xmC": {
"account_number": "11050300",
"account_type": "Stock Received But Not Billed"
},
"Estimaci\u00f3n para obsolescencia de inventarios o de lento movimiento (CR)": {
"account_number": "11050200",
"account_type": "Stock",
"is_group": 1
},
"Mercader\u00edas en consignaci\u00f3n": {
"account_number": "11050400",
"account_type": "Stock",
"is_group": 1
},
"account_number": "11050000",
"account_type": "Stock"
},
"INVERSIONES TEMPORALES": {
"Acciones": {
"account_number": "11020100",
"account_type": "Temporary",
"is_group": 1
},
"Bonos": {
"account_number": "11020200",
"account_type": "Temporary",
"is_group": 1
},
"C\u00e9dulas hipotecarias": {
"account_number": "11020300",
"account_type": "Temporary",
"is_group": 1
},
"account_number": "11020000",
"account_type": "Temporary"
},
"IVA CREDITO FISCAL": {
"IVA compras locales": {
"account_number": "11060100",
"account_type": "Tax",
"is_group": 1,
"tax_rate": 13.0
},
"IVA importaciones": {
"account_number": "11060200",
"account_type": "Tax",
"is_group": 1,
"tax_rate": 13.0
},
"account_number": "11060000",
"account_type": "Tax",
"tax_rate": 13.0
},
"IVA PERCIBIDO": {
"account_number": "IVA PERCIBIDO",
"account_type": "Tax",
"is_group": 1,
"tax_rate": 1.0
},
"IVA RETENIDO": {
"account_number": "11070000",
"account_type": "Tax",
"is_group": 1,
"tax_rate": 1.0
},
"account_number": "11000000"
},
"12000000 - ACTIVOS NO CORRIENTES - xmC": {
"ACTIVOS INTANGIBLES": {
"Concesiones y franquicias": {
"account_number": "12080300",
"account_type": "Fixed Asset",
"is_group": 1
},
"Derechos de llave": {
"account_number": "12080100",
"account_type": "Fixed Asset",
"is_group": 1
},
"Patentes y marcas de fabrica": {
"account_number": "12080200",
"account_type": "Fixed Asset",
"is_group": 1
},
"Software": {
"account_number": "12080400",
"account_type": "Fixed Asset",
"is_group": 1
},
"account_number": "12080000",
"account_type": "Fixed Asset"
},
"CUENTAS POR COBRAR ARRENDAMIENTOS FINANCIEROS A LARGO PLAZO": {
"Arrendamientos financieros por cobrar a largo plazo": {
"account_number": "12060100",
"account_type": "Receivable",
"is_group": 1
},
"Estimaci\u00f3n para cuentas de cobro dudoso a largo plazo (CR)": {
"account_number": "12060200",
"account_type": "Receivable",
"is_group": 1
},
"account_number": "12060000",
"account_type": "Receivable"
},
"DEPRECIACION ACUMULUDA (CR)": {
"12030100 - Deprec. acumulada de propiedades, planta y equipo propio al costo - xmC": {
"account_number": "12030100",
"account_type": "Accumulated Depreciation"
},
"Deprec. acumulada de prop., planta y equipo bajo arrend. Financiero": {
"account_number": "12030200",
"account_type": "Accumulated Depreciation",
"is_group": 1
},
"Deprec. acumulada de revaluaos de propiedades, planta y equipo": {
"account_number": "12030300",
"account_type": "Accumulated Depreciation",
"is_group": 1
},
"account_number": "12030000",
"account_type": "Accumulated Depreciation"
},
"DEUDORES COMERCIALES Y OTRAS CUENTAS POR COBRAR A LARGO PLAZO": {
"12050100 - Deudores comerciales a largo plazo - xmC": {
"account_number": "12050100",
"account_type": "Receivable",
"is_group": 1
},
"Cuentas por cobrar no comerciales a largo plazo": {
"account_number": "12050300",
"account_type": "Receivable",
"is_group": 1
},
"Estimaci\u00f3n para cuentas de cobro dudoso a largo plazo (CR)": {
"account_number": "12050200",
"account_type": "Receivable",
"is_group": 1
},
"account_number": "12050000",
"account_type": "Receivable"
},
"IMPUESTO SOBRE LA RENTA DIFERIDO-ACTIVO": {
"12070200 - Pago anticipados de impuestos sobre la renta - xmC": {
"account_number": "12070200",
"account_type": "Temporary",
"is_group": 1
},
"Cr\u00e9dito impuestos sobre la renta de a\u00f1os anteriores": {
"account_number": "12070100",
"account_type": "Tax",
"is_group": 1
},
"account_number": "12070000",
"account_type": "Tax"
},
"INVERSIONES PERMANENTES": {
"Inversiones en asociadas": {
"account_number": "12040200",
"account_type": "Fixed Asset",
"is_group": 1
},
"Inversiones en negocios conjuntos": {
"account_number": "12040300",
"account_type": "Fixed Asset",
"is_group": 1
},
"Inversiones en subsidiarias": {
"account_number": "12040100",
"account_type": "Fixed Asset",
"is_group": 1
},
"account_number": "12040000",
"account_type": "Fixed Asset"
},
"PROPIEDADES, PLANTA Y EQUIPO": {
"12010300 - Maquinarias y equipos - xmC": {
"account_number": "12010300",
"account_type": "Fixed Asset"
},
"Edificios": {
"account_number": "12010200",
"account_type": "Fixed Asset",
"is_group": 1
},
"Mobiliario y equipo": {
"account_number": "12010400",
"account_type": "Fixed Asset",
"is_group": 1
},
"Terrenos": {
"account_number": "12010100",
"account_type": "Fixed Asset",
"is_group": 1
},
"Veh\u00edculos": {
"account_number": "12010500",
"account_type": "Fixed Asset",
"is_group": 1
},
"account_number": "12010000",
"account_type": "Fixed Asset"
},
"REVALUACIONES DE PROPIEDADES, PLANTA Y EQUIPO": {
"Revaluaci\u00f3n de edificios": {
"account_number": "12020200",
"account_type": "Fixed Asset",
"is_group": 1
},
"Revaluaci\u00f3n de maquinarias y equipo": {
"account_number": "12020300",
"account_type": "Fixed Asset",
"is_group": 1
},
"Revaluaci\u00f3n de mobiliario y equipo": {
"account_number": "12020400",
"account_type": "Fixed Asset",
"is_group": 1
},
"Revaluaci\u00f3n de terrenos": {
"account_number": "12020100",
"account_type": "Fixed Asset",
"is_group": 1
},
"Revaluaci\u00f3n de veh\u00edculos": {
"account_number": "12020500",
"account_type": "Fixed Asset",
"is_group": 1
},
"account_number": "12020000",
"account_type": "Fixed Asset"
},
"account_number": "12000000",
"account_type": "Fixed Asset"
},
"account_number": "100000",
"root_type": "Asset"
},
"20000000 - PASIVOS - xmC": {
"PASIVOS CORRIENTES": {
"ACREEDORES COMERCIALES Y OTRAS CUENTAS POR PAGAR": {
"21020100 - Cuentas por pagar comerciales - xmC": {
"account_number": "21020100",
"account_type": "Payable"
},
"Documentos por pagar comerciales": {
"account_number": "21020200",
"account_type": "Payable",
"is_group": 1
},
"account_number": "21020000",
"account_type": "Payable"
},
"BENEFICIOS A EMPLEADOS POR PAGAR": {
"Beneficios a corto plazo por pagar": {
"account_number": "21050100",
"account_type": "Payable",
"is_group": 1
},
"Beneficios post empleo por pagar": {
"account_number": "21050200",
"account_type": "Payable",
"is_group": 1
},
"account_number": "21050000",
"account_type": "Payable"
},
"DIVIDENDOS POR PAGAR": {
"account_number": "21080000",
"account_type": "Payable",
"is_group": 1
},
"IMPUESTO SOBRE LA RENTA CORRIENTE POR PAGAR": {
"account_number": "21070000",
"account_type": "Tax",
"is_group": 1
},
"IVA DEBITOS FISCALES": {
"Por ventas a consumidores": {
"account_number": "21060200",
"account_type": "Tax",
"is_group": 1
},
"Por ventas a contribuyentes": {
"account_number": "21060100",
"account_type": "Tax",
"is_group": 1
},
"account_number": "21060000",
"account_type": "Tax"
},
"OBLIGACIONES BAJO ARRENDAMIENTOS FINANCIEROS PORCION CORRIENTE": {
"Contratos bajo arrendamientos financieros": {
"account_number": "21030100",
"account_type": "Payable",
"is_group": 1
},
"account_number": "21030000",
"account_type": "Payable"
},
"OTROS ACREEDORES, RETENCIONES Y DESCUENTOS": {
"Cuentas por pagar a accionistas": {
"account_number": "21040400",
"account_type": "Payable",
"is_group": 1
},
"Descuentos": {
"account_number": "21040300",
"account_type": "Payable",
"is_group": 1
},
"Otros acreedores": {
"account_number": "21040100",
"account_type": "Payable",
"is_group": 1
},
"Retenciones": {
"account_number": "21040200",
"account_type": "Payable",
"is_group": 1
},
"account_number": "21040000",
"account_type": "Payable"
},
"PRESTAMOS Y SOBREGIROS BANCARIOS": {
"Porci\u00f3n corriente de prestamos bancarios a largo plazo": {
"account_number": "21010300",
"is_group": 1
},
"Prestamos bancarios a corto plazo": {
"account_number": "21010100",
"is_group": 1
},
"Sobregiros bancarios": {
"account_number": "21010200",
"is_group": 1
},
"account_number": "21010000"
},
"account_number": "21000000"
},
"PASIVOS NO CORRIENTES": {
"ANTICIPOS Y GARANTIAS DE CLIENTES": {
"Anticipos de clientes": {
"account_number": "22040100",
"account_type": "Temporary",
"is_group": 1
},
"Garant\u00edas de clientes": {
"account_number": "22040200",
"account_type": "Temporary",
"is_group": 1
},
"account_number": "22040000",
"account_type": "Temporary"
},
"INTERES MINOTARIO": {
"Inter\u00e9s de accionista minotarios": {
"account_number": "22050100",
"is_group": 1
},
"account_number": "22050000"
},
"OBLIGACIONES BAJO ARRENDAMIENTOS FINANCIEROS A LARGO PLAZO": {
"Contratos bajo arrendamientos financieros": {
"account_number": "22030100",
"is_group": 1
},
"account_number": "22030000"
},
"OTROS PRESTAMOS A LARGO PLAZO": {
"account_number": "22020000",
"is_group": 1
},
"PRESTAMOS BANCARIOS A LARGO PLAZO": {
"account_number": "22010000",
"is_group": 1
},
"account_number": "22000000"
},
"PROVISIONES": {
"IMPUESTOS SOBRE LA RENTA COMPLEMENTARIO": {
"Ejercicios anteriores": {
"account_number": "23010100",
"account_type": "Tax",
"is_group": 1
},
"account_number": "23010000",
"account_type": "Tax"
},
"PROVISION PARA OBLIGACIONES LABORALES": {
"Indemnizaci\u00f3n": {
"account_number": "23020100",
"is_group": 1
},
"account_number": "23020000"
},
"account_number": "23000000"
},
"account_number": "20000000",
"root_type": "Liability"
},
"30000000 - PATRIMONIO - xmC": {
"CAPITAL, RESERVAS Y RESULTADOS": {
"CAPITAL SOCIAL": {
"Capital Social M\u00ednimo": {
"Capital Social M\u00ednimo NO Pagado": {
"account_number": "31010102",
"account_type": "Equity",
"is_group": 1
},
"Capital Social M\u00ednimo Suscrito": {
"account_number": "31010101",
"account_type": "Equity",
"is_group": 1
},
"account_number": "31010100",
"account_type": "Equity"
},
"Capital Social Variable": {
"Capital Social Variable NO Pagado": {
"account_number": "31010202",
"account_type": "Equity",
"is_group": 1
},
"Capital Social Variable Suscrito": {
"account_number": "31010201",
"account_type": "Equity",
"is_group": 1
},
"account_number": "31010200",
"account_type": "Equity"
},
"account_number": "31010000",
"account_type": "Equity"
},
"DIVIDENDOS PAGADOS": {
"account_number": "31060000",
"account_type": "Equity",
"is_group": 1
},
"GANANCIAS NO DISTRIBUIDAS": {
"De ejercicios anteriores": {
"account_number": "31020100",
"account_type": "Equity",
"is_group": 1
},
"Del presente ejercicio": {
"account_number": "31020200",
"account_type": "Equity",
"is_group": 1
},
"account_number": "31020000",
"account_type": "Equity"
},
"GANANCIAS RESTRINGIDAS": {
"Reserva legal": {
"account_number": "31030100",
"account_type": "Equity",
"is_group": 1
},
"account_number": "31030000",
"account_type": "Equity"
},
"PERDIDAS ACUMULADAS (CR)": {
"De ejercicios anteriores": {
"account_number": "31050100",
"account_type": "Equity",
"is_group": 1
},
"Del presente ejercicio": {
"account_number": "31050200",
"account_type": "Equity",
"is_group": 1
},
"account_number": "31050000",
"account_type": "Equity"
},
"SUPERAVIT POR REVALUACIONES": {
"Super\u00e1vit por revaluaci\u00f3n de activos": {
"account_number": "31040100",
"account_type": "Equity",
"is_group": 1
},
"account_number": "31040000",
"account_type": "Equity"
},
"account_number": "31000000",
"account_type": "Equity"
},
"account_number": "30000000",
"root_type": "Equity"
},
"40000000 - CUENTAS DE RESULTADO DEUDORAS - xmC": {
"COSTOS Y GASTOS DE OPERACI\u00d3N": {
"41010000 - COSTO DE LAS VENTAS - xmC": {
"account_number": "41010000",
"account_type": "Cost of Goods Sold"
},
"GASTOS DE DEPARTAMENTO DE OPERACIONES": {
"41020600 - Depreciaciones y amortizaciones - xmC": {
"account_number": "41020600",
"account_type": "Depreciation"
},
"41020900 - Redondeos - xmC": {
"account_number": "41020900",
"account_type": "Round Off"
},
"Gastos operativos": {
"account_number": "41020700",
"account_type": "Chargeable",
"is_group": 1
},
"Mantenimientos": {
"account_number": "41020400",
"account_type": "Chargeable",
"is_group": 1
},
"Materiales y suministros": {
"Ajustes de Inventario": {
"account_number": "41020201",
"account_type": "Stock Adjustment"
},
"account_number": "41020200",
"account_type": "Chargeable"
},
"Seguros": {
"account_number": "41020500",
"account_type": "Chargeable",
"is_group": 1
},
"Servicios b\u00e1sicos": {
"account_number": "41020300",
"account_type": "Chargeable",
"is_group": 1
},
"Servicios y honorarios profesionales": {
"account_number": "41020800",
"account_type": "Chargeable",
"is_group": 1
},
"Sueldos y prestaciones laborales": {
"account_number": "41020100",
"account_type": "Chargeable",
"is_group": 1
},
"account_number": "41020000",
"account_type": "Expense Account"
},
"GASTOS DE VENTAS Y DISTRIBUCION": {
"Depreciaciones y amortizaciones": {
"account_number": "41030600",
"account_type": "Chargeable",
"is_group": 1
},
"Gastos operativos": {
"account_number": "41030700",
"account_type": "Chargeable",
"is_group": 1
},
"Mantenimientos": {
"account_number": "41030400",
"account_type": "Chargeable",
"is_group": 1
},
"Materiales y suministros": {
"account_number": "41030200",
"account_type": "Chargeable",
"is_group": 1
},
"Seguros": {
"account_number": "41030500",
"account_type": "Chargeable",
"is_group": 1
},
"Servicios b\u00e1sicos": {
"account_number": "41030300",
"account_type": "Chargeable",
"is_group": 1
},
"Servicios y honorarios profesionales": {
"account_number": "41030800",
"account_type": "Chargeable",
"is_group": 1
},
"Sueldos y prestaciones laborales": {
"account_number": "41030100",
"account_type": "Chargeable",
"is_group": 1
},
"account_number": "41030000",
"account_type": "Expense Account"
},
"account_number": "41000000",
"account_type": "Expense Account"
},
"GASTOS DE IMPUESTO SOBRE LA RENTA": {
"GASTOS DE IMPUESTO SOBRE LA RENTA CORRIENTE": {
"account_number": "43010000",
"account_type": "Expense Account",
"is_group": 1
},
"account_number": "43000000",
"account_type": "Expense Account"
},
"GASTOS DE NO OPERACI\u00d3N": {
"42020000 - GASTOS NO DEDUCIBLES - xmC": {
"Garant\u00eda por venta de productos": {
"account_number": "42020200",
"account_type": "Expense Account",
"is_group": 1
},
"Impuesto sobre la renta complementario": {
"account_number": "42020100",
"account_type": "Tax",
"is_group": 1
},
"account_number": "42020000",
"account_type": "Expense Account"
},
"GASTOS FINANCIEROS": {
"42010100 - Intereses - xmC": {
"account_number": "42010100",
"account_type": "Expense Account",
"is_group": 1
},
"42010300 - Diferenciales cambiarios - xmC": {
"account_number": "42010300",
"account_type": "Expense Account",
"is_group": 1
},
"Comisiones bancarias": {
"account_number": "42010200",
"account_type": "Expense Account",
"is_group": 1
},
"account_number": "42010000",
"account_type": "Expense Account"
},
"account_number": "42000000",
"account_type": "Expense Account"
},
"account_number": "40000000",
"root_type": "Expense"
},
"50000000 - CUENTAS DE RESULTADO ACREEDORAS - xmC": {
"INGRESOS DE NO OPERACI\u00d3N": {
"DIVIDENDOS GANADOS": {
"Dividendos devengados por inversiones": {
"account_number": "52020100",
"account_type": "Income Account",
"is_group": 1
},
"account_number": "52020000",
"account_type": "Income Account"
},
"INGRESOS FINANCIEROS": {
"Comisiones": {
"account_number": "52010200",
"account_type": "Income Account",
"is_group": 1
},
"Diferenciales cambiarios": {
"account_number": "52010300",
"account_type": "Income Account",
"is_group": 1
},
"Intereses": {
"account_number": "52010100",
"account_type": "Income Account",
"is_group": 1
},
"account_number": "52010000",
"account_type": "Income Account"
},
"OTROS INGRESOS": {
"Ingresos por activos dados en arrendamientos financieros": {
"account_number": "52030200",
"account_type": "Income Account",
"is_group": 1
},
"Ingresos por conversi\u00f3n": {
"account_number": "52030100",
"account_type": "Income Account",
"is_group": 1
},
"Reintegros de seguros": {
"account_number": "52030300",
"account_type": "Income Account",
"is_group": 1
},
"account_number": "52030000",
"account_type": "Income Account"
},
"account_number": "52000000",
"account_type": "Income Account"
},
"INGRESOS POR OPERACIONES CONTINUAS": {
"51010000 - VENTAS DE BIENES - xmC": {
"account_number": "51010000",
"account_type": "Income Account"
},
"VENTAS DE SERVICIOS": {
"account_number": "51020000",
"account_type": "Income Account",
"is_group": 1
},
"account_number": "51000000",
"account_type": "Income Account"
},
"account_number": "50000000",
"root_type": "Income"
},
"60000000 - CUENTA LIQUIDADORA DE RESULTADOS - xmC": {
"CUENTA DE CIERRE": {
"PERDIDAS Y GANANCIAS": {
"account_number": "61010000",
"is_group": 1
},
"account_number": "61000000"
},
"account_number": "60000000",
"root_type": "Income"
}
}
}

View File

@@ -160,7 +160,7 @@ def _make_test_records(verbose):
["_Test Payable USD", "Current Liabilities", 0, "Payable", "USD"]
]
for company, abbr in [["_Test Company", "_TC"], ["_Test Company 1", "_TC1"]]:
for company, abbr in [["_Test Company", "_TC"], ["_Test Company 1", "_TC1"], ["_Test Company with perpetual inventory", "TCP1"]]:
test_objects = make_test_objects("Account", [{
"doctype": "Account",
"account_name": account_name,

View File

@@ -5,9 +5,13 @@ frappe.ui.form.on('Accounting Dimension', {
refresh: function(frm) {
frm.set_query('document_type', () => {
let invalid_doctypes = frappe.model.core_doctypes_list;
invalid_doctypes.push('Accounting Dimension', 'Project',
'Cost Center', 'Accounting Dimension Detail');
return {
filters: {
name: ['not in', ['Accounting Dimension', 'Project', 'Cost Center', 'Accounting Dimension Detail']]
name: ['not in', invalid_doctypes]
}
};
});

View File

@@ -11,10 +11,25 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from frappe import scrub
from frappe.utils import cstr
from frappe.utils.background_jobs import enqueue
from frappe.model import core_doctypes_list
class AccountingDimension(Document):
def before_insert(self):
self.set_fieldname_and_label()
def validate(self):
if self.document_type in core_doctypes_list + ('Accounting Dimension', 'Project',
'Cost Center', 'Accounting Dimension Detail') :
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
frappe.throw(msg)
exists = frappe.db.get_value("Accounting Dimension", {'document_type': self.document_type}, ['name'])
if exists and self.is_new():
frappe.throw("Document Type already used as a dimension")
def after_insert(self):
if frappe.flags.in_test:
make_dimension_in_accounting_doctypes(doc=self)
else:
@@ -50,7 +65,8 @@ def make_dimension_in_accounting_doctypes(doc):
"label": doc.label,
"fieldtype": "Link",
"options": doc.document_type,
"insert_after": insert_after_field
"insert_after": insert_after_field,
"owner": "Administrator"
}
if doctype == "Budget":
@@ -164,7 +180,7 @@ def get_accounting_dimensions(as_list=True):
return accounting_dimensions
def get_checks_for_pl_and_bs_accounts():
dimensions = frappe.db.sql("""SELECT p.label, p.disabled, p.fieldname, c.company, c.mandatory_for_pl, c.mandatory_for_bs
dimensions = frappe.db.sql("""SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs
FROM `tabAccounting Dimension`p ,`tabAccounting Dimension Detail` c
WHERE p.name = c.parent""", as_dict=1)

View File

@@ -17,8 +17,7 @@
"fieldtype": "Link",
"in_list_view": 1,
"label": "Company",
"options": "Company",
"reqd": 1
"options": "Company"
},
{
"fieldname": "reference_document",
@@ -34,8 +33,7 @@
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"label": "Default Dimension",
"options": "reference_document",
"reqd": 1
"options": "reference_document"
},
{
"columns": 3,
@@ -55,7 +53,7 @@
}
],
"istable": 1,
"modified": "2019-07-17 23:34:33.026883",
"modified": "2019-08-15 11:59:09.389891",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension Detail",

View File

@@ -15,8 +15,8 @@ class AccountsSettings(Document):
frappe.clear_cache()
def validate(self):
for f in ["add_taxes_from_item_tax_template"]:
frappe.db.set_default(f, self.get(f, ""))
frappe.db.set_default("add_taxes_from_item_tax_template",
self.get("add_taxes_from_item_tax_template", 0))
self.validate_stale_days()
self.enable_payment_schedule_in_print()

View File

@@ -8,7 +8,7 @@ def get_data():
'fieldname': 'bank',
'transactions': [
{
'label': _('Bank Deatils'),
'label': _('Bank Details'),
'items': ['Bank Account', 'Bank Guarantee']
}
]

View File

@@ -20,7 +20,7 @@ frappe.ui.form.on('Bank Account', {
},
refresh: function(frm) {
frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' }
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
if (frm.doc.__islocal) {
@@ -37,5 +37,9 @@ frappe.ui.form.on('Bank Account', {
});
});
}
},
is_company_account: function(frm) {
frm.set_df_property('account', 'reqd', frm.doc.is_company_account);
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,11 @@ def get_data():
'non_standard_fieldnames': {
'Customer': 'default_bank_account',
'Supplier': 'default_bank_account',
'Journal Entry': 'bank_account_no'
},
'transactions': [
{
'label': _('Payments'),
'items': ['Payment Entry', 'Payment Request', 'Payment Order']
'items': ['Payment Entry', 'Payment Request', 'Payment Order', 'Payroll Entry']
},
{
'label': _('Party'),

View File

@@ -50,7 +50,7 @@ class BankTransaction(StatusUpdater):
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))))
elif 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)

View File

@@ -11,32 +11,32 @@ from erpnext.buying.doctype.purchase_order.test_purchase_order import create_pur
from erpnext.accounts.doctype.budget.budget import get_actual_expense, BudgetError
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
class TestBudget(unittest.TestCase):
class TestBudget(unittest.TestCase):
def test_monthly_budget_crossed_ignore(self):
set_total_expense_zero("2013-02-28", "Cost Center")
budget = make_budget(budget_against="Cost Center")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", posting_date="2013-02-28", submit=True)
self.assertTrue(frappe.db.get_value("GL Entry",
{"voucher_type": "Journal Entry", "voucher_no": jv.name}))
budget.cancel()
def test_monthly_budget_crossed_stop1(self):
set_total_expense_zero("2013-02-28", "Cost Center")
budget = make_budget(budget_against="Cost Center")
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", posting_date="2013-02-28")
self.assertRaises(BudgetError, jv.submit)
budget.load_from_db()
budget.cancel()
@@ -46,7 +46,7 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Cost Center")
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", posting_date="2013-03-02")
@@ -117,14 +117,14 @@ class TestBudget(unittest.TestCase):
set_total_expense_zero("2013-02-28", "Project")
budget = make_budget(budget_against="Project")
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", project="_Test Project", posting_date="2013-02-28")
self.assertRaises(BudgetError, jv.submit)
budget.load_from_db()
budget.cancel()
@@ -132,31 +132,31 @@ class TestBudget(unittest.TestCase):
set_total_expense_zero("2013-02-28", "Cost Center")
budget = make_budget(budget_against="Cost Center")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 150000, "_Test Cost Center - _TC", posting_date="2013-03-28")
self.assertRaises(BudgetError, jv.submit)
budget.cancel()
def test_yearly_budget_crossed_stop2(self):
set_total_expense_zero("2013-02-28", "Project")
budget = make_budget(budget_against="Project")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 150000, "_Test Cost Center - _TC", project="_Test Project", posting_date="2013-03-28")
self.assertRaises(BudgetError, jv.submit)
budget.cancel()
def test_monthly_budget_on_cancellation1(self):
set_total_expense_zero("2013-02-28", "Cost Center")
budget = make_budget(budget_against="Cost Center")
jv1 = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date="2013-02-28", submit=True)
@@ -170,9 +170,9 @@ class TestBudget(unittest.TestCase):
{"voucher_type": "Journal Entry", "voucher_no": jv2.name}))
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
self.assertRaises(BudgetError, jv1.cancel)
budget.load_from_db()
budget.cancel()
@@ -180,7 +180,7 @@ class TestBudget(unittest.TestCase):
set_total_expense_zero("2013-02-28", "Project")
budget = make_budget(budget_against="Project")
jv1 = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date="2013-02-28", submit=True, project="_Test Project")
@@ -194,16 +194,16 @@ class TestBudget(unittest.TestCase):
{"voucher_type": "Journal Entry", "voucher_no": jv2.name}))
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
self.assertRaises(BudgetError, jv1.cancel)
budget.load_from_db()
budget.cancel()
def test_monthly_budget_against_group_cost_center(self):
set_total_expense_zero("2013-02-28", "Cost Center")
set_total_expense_zero("2013-02-28", "Cost Center", "_Test Cost Center 2 - _TC")
budget = make_budget(budget_against="Cost Center", cost_center="_Test Company - _TC")
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
@@ -211,7 +211,7 @@ class TestBudget(unittest.TestCase):
"_Test Bank - _TC", 40000, "_Test Cost Center 2 - _TC", posting_date="2013-02-28")
self.assertRaises(BudgetError, jv.submit)
budget.load_from_db()
budget.cancel()
@@ -239,8 +239,6 @@ class TestBudget(unittest.TestCase):
budget.cancel()
jv.cancel()
frappe.delete_doc('Journal Entry', jv.name)
frappe.delete_doc('Cost Center', cost_center)
def set_total_expense_zero(posting_date, budget_against_field=None, budget_against_CC=None):
if budget_against_field == "Project":
@@ -256,7 +254,7 @@ def set_total_expense_zero(posting_date, budget_against_field=None, budget_again
"budget_against_field": budget_against_field,
"budget_against": budget_against
}))
if existing_expense:
if budget_against_field == "Cost Center":
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
@@ -281,13 +279,13 @@ def make_budget(**args):
frappe.db.sql("delete from `tabBudget Account` where parent = %(name)s", d)
budget = frappe.new_doc("Budget")
if budget_against == "Project":
budget.project = "_Test Project"
else:
budget.cost_center =cost_center or "_Test Cost Center - _TC"
budget.fiscal_year = "_Test Fiscal Year 2013"
budget.monthly_distribution = "_Test Distribution"
budget.company = "_Test Company"
@@ -299,7 +297,7 @@ def make_budget(**args):
"account": "_Test Account Cost for Goods Sold - _TC",
"budget_amount": 100000
})
if args.applicable_on_material_request:
budget.applicable_on_material_request = 1
budget.action_if_annual_budget_exceeded_on_mr = args.action_if_annual_budget_exceeded_on_mr or 'Warn'

View File

@@ -150,7 +150,7 @@ def validate_accounts(file_name):
accounts_dict = {}
for account in accounts:
accounts_dict.setdefault(account["account_name"], account)
if account["parent_account"] and accounts_dict[account["parent_account"]]:
if account["parent_account"] and accounts_dict.get(account["parent_account"]):
accounts_dict[account["parent_account"]]["is_group"] = 1
message = validate_root(accounts_dict)

View File

@@ -1,457 +1,170 @@
{
"allow_copy": 1,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:cost_center_name",
"beta": 0,
"creation": "2013-01-23 19:57:17",
"custom": 0,
"description": "Track separate Income and Expense for product verticals or divisions.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
"allow_copy": 1,
"allow_import": 1,
"allow_rename": 1,
"creation": "2013-01-23 19:57:17",
"description": "Track separate Income and Expense for product verticals or divisions.",
"doctype": "DocType",
"document_type": "Setup",
"engine": "InnoDB",
"field_order": [
"sb0",
"cost_center_name",
"cost_center_number",
"parent_cost_center",
"company",
"cb0",
"is_group",
"disabled",
"lft",
"rgt",
"old_parent"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "sb0",
"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": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "sb0",
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "cost_center_name",
"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": "Cost Center Name",
"length": 0,
"no_copy": 1,
"oldfieldname": "cost_center_name",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "cost_center_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Cost Center Name",
"no_copy": 1,
"oldfieldname": "cost_center_name",
"oldfieldtype": "Data",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "cost_center_number",
"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": 1,
"label": "Cost Center Number",
"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": 0
},
"fieldname": "cost_center_number",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Cost Center Number",
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "parent_cost_center",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Parent Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "parent_cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "parent_cost_center",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Parent Cost Center",
"oldfieldname": "parent_cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company_name",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 1,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "company",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"oldfieldname": "company_name",
"oldfieldtype": "Link",
"options": "Company",
"remember_last_selected_value": 1,
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "cb0",
"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,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0,
"fieldname": "cb0",
"fieldtype": "Column Break",
"width": "50%"
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0",
"fieldname": "is_group",
"fieldtype": "Check",
"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": "Is Group",
"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
},
"default": "0",
"fieldname": "is_group",
"fieldtype": "Check",
"label": "Is Group"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "lft",
"fieldtype": "Int",
"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": "lft",
"length": 0,
"no_copy": 1,
"oldfieldname": "lft",
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "lft",
"no_copy": 1,
"oldfieldname": "lft",
"oldfieldtype": "Int",
"print_hide": 1,
"report_hide": 1,
"search_index": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "rgt",
"fieldtype": "Int",
"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": "rgt",
"length": 0,
"no_copy": 1,
"oldfieldname": "rgt",
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "rgt",
"no_copy": 1,
"oldfieldname": "rgt",
"oldfieldtype": "Int",
"print_hide": 1,
"report_hide": 1,
"search_index": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "old_parent",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "old_parent",
"length": 0,
"no_copy": 1,
"oldfieldname": "old_parent",
"oldfieldtype": "Data",
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"fieldname": "old_parent",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 1,
"label": "old_parent",
"no_copy": 1,
"oldfieldname": "old_parent",
"oldfieldtype": "Data",
"options": "Cost Center",
"print_hide": 1,
"report_hide": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-money",
"idx": 1,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2018-04-26 15:26:25.325778",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
"owner": "Administrator",
],
"icon": "fa fa-money",
"idx": 1,
"modified": "2019-09-16 14:44:17.103548",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 1,
"role": "Auditor",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
"export": 1,
"read": 1,
"report": 1,
"role": "Auditor"
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User"
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Sales User",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
"read": 1,
"role": "Sales User"
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Purchase User",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
"read": 1,
"role": "Purchase User"
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_cost_center, is_group",
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
],
"quick_entry": 1,
"search_fields": "parent_cost_center, is_group",
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "ASC"
}

View File

@@ -0,0 +1,44 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Coupon Code', {
setup: function(frm) {
frm.set_query("pricing_rule", function() {
return {
filters: [
["Pricing Rule","coupon_code_based", "=", "1"]
]
};
});
},
coupon_name:function(frm){
if (frm.doc.__islocal===1) {
frm.trigger("make_coupon_code");
}
},
coupon_type:function(frm){
if (frm.doc.__islocal===1) {
frm.trigger("make_coupon_code");
}
},
make_coupon_code: function(frm) {
var coupon_name=frm.doc.coupon_name;
var coupon_code;
if (frm.doc.coupon_type=='Gift Card') {
coupon_code=Math.random().toString(12).substring(2, 12).toUpperCase();
}
else if(frm.doc.coupon_type=='Promotional'){
coupon_name=coupon_name.replace(/\s/g,'');
coupon_code=coupon_name.toUpperCase().slice(0,8);
}
frm.doc.coupon_code=coupon_code;
frm.refresh_field('coupon_code');
},
refresh: function(frm) {
if (frm.doc.pricing_rule) {
frm.add_custom_button(__("Add/Edit Coupon Conditions"), function(){
frappe.set_route("Form", "Pricing Rule", frm.doc.pricing_rule);
});
}
}
});

View File

@@ -0,0 +1,177 @@
{
"allow_import": 1,
"autoname": "field:coupon_name",
"creation": "2018-01-22 14:34:39.701832",
"doctype": "DocType",
"document_type": "Other",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"coupon_name",
"coupon_type",
"customer",
"column_break_4",
"coupon_code",
"pricing_rule",
"uses",
"valid_from",
"valid_upto",
"maximum_use",
"used",
"column_break_11",
"description",
"amended_from"
],
"fields": [
{
"description": "e.g. \"Summer Holiday 2019 Offer 20\"",
"fieldname": "coupon_name",
"fieldtype": "Data",
"label": "Coupon Name",
"reqd": 1,
"unique": 1
},
{
"fieldname": "coupon_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Coupon Type",
"options": "Promotional\nGift Card",
"reqd": 1
},
{
"depends_on": "eval: doc.coupon_type == \"Gift Card\"",
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
"options": "Customer"
},
{
"fieldname": "column_break_4",
"fieldtype": "Column Break"
},
{
"description": "unique e.g. SAVE20 To be used to get discount",
"fieldname": "coupon_code",
"fieldtype": "Data",
"label": "Coupon Code",
"no_copy": 1,
"set_only_once": 1,
"unique": 1
},
{
"fieldname": "pricing_rule",
"fieldtype": "Link",
"label": "Pricing Rule",
"options": "Pricing Rule",
"reqd": 1
},
{
"fieldname": "uses",
"fieldtype": "Section Break",
"label": "Validity and Usage"
},
{
"fieldname": "valid_from",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Valid From"
},
{
"fieldname": "valid_upto",
"fieldtype": "Date",
"label": "Valid Upto"
},
{
"depends_on": "eval: doc.coupon_type == \"Promotional\"",
"fieldname": "maximum_use",
"fieldtype": "Int",
"label": "Maximum Use"
},
{
"default": "0",
"fieldname": "used",
"fieldtype": "Int",
"label": "Used",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "column_break_11",
"fieldtype": "Column Break"
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"label": "Coupon Description"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Coupon Code",
"print_hide": 1,
"read_only": 1
}
],
"modified": "2019-10-19 14:48:14.602481",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Coupon Code",
"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": "Sales Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Website Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "coupon_name",
"track_changes": 1
}

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. 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 frappe.utils import (strip)
class CouponCode(Document):
def autoname(self):
self.coupon_name = strip(self.coupon_name)
self.name = self.coupon_name
if not self.coupon_code:
if self.coupon_type == "Promotional":
self.coupon_code =''.join([i for i in self.coupon_name if not i.isdigit()])[0:8].upper()
elif self.coupon_type == "Gift Card":
self.coupon_code = frappe.generate_hash()[:10].upper()
def validate(self):
if self.coupon_type == "Gift Card":
self.maximum_use = 1
if not self.customer:
frappe.throw(_("Please select the customer."))

View File

@@ -2,15 +2,15 @@
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Asset Settings", function (assert) {
QUnit.test("test: Coupon Code", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Asset Settings
() => frappe.tests.make('Asset Settings', [
// insert a new Coupon Code
() => frappe.tests.make('Coupon Code', [
// values to be set
{key: 'value'}
]),

View File

@@ -0,0 +1,132 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.stock.get_item_details import get_item_details
from frappe.test_runner import make_test_objects
def test_create_test_data():
frappe.set_user("Administrator")
# create test item
if not frappe.db.exists("Item","_Test Tesla Car"):
item = frappe.get_doc({
"description": "_Test Tesla Car",
"doctype": "Item",
"has_batch_no": 0,
"has_serial_no": 0,
"inspection_required": 0,
"is_stock_item": 1,
"opening_stock":100,
"is_sub_contracted_item": 0,
"item_code": "_Test Tesla Car",
"item_group": "_Test Item Group",
"item_name": "_Test Tesla Car",
"apply_warehouse_wise_reorder_level": 0,
"warehouse":"_Test Warehouse - _TC",
"gst_hsn_code": "999800",
"valuation_rate": 5000,
"standard_rate":5000,
"item_defaults": [{
"company": "_Test Company",
"default_warehouse": "_Test Warehouse - _TC",
"default_price_list":"_Test Price List",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"buying_cost_center": "_Test Cost Center - _TC",
"selling_cost_center": "_Test Cost Center - _TC",
"income_account": "Sales - _TC"
}],
"show_in_website": 1,
"route":"-test-tesla-car",
"website_warehouse": "_Test Warehouse - _TC"
})
item.insert()
# create test item price
item_price = frappe.get_list('Item Price', filters={'item_code': '_Test Tesla Car', 'price_list': '_Test Price List'}, fields=['name'])
if len(item_price)==0:
item_price = frappe.get_doc({
"doctype": "Item Price",
"item_code": "_Test Tesla Car",
"price_list": "_Test Price List",
"price_list_rate": 5000
})
item_price.insert()
# create test item pricing rule
if not frappe.db.exists("Pricing Rule","_Test Pricing Rule for _Test Item"):
item_pricing_rule = frappe.get_doc({
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule for _Test Item",
"apply_on": "Item Code",
"items": [{
"item_code": "_Test Tesla Car"
}],
"warehouse":"_Test Warehouse - _TC",
"coupon_code_based":1,
"selling": 1,
"rate_or_discount": "Discount Percentage",
"discount_percentage": 30,
"company": "_Test Company",
"currency":"INR",
"for_price_list":"_Test Price List"
})
item_pricing_rule.insert()
# create test item sales partner
if not frappe.db.exists("Sales Partner","_Test Coupon Partner"):
sales_partner = frappe.get_doc({
"doctype": "Sales Partner",
"partner_name":"_Test Coupon Partner",
"commission_rate":2,
"referral_code": "COPART"
})
sales_partner.insert()
# create test item coupon code
if not frappe.db.exists("Coupon Code","SAVE30"):
coupon_code = frappe.get_doc({
"doctype": "Coupon Code",
"coupon_name":"SAVE30",
"coupon_code":"SAVE30",
"pricing_rule": "_Test Pricing Rule for _Test Item",
"valid_from": "2014-01-01",
"maximum_use":1,
"used":0
})
coupon_code.insert()
class TestCouponCode(unittest.TestCase):
def setUp(self):
test_create_test_data()
def tearDown(self):
frappe.set_user("Administrator")
def test_1_check_coupon_code_used_before_so(self):
coupon_code = frappe.get_doc("Coupon Code", frappe.db.get_value("Coupon Code", {"coupon_name":"SAVE30"}))
# reset used coupon code count
coupon_code.used=0
coupon_code.save()
# check no coupon code is used before sales order is made
self.assertEqual(coupon_code.get("used"),0)
def test_2_sales_order_with_coupon_code(self):
so = make_sales_order(customer="_Test Customer",selling_price_list="_Test Price List",item_code="_Test Tesla Car", rate=5000,qty=1, do_not_submit=True)
so = frappe.get_doc('Sales Order', so.name)
# check item price before coupon code is applied
self.assertEqual(so.items[0].rate, 5000)
so.coupon_code='SAVE30'
so.sales_partner='_Test Coupon Partner'
so.save()
# check item price after coupon code is applied
self.assertEqual(so.items[0].rate, 3500)
so.submit()
def test_3_check_coupon_code_used_after_so(self):
doc = frappe.get_doc("Coupon Code", frappe.db.get_value("Coupon Code", {"coupon_name":"SAVE30"}))
# check no coupon code is used before sales order is made
self.assertEqual(doc.get("used"),1)

View File

@@ -8,7 +8,8 @@
"customer",
"column_break_3",
"posting_date",
"outstanding_amount"
"outstanding_amount",
"debit_to"
],
"fields": [
{
@@ -37,21 +38,29 @@
"read_only": 1
},
{
"fetch_from": "sales_invoice.grand_total",
"fetch_from": "sales_invoice.outstanding_amount",
"fetch_if_empty": 1,
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Outstanding Amount",
"options": "Company:company:default_currency",
"read_only": 1
"options": "Company:company:default_currency"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"fetch_from": "sales_invoice.debit_to",
"fieldname": "debit_to",
"fieldtype": "Link",
"label": "Debit to",
"options": "Account",
"read_only": 1
}
],
"istable": 1,
"modified": "2019-05-30 19:27:29.436153",
"modified": "2019-09-26 11:05:36.016772",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Discounted Invoice",

View File

@@ -13,41 +13,57 @@ frappe.ui.form.on('Invoice Discounting', {
};
});
frm.events.filter_accounts("bank_account", frm, {"account_type": "Bank"});
frm.events.filter_accounts("bank_charges_account", frm, {"root_type": "Expense"});
frm.events.filter_accounts("short_term_loan", frm, {"root_type": "Liability"});
frm.events.filter_accounts("accounts_receivable_credit", frm, {"account_type": "Receivable"});
frm.events.filter_accounts("accounts_receivable_discounted", frm, {"account_type": "Receivable"});
frm.events.filter_accounts("accounts_receivable_unpaid", frm, {"account_type": "Receivable"});
frm.events.filter_accounts("bank_account", frm, [["account_type", "=", "Bank"]]);
frm.events.filter_accounts("bank_charges_account", frm, [["root_type", "=", "Expense"]]);
frm.events.filter_accounts("short_term_loan", frm, [["root_type", "=", "Liability"]]);
frm.events.filter_accounts("accounts_receivable_discounted", frm, [["account_type", "=", "Receivable"]]);
frm.events.filter_accounts("accounts_receivable_credit", frm, [["account_type", "=", "Receivable"]]);
frm.events.filter_accounts("accounts_receivable_unpaid", frm, [["account_type", "=", "Receivable"]]);
},
filter_accounts: (fieldname, frm, addl_filters) => {
let filters = {
"company": frm.doc.company,
"is_group": 0
};
if(addl_filters) Object.assign(filters, addl_filters);
let filters = [
["company", "=", frm.doc.company],
["is_group", "=", 0]
];
if(addl_filters){
filters = $.merge(filters , addl_filters);
}
frm.set_query(fieldname, () => { return { "filters": filters }; });
},
refresh_filters: (frm) =>{
let invoice_accounts = Object.keys(frm.doc.invoices).map(function(key) {
return frm.doc.invoices[key].debit_to;
});
let filters = [
["account_type", "=", "Receivable"],
["name", "not in", invoice_accounts]
];
frm.events.filter_accounts("accounts_receivable_credit", frm, filters);
frm.events.filter_accounts("accounts_receivable_discounted", frm, filters);
frm.events.filter_accounts("accounts_receivable_unpaid", frm, filters);
},
refresh: (frm) => {
frm.events.show_general_ledger(frm);
if(frm.doc.docstatus === 0) {
if (frm.doc.docstatus === 0) {
frm.add_custom_button(__('Get Invoices'), function() {
frm.events.get_invoices(frm);
});
}
if(frm.doc.docstatus === 1 && frm.doc.status !== "Settled") {
if(frm.doc.status == "Sanctioned") {
if (frm.doc.docstatus === 1 && frm.doc.status !== "Settled") {
if (frm.doc.status == "Sanctioned") {
frm.add_custom_button(__('Disburse Loan'), function() {
frm.events.create_disbursement_entry(frm);
}).addClass("btn-primary");
}
if(frm.doc.status == "Disbursed") {
if (frm.doc.status == "Disbursed") {
frm.add_custom_button(__('Close Loan'), function() {
frm.events.close_loan(frm);
}).addClass("btn-primary");
@@ -64,7 +80,7 @@ frappe.ui.form.on('Invoice Discounting', {
},
set_end_date: (frm) => {
if(frm.doc.loan_start_date && frm.doc.loan_period) {
if (frm.doc.loan_start_date && frm.doc.loan_period) {
let end_date = frappe.datetime.add_days(frm.doc.loan_start_date, frm.doc.loan_period);
frm.set_value("loan_end_date", end_date);
}
@@ -81,7 +97,6 @@ frappe.ui.form.on('Invoice Discounting', {
}
frm.set_value("total_amount", total_amount);
},
get_invoices: (frm) => {
var d = new frappe.ui.Dialog({
title: __('Get Invoices based on Filters'),
@@ -132,6 +147,7 @@ frappe.ui.form.on('Invoice Discounting', {
frm.doc.invoices = frm.doc.invoices.filter(row => row.sales_invoice);
let row = frm.add_child("invoices");
$.extend(row, v);
frm.events.refresh_filters(frm);
});
refresh_field("invoices");
}
@@ -190,8 +206,10 @@ frappe.ui.form.on('Invoice Discounting', {
frappe.ui.form.on('Discounted Invoice', {
sales_invoice: (frm) => {
frm.events.calculate_total_amount(frm);
frm.events.refresh_filters(frm);
},
invoices_remove: (frm) => {
frm.events.calculate_total_amount(frm);
frm.events.refresh_filters(frm);
}
});
});

View File

@@ -12,6 +12,7 @@ from erpnext.accounts.general_ledger import make_gl_entries
class InvoiceDiscounting(AccountsController):
def validate(self):
self.validate_mandatory()
self.validate_invoices()
self.calculate_total_amount()
self.set_status()
self.set_end_date()
@@ -24,6 +25,21 @@ class InvoiceDiscounting(AccountsController):
if self.docstatus == 1 and not (self.loan_start_date and self.loan_period):
frappe.throw(_("Loan Start Date and Loan Period are mandatory to save the Invoice Discounting"))
def validate_invoices(self):
discounted_invoices = [record.sales_invoice for record in
frappe.get_all("Discounted Invoice",fields=["sales_invoice"], filters={"docstatus":1})]
for record in self.invoices:
if record.sales_invoice in discounted_invoices:
frappe.throw(_("Row({0}): {1} is already discounted in {2}")
.format(record.idx, frappe.bold(record.sales_invoice), frappe.bold(record.parent)))
actual_outstanding = frappe.db.get_value("Sales Invoice", record.sales_invoice,"outstanding_amount")
if record.outstanding_amount > actual_outstanding :
frappe.throw(_
("Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2}").format(
record.idx, frappe.bold(actual_outstanding), frappe.bold(record.sales_invoice)))
def calculate_total_amount(self):
self.total_amount = sum([flt(d.outstanding_amount) for d in self.invoices])
@@ -212,7 +228,8 @@ def get_invoices(filters):
name as sales_invoice,
customer,
posting_date,
outstanding_amount
outstanding_amount,
debit_to
from `tabSales Invoice` si
where
docstatus = 1

View File

@@ -7,7 +7,7 @@ frappe.provide("erpnext.journal_entry");
frappe.ui.form.on("Journal Entry", {
setup: function(frm) {
frm.add_fetch("bank_account_no", "account", "account");
frm.add_fetch("bank_account", "account", "account");
},
refresh: function(frm) {
@@ -570,7 +570,7 @@ $.extend(erpnext.journal_entry, {
},
{fieldtype: "Date", fieldname: "posting_date", label: __("Date"), reqd: 1,
default: frm.doc.posting_date},
{fieldtype: "Small Text", fieldname: "user_remark", label: __("User Remark"), reqd: 1},
{fieldtype: "Small Text", fieldname: "user_remark", label: __("User Remark")},
{fieldtype: "Select", fieldname: "naming_series", label: __("Series"), reqd: 1,
options: naming_series_options, default: naming_series_default},
]
@@ -608,15 +608,9 @@ $.extend(erpnext.journal_entry, {
},
account_query: function(frm) {
var inter_company = 0;
if (frm.doc.voucher_type == "Inter Company Journal Entry") {
inter_company = 1;
}
var filters = {
company: frm.doc.company,
is_group: 0,
inter_company_account: inter_company
is_group: 0
};
if(!frm.doc.multi_currency) {
$.extend(filters, {

View File

@@ -827,10 +827,10 @@ def get_opening_accounts(company):
accounts = frappe.db.sql_list("""select
name from tabAccount
where
is_group=0 and report_type='Balance Sheet' and company=%s and
name not in(select distinct account from tabWarehouse where
is_group=0 and report_type='Balance Sheet' and company={0} and
name not in (select distinct account from tabWarehouse where
account is not null and account != '')
order by name asc""", frappe.db.escape(company))
order by name asc""".format(frappe.db.escape(company)))
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]

View File

@@ -10,7 +10,7 @@
"account_type",
"balance",
"col_break1",
"bank_account_no",
"bank_account",
"party_type",
"party",
"party_balance",
@@ -40,7 +40,7 @@
"fields": [
{
"bold": 1,
"columns": 3,
"columns": 2,
"fieldname": "account",
"fieldtype": "Link",
"in_global_search": 1,
@@ -90,20 +90,16 @@
"fieldtype": "Column Break"
},
{
"fieldname": "bank_account_no",
"fieldtype": "Link",
"label": "Bank Account No",
"options": "Bank Account"
},
{
"default": "Customer",
"fieldname": "party_type",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Party Type",
"options": "DocType",
"search_index": 1
},
{
"columns": 3,
"columns": 2,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
@@ -266,11 +262,17 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
"options": "Bank Account"
}
],
"idx": 1,
"istable": 1,
"modified": "2019-07-16 17:12:08.238334",
"modified": "2019-10-02 12:23:21.693443",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",

View File

@@ -8,10 +8,12 @@ import unittest
from frappe.utils import today, cint, flt, getdate
from erpnext.accounts.doctype.loyalty_program.loyalty_program import get_loyalty_program_details_with_points
from erpnext.accounts.party import get_dashboard_info
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
class TestLoyaltyProgram(unittest.TestCase):
@classmethod
def setUpClass(self):
set_perpetual_inventory(0)
# create relevant item, customer, loyalty program, etc
create_records()
@@ -49,7 +51,6 @@ class TestLoyaltyProgram(unittest.TestCase):
# cancel and delete
for d in [si_redeem, si_original]:
d.cancel()
frappe.delete_doc('Sales Invoice', d.name)
def test_loyalty_points_earned_multiple_tier(self):
frappe.db.set_value("Customer", "Test Loyalty Customer", "loyalty_program", "Test Multiple Loyalty")
@@ -91,7 +92,6 @@ class TestLoyaltyProgram(unittest.TestCase):
# cancel and delete
for d in [si_redeem, si_original]:
d.cancel()
frappe.delete_doc('Sales Invoice', d.name)
def test_cancel_sales_invoice(self):
''' cancelling the sales invoice should cancel the earned points'''
@@ -143,7 +143,6 @@ class TestLoyaltyProgram(unittest.TestCase):
d.cancel()
except frappe.TimestampMismatchError:
frappe.get_doc('Sales Invoice', d.name).cancel()
frappe.delete_doc('Sales Invoice', d.name)
def test_loyalty_points_for_dashboard(self):
doc = frappe.get_doc('Customer', 'Test Loyalty Customer')

View File

@@ -1,171 +1,74 @@
{
"allow_copy": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:mode_of_payment",
"beta": 0,
"creation": "2012-12-04 17:49:20",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
"engine": "InnoDB",
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:mode_of_payment",
"creation": "2012-12-04 17:49:20",
"doctype": "DocType",
"document_type": "Setup",
"engine": "InnoDB",
"field_order": [
"mode_of_payment",
"enabled",
"type",
"accounts"
],
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mode_of_payment",
"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": "Mode of Payment",
"length": 0,
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
"fieldname": "mode_of_payment",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Mode of Payment",
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Data",
"reqd": 1,
"unique": 1
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "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": 1,
"label": "Type",
"length": 0,
"no_copy": 0,
"options": "Cash\nBank\nGeneral",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
"fieldname": "type",
"fieldtype": "Select",
"in_standard_filter": 1,
"label": "Type",
"options": "Cash\nBank\nGeneral"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "accounts",
"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": "Accounts",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment 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
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Accounts",
"options": "Mode of Payment Account"
},
{
"default": "1",
"fieldname": "enabled",
"fieldtype": "Check",
"label": "Enabled"
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-credit-card",
"idx": 1,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-02-17 16:31:34.207683",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
"owner": "harshada@webnotestech.com",
],
"icon": "fa fa-credit-card",
"idx": 1,
"modified": "2019-08-14 14:58:42.079115",
"modified_by": "sammish.thundiyil@gmail.com",
"module": "Accounts",
"name": "Mode of Payment",
"owner": "harshada@webnotestech.com",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"create": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
},
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
"read": 1,
"report": 1,
"role": "Accounts User"
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
],
"quick_entry": 1,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "ASC"
}

View File

@@ -32,8 +32,10 @@ class OpeningInvoiceCreationTool(Document):
})
invoices_summary.update({company: _summary})
paid_amount.append(invoice.paid_amount)
outstanding_amount.append(invoice.outstanding_amount)
if invoice.paid_amount:
paid_amount.append(invoice.paid_amount)
if invoice.outstanding_amount:
outstanding_amount.append(invoice.outstanding_amount)
if paid_amount or outstanding_amount:
max_count.update({

View File

@@ -308,7 +308,7 @@ frappe.ui.form.on('Payment Entry', {
() => {
frm.set_party_account_based_on_party = false;
if (r.message.bank_account) {
frm.set_value("bank_account", r.message.bank_account);
frm.set_value("party_bank_account", r.message.bank_account);
}
}
]);
@@ -554,7 +554,7 @@ frappe.ui.form.on('Payment Entry', {
frappe.flags.allocate_payment_amount = true;
frm.events.validate_filters_data(frm, filters);
frm.events.get_outstanding_documents(frm, filters);
}, __("Filters"), __("Get Outstanding Invoices"));
}, __("Filters"), __("Get Outstanding Documents"));
},
validate_filters_data: function(frm, filters) {
@@ -720,7 +720,7 @@ frappe.ui.form.on('Payment Entry', {
$.each(frm.doc.references || [], function(i, row) {
row.allocated_amount = 0 //If allocate payment amount checkbox is unchecked, set zero to allocate amount
if(frappe.flags.allocate_payment_amount){
if(frappe.flags.allocate_payment_amount != 0){
if(row.outstanding_amount > 0 && allocated_positive_outstanding > 0) {
if(row.outstanding_amount >= allocated_positive_outstanding) {
row.allocated_amount = allocated_positive_outstanding;

View File

@@ -62,6 +62,7 @@
"dimension_col_break",
"cost_center",
"section_break_12",
"status",
"remarks",
"column_break_16",
"letter_head",
@@ -563,10 +564,18 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"default": "Draft",
"fieldname": "status",
"fieldtype": "Select",
"label": "Status",
"options": "\nDraft\nSubmitted\nCancelled",
"read_only": 1
}
],
"is_submittable": 1,
"modified": "2019-05-27 15:53:21.108857",
"modified": "2019-11-06 12:59:43.151721",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",

View File

@@ -61,6 +61,7 @@ class PaymentEntry(AccountsController):
self.validate_duplicate_entry()
self.validate_allocated_amount()
self.ensure_supplier_is_not_blocked()
self.set_status()
def on_submit(self):
self.setup_party_account_field()
@@ -70,6 +71,7 @@ class PaymentEntry(AccountsController):
self.update_outstanding_amounts()
self.update_advance_paid()
self.update_expense_claim()
self.set_status()
def on_cancel(self):
@@ -79,6 +81,7 @@ class PaymentEntry(AccountsController):
self.update_advance_paid()
self.update_expense_claim()
self.delink_advance_entry_references()
self.set_status()
def update_outstanding_amounts(self):
self.set_missing_ref_details(force=True)
@@ -126,7 +129,7 @@ class PaymentEntry(AccountsController):
if not self.party:
frappe.throw(_("Party is mandatory"))
_party_name = "title" if self.party_type == "Student" else self.party_type.lower() + "_name"
_party_name = "title" if self.party_type in ("Student", "Shareholder") else self.party_type.lower() + "_name"
self.party_name = frappe.db.get_value(self.party_type, self.party, _party_name)
if self.party:
@@ -275,6 +278,14 @@ class PaymentEntry(AccountsController):
frappe.throw(_("Against Journal Entry {0} does not have any unmatched {1} entry")
.format(d.reference_name, dr_or_cr))
def set_status(self):
if self.docstatus == 2:
self.status = 'Cancelled'
elif self.docstatus == 1:
self.status = 'Submitted'
else:
self.status = 'Draft'
def set_amounts(self):
self.set_amounts_in_company_currency()
self.set_total_allocated_amount()
@@ -624,8 +635,8 @@ def get_outstanding_reference_documents(args):
data = negative_outstanding_invoices + outstanding_invoices + orders_to_be_billed
if not data:
frappe.msgprint(_("No outstanding invoices found for the {0} <b>{1}</b> which qualify the filters you have specified")
.format(args.get("party_type").lower(), args.get("party")))
frappe.msgprint(_("No outstanding invoices found for the {0} {1} which qualify the filters you have specified.")
.format(args.get("party_type").lower(), frappe.bold(args.get("party"))))
return data
@@ -683,8 +694,8 @@ def get_orders_to_be_billed(posting_date, party_type, party,
order_list = []
for d in orders:
if not (d.outstanding_amount >= filters.get("outstanding_amt_greater_than")
and d.outstanding_amount <= filters.get("outstanding_amt_less_than")):
if not (flt(d.outstanding_amount) >= flt(filters.get("outstanding_amt_greater_than"))
and flt(d.outstanding_amount) <= flt(filters.get("outstanding_amt_less_than"))):
continue
d["voucher_type"] = voucher_type
@@ -761,9 +772,23 @@ def get_party_details(company, party_type, party, date, cost_center=None):
@frappe.whitelist()
def get_account_details(account, date, cost_center=None):
frappe.has_permission('Payment Entry', throw=True)
# to check if the passed account is accessible under reference doctype Payment Entry
account_list = frappe.get_list('Account', {
'name': account
}, reference_doctype='Payment Entry', limit=1)
# There might be some user permissions which will allow account under certain doctypes
# except for Payment Entry, only in such case we should throw permission error
if not account_list:
frappe.throw(_('Account: {0} is not permitted under Payment Entry').format(account))
account_balance = get_balance_on(account, date, cost_center=cost_center,
ignore_account_permission=True)
return frappe._dict({
"account_currency": get_account_currency(account),
"account_balance": get_balance_on(account, date, cost_center=cost_center),
"account_balance": account_balance,
"account_type": frappe.db.get_value("Account", account, "account_type")
})
@@ -926,6 +951,10 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
bank = get_default_bank_cash_account(doc.company, "Bank", mode_of_payment=doc.get("mode_of_payment"),
account=bank_account)
if not bank:
bank = get_default_bank_cash_account(doc.company, "Cash", mode_of_payment=doc.get("mode_of_payment"),
account=bank_account)
paid_amount = received_amount = 0
if party_account_currency == bank.account_currency:
paid_amount = received_amount = abs(outstanding_amount)
@@ -933,10 +962,15 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
paid_amount = abs(outstanding_amount)
if bank_amount:
received_amount = bank_amount
else:
received_amount = paid_amount * doc.conversion_rate
else:
received_amount = abs(outstanding_amount)
if bank_amount:
paid_amount = bank_amount
else:
# if party account currency and bank currency is different then populate paid amount as well
paid_amount = received_amount * doc.conversion_rate
pe = frappe.new_doc("Payment Entry")
pe.payment_type = payment_type
@@ -1022,7 +1056,7 @@ def make_payment_order(source_name, target_doc=None):
def update_item(source_doc, target_doc, source_parent):
target_doc.bank_account = source_parent.party_bank_account
target_doc.amount = source_parent.base_paid_amount
target_doc.amount = source_doc.allocated_amount
target_doc.account = source_parent.paid_to
target_doc.payment_entry = source_parent.name
target_doc.supplier = source_parent.party

View File

@@ -66,10 +66,10 @@ frappe.ui.form.on('Payment Order', {
get_query_filters: {
bank: frm.doc.bank,
docstatus: 1,
payment_type: ("!=", "Receive"),
payment_type: ["!=", "Receive"],
bank_account: frm.doc.company_bank_account,
paid_from: frm.doc.account,
payment_order_status: ["=", "Initiated"],
payment_order_status: ["=", "Initiated"]
}
});
},

View File

@@ -1,29 +0,0 @@
frappe.ui.form.on('Payment Order', {
refresh: function(frm) {
if (frm.doc.docstatus==1 && frm.doc.payment_order_type==='Payment Entry') {
frm.add_custom_button(__('Generate Text File'), function() {
frm.trigger("generate_text_and_download_file");
});
}
},
generate_text_and_download_file: (frm) => {
return frappe.call({
method: "erpnext.regional.india.bank_remittance.generate_report",
args: {
name: frm.doc.name
},
freeze: true,
callback: function(r) {
{
frm.reload_doc();
const a = document.createElement('a');
let file_obj = r.message;
a.href = file_obj.file_url;
a.target = '_blank';
a.download = file_obj.file_name;
a.click();
}
}
});
}
});

View File

@@ -90,7 +90,8 @@ class PaymentReconciliation(Document):
FROM `tab{doc}`, `tabGL Entry`
WHERE
(`tab{doc}`.name = `tabGL Entry`.against_voucher or `tab{doc}`.name = `tabGL Entry`.voucher_no)
and `tab{doc}`.is_return = 1 and `tabGL Entry`.against_voucher_type = %(voucher_type)s
and `tab{doc}`.is_return = 1 and `tab{doc}`.return_against IS NULL
and `tabGL Entry`.against_voucher_type = %(voucher_type)s
and `tab{doc}`.docstatus = 1 and `tabGL Entry`.party = %(party)s
and `tabGL Entry`.party_type = %(party_type)s and `tabGL Entry`.account = %(account)s
GROUP BY `tab{doc}`.name
@@ -257,11 +258,8 @@ def reconcile_dr_cr_note(dr_cr_notes):
voucher_type = ('Credit Note'
if d.voucher_type == 'Sales Invoice' else 'Debit Note')
dr_or_cr = ('credit_in_account_currency'
if d.reference_type == 'Sales Invoice' else 'debit_in_account_currency')
reconcile_dr_or_cr = ('debit_in_account_currency'
if dr_or_cr == 'credit_in_account_currency' else 'credit_in_account_currency')
if d.dr_or_cr == 'credit_in_account_currency' else 'credit_in_account_currency')
jv = frappe.get_doc({
"doctype": "Journal Entry",
@@ -272,8 +270,7 @@ def reconcile_dr_cr_note(dr_cr_notes):
'account': d.account,
'party': d.party,
'party_type': d.party_type,
reconcile_dr_or_cr: (abs(d.allocated_amount)
if abs(d.unadjusted_amount) > abs(d.allocated_amount) else abs(d.unadjusted_amount)),
d.dr_or_cr: abs(d.allocated_amount),
'reference_type': d.against_voucher_type,
'reference_name': d.against_voucher
},
@@ -281,7 +278,8 @@ def reconcile_dr_cr_note(dr_cr_notes):
'account': d.account,
'party': d.party,
'party_type': d.party_type,
dr_or_cr: abs(d.allocated_amount),
reconcile_dr_or_cr: (abs(d.allocated_amount)
if abs(d.unadjusted_amount) > abs(d.allocated_amount) else abs(d.unadjusted_amount)),
'reference_type': d.voucher_type,
'reference_name': d.voucher_no
}

View File

@@ -1,7 +1,6 @@
cur_frm.add_fetch("payment_gateway", "payment_account", "payment_account")
cur_frm.add_fetch("payment_gateway", "payment_gateway", "payment_gateway")
cur_frm.add_fetch("payment_gateway", "message", "message")
cur_frm.add_fetch("payment_gateway", "payment_url_message", "payment_url_message")
cur_frm.add_fetch("payment_gateway_account", "payment_account", "payment_account")
cur_frm.add_fetch("payment_gateway_account", "payment_gateway", "payment_gateway")
cur_frm.add_fetch("payment_gateway_account", "message", "message")
frappe.ui.form.on("Payment Request", "onload", function(frm, dt, dn){
if (frm.doc.reference_doctype) {

View File

@@ -20,7 +20,7 @@ class PaymentRequest(Document):
if self.get("__islocal"):
self.status = 'Draft'
self.validate_reference_document()
self.validate_payment_request()
self.validate_payment_request_amount()
self.validate_currency()
self.validate_subscription_details()
@@ -28,10 +28,19 @@ class PaymentRequest(Document):
if not self.reference_doctype or not self.reference_name:
frappe.throw(_("To create a Payment Request reference document is required"))
def validate_payment_request(self):
if frappe.db.get_value("Payment Request", {"reference_name": self.reference_name,
"name": ("!=", self.name), "status": ("not in", ["Initiated", "Paid"]), "docstatus": 1}, "name"):
frappe.throw(_("Payment Request already exists {0}".format(self.reference_name)))
def validate_payment_request_amount(self):
existing_payment_request_amount = \
get_existing_payment_request_amount(self.reference_doctype, self.reference_name)
if existing_payment_request_amount:
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if (hasattr(ref_doc, "order_type") \
and getattr(ref_doc, "order_type") != "Shopping Cart"):
ref_amount = get_amount(ref_doc)
if existing_payment_request_amount + flt(self.grand_total)> ref_amount:
frappe.throw(_("Total Payment Request amount cannot be greater than {0} amount"
.format(self.reference_doctype)))
def validate_currency(self):
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
@@ -271,7 +280,7 @@ def make_payment_request(**args):
args = frappe._dict(args)
ref_doc = frappe.get_doc(args.dt, args.dn)
grand_total = get_amount(ref_doc, args.dt)
grand_total = get_amount(ref_doc)
if args.loyalty_points and args.dt == "Sales Order":
from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points
loyalty_amount = validate_loyalty_points(ref_doc, int(args.loyalty_points))
@@ -281,17 +290,25 @@ def make_payment_request(**args):
gateway_account = get_gateway_details(args) or frappe._dict()
existing_payment_request = frappe.db.get_value("Payment Request",
{"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": ["!=", 2]})
bank_account = (get_party_bank_account(args.get('party_type'), args.get('party'))
if args.get('party_type') else '')
existing_payment_request = None
if args.order_type == "Shopping Cart":
existing_payment_request = frappe.db.get_value("Payment Request",
{"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": ("!=", 2)})
if existing_payment_request:
frappe.db.set_value("Payment Request", existing_payment_request, "grand_total", grand_total, update_modified=False)
pr = frappe.get_doc("Payment Request", existing_payment_request)
else:
if args.order_type != "Shopping Cart":
existing_payment_request_amount = \
get_existing_payment_request_amount(args.dt, args.dn)
if existing_payment_request_amount:
grand_total -= existing_payment_request_amount
pr = frappe.new_doc("Payment Request")
pr.update({
"payment_gateway_account": gateway_account.get("name"),
@@ -327,8 +344,9 @@ def make_payment_request(**args):
return pr.as_dict()
def get_amount(ref_doc, dt):
def get_amount(ref_doc):
"""get amount based on doctype"""
dt = ref_doc.doctype
if dt in ["Sales Order", "Purchase Order"]:
grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
@@ -347,6 +365,17 @@ def get_amount(ref_doc, dt):
else:
frappe.throw(_("Payment Entry is already created"))
def get_existing_payment_request_amount(ref_dt, ref_dn):
existing_payment_request_amount = frappe.db.sql("""
select sum(grand_total)
from `tabPayment Request`
where
reference_doctype = %s
and reference_name = %s
and docstatus = 1
""", (ref_dt, ref_dn))
return flt(existing_payment_request_amount[0][0]) if existing_payment_request_amount else 0
def get_gateway_details(args):
"""return gateway and payment account of default payment gateway"""
if args.get("payment_gateway"):

View File

@@ -37,12 +37,12 @@ class TestPaymentRequest(unittest.TestCase):
def setUp(self):
if not frappe.db.get_value("Payment Gateway", payment_gateway["gateway"], "name"):
frappe.get_doc(payment_gateway).insert(ignore_permissions=True)
for method in payment_method:
if not frappe.db.get_value("Payment Gateway Account", {"payment_gateway": method["payment_gateway"],
if not frappe.db.get_value("Payment Gateway Account", {"payment_gateway": method["payment_gateway"],
"currency": method["currency"]}, "name"):
frappe.get_doc(method).insert(ignore_permissions=True)
def test_payment_request_linkings(self):
so_inr = make_sales_order(currency="INR")
pr = make_payment_request(dt="Sales Order", dn=so_inr.name, recipient_id="saurabh@erpnext.com")
@@ -100,3 +100,23 @@ class TestPaymentRequest(unittest.TestCase):
self.assertEqual(expected_gle[gle.account][1], gle.debit)
self.assertEqual(expected_gle[gle.account][2], gle.credit)
self.assertEqual(expected_gle[gle.account][3], gle.against_voucher)
def test_multiple_payment_entries_against_sales_order(self):
# Make Sales Order, grand_total = 1000
so = make_sales_order()
# Payment Request amount = 200
pr1 = make_payment_request(dt="Sales Order", dn=so.name,
recipient_id="nabin@erpnext.com", return_doc=1)
pr1.grand_total = 200
pr1.submit()
# Make a 2nd Payment Request
pr2 = make_payment_request(dt="Sales Order", dn=so.name,
recipient_id="nabin@erpnext.com", return_doc=1)
self.assertEqual(pr2.grand_total, 800)
# Try to make Payment Request more than SO amount, should give validation
pr2.grand_total = 900
self.assertRaises(frappe.ValidationError, pr2.save)

File diff suppressed because it is too large Load Diff

View File

@@ -249,6 +249,9 @@ def get_pricing_rule_for_item(args, price_list_rate=0, doc=None):
if pricing_rule.mixed_conditions or pricing_rule.apply_rule_on_other:
continue
if pricing_rule.coupon_code_based==1 and args.coupon_code==None:
return item_details
if (not pricing_rule.validate_applied_rule and
pricing_rule.price_or_product_discount == "Price"):
apply_price_discount_pricing_rule(pricing_rule, item_details, args)

View File

@@ -531,4 +531,32 @@ def validate_pricing_rule_for_different_cond(doc):
for d in doc.get("items"):
validate_pricing_rule_on_items(doc, d, True)
return doc
return doc
def validate_coupon_code(coupon_name):
from frappe.utils import today,getdate
coupon=frappe.get_doc("Coupon Code",coupon_name)
if coupon.valid_from:
if coupon.valid_from > getdate(today()) :
frappe.throw(_("Sorry,coupon code validity has not started"))
elif coupon.valid_upto:
if coupon.valid_upto < getdate(today()) :
frappe.throw(_("Sorry,coupon code validity has expired"))
elif coupon.used>=coupon.maximum_use:
frappe.throw(_("Sorry,coupon code are exhausted"))
else:
return
def update_coupon_code_count(coupon_name,transaction_type):
coupon=frappe.get_doc("Coupon Code",coupon_name)
if coupon:
if transaction_type=='used':
if coupon.used<coupon.maximum_use:
coupon.used=coupon.used+1
coupon.save(ignore_permissions=True)
else:
frappe.throw(_("{0} Coupon used are {1}. Allowed quantity is exhausted").format(coupon.coupon_code,coupon.used))
elif transaction_type=='cancelled':
if coupon.used>0:
coupon.used=coupon.used-1
coupon.save(ignore_permissions=True)

View File

@@ -330,23 +330,6 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
frm: cur_frm
})
},
asset: function(frm, cdt, cdn) {
var row = locals[cdt][cdn];
if(row.asset) {
frappe.call({
method: "erpnext.assets.doctype.asset_category.asset_category.get_asset_category_account",
args: {
"asset": row.asset,
"fieldname": "fixed_asset_account",
"account": row.expense_account
},
callback: function(r, rt) {
frappe.model.set_value(cdt, cdn, "expense_account", r.message);
}
})
}
}
});
cur_frm.script_manager.make(erpnext.accounts.PurchaseInvoice);
@@ -430,19 +413,7 @@ cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn)
cur_frm.set_query("expense_account", "items", function(doc) {
return {
query: "erpnext.controllers.queries.get_expense_account",
filters: {'company': doc.company}
}
});
cur_frm.set_query("asset", "items", function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
'item_code': d.item_code,
'docstatus': 1,
'company': doc.company,
'status': 'Submitted'
}
filters: {'company': doc.company }
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -18,13 +18,14 @@ from erpnext.accounts.general_ledger import make_gl_entries, merge_similar_entri
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
from erpnext.buying.utils import check_on_hold_or_closed_status
from erpnext.accounts.general_ledger import get_round_off_account_and_cost_center
from erpnext.assets.doctype.asset.asset import get_asset_account, is_cwip_accounting_disabled
from erpnext.assets.doctype.asset.asset import get_asset_account, is_cwip_accounting_enabled
from frappe.model.mapper import get_mapped_doc
from six import iteritems
from erpnext.accounts.doctype.sales_invoice.sales_invoice import validate_inter_company_party, update_linked_doc,\
unlink_inter_company_doc
from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category import get_party_tax_withholding_details
from erpnext.accounts.deferred_revenue import validate_service_stop_date
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import get_item_account_wise_additional_cost
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -97,7 +98,6 @@ class PurchaseInvoice(BuyingController):
self.set_against_expense_account()
self.validate_write_off_account()
self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount", "items")
self.validate_fixed_asset()
self.create_remarks()
self.set_status()
self.validate_purchase_receipt_if_update_stock()
@@ -225,6 +225,8 @@ class PurchaseInvoice(BuyingController):
# in case of auto inventory accounting,
# expense account is always "Stock Received But Not Billed" for a stock item
# except epening entry, drop-ship entry and fixed asset items
if item.item_code:
asset_category = frappe.get_cached_value("Item", item.item_code, "asset_category")
if auto_accounting_for_stock and item.item_code in stock_items \
and self.is_opening == 'No' and not item.is_fixed_asset \
@@ -235,12 +237,8 @@ class PurchaseInvoice(BuyingController):
item.expense_account = warehouse_account[item.warehouse]["account"]
else:
item.expense_account = stock_not_billed_account
elif item.is_fixed_asset and is_cwip_accounting_disabled():
if not item.asset:
frappe.throw(_("Row {0}: asset is required for item {1}")
.format(item.idx, item.item_code))
item.expense_account = get_asset_category_account(item.asset, 'fixed_asset_account',
elif item.is_fixed_asset and not is_cwip_accounting_enabled(asset_category):
item.expense_account = get_asset_category_account('fixed_asset_account', item=item.item_code,
company = self.company)
elif item.is_fixed_asset and item.pr_detail:
item.expense_account = asset_received_but_not_billed
@@ -364,7 +362,7 @@ class PurchaseInvoice(BuyingController):
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
make_gl_entries(gl_entries, cancel=(self.docstatus == 2),
update_outstanding=update_outstanding, merge_entries=False)
update_outstanding=update_outstanding, merge_entries=False, from_repost=from_repost)
if update_outstanding == "No":
update_outstanding_amt(self.credit_to, "Supplier", self.supplier,
@@ -391,7 +389,8 @@ class PurchaseInvoice(BuyingController):
self.make_supplier_gl_entry(gl_entries)
self.make_item_gl_entries(gl_entries)
if not is_cwip_accounting_disabled():
if self.check_asset_cwip_enabled():
self.get_asset_gl_entry(gl_entries)
self.make_tax_gl_entries(gl_entries)
@@ -404,6 +403,15 @@ class PurchaseInvoice(BuyingController):
return gl_entries
def check_asset_cwip_enabled(self):
# Check if there exists any item with cwip accounting enabled in it's asset category
for item in self.get("items"):
if item.item_code and item.is_fixed_asset:
asset_category = frappe.get_cached_value("Item", item.item_code, "asset_category")
if is_cwip_accounting_enabled(asset_category):
return 1
return 0
def make_supplier_gl_entry(self, gl_entries):
# Checked both rounding_adjustment and rounded_total
# because rounded_total had value even before introcution of posting GLE based on rounded total
@@ -436,15 +444,23 @@ class PurchaseInvoice(BuyingController):
if self.update_stock and self.auto_accounting_for_stock:
warehouse_account = get_warehouse_account_map(self.company)
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
voucher_wise_stock_value = {}
if self.update_stock:
for d in frappe.get_all('Stock Ledger Entry',
fields = ["voucher_detail_no", "stock_value_difference"], filters={'voucher_no': self.name}):
voucher_wise_stock_value.setdefault(d.voucher_detail_no, d.stock_value_difference)
valuation_tax_accounts = [d.account_head for d in self.get("taxes")
if d.category in ('Valuation', 'Total and Valuation')
and flt(d.base_tax_amount_after_discount_amount)]
for item in self.get("items"):
if flt(item.base_net_amount):
account_currency = get_account_currency(item.expense_account)
if item.item_code:
asset_category = frappe.get_cached_value("Item", item.item_code, "asset_category")
if self.update_stock and self.auto_accounting_for_stock and item.item_code in stock_items:
# warehouse account
@@ -463,15 +479,16 @@ class PurchaseInvoice(BuyingController):
)
# Amount added through landed-cost-voucher
if flt(item.landed_cost_voucher_amount):
gl_entries.append(self.get_gl_dict({
"account": expenses_included_in_valuation,
"against": item.expense_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(item.landed_cost_voucher_amount),
"project": item.project
}, item=item))
if landed_cost_entries:
for account, amount in iteritems(landed_cost_entries[(item.item_code, item.name)]):
gl_entries.append(self.get_gl_dict({
"account": account,
"against": item.expense_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(amount),
"project": item.project
}, item=item))
# sub-contracting warehouse
if flt(item.rm_supp_cost):
@@ -486,31 +503,61 @@ class PurchaseInvoice(BuyingController):
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(item.rm_supp_cost)
}, warehouse_account[self.supplier_warehouse]["account_currency"], item=item))
elif not item.is_fixed_asset or (item.is_fixed_asset and is_cwip_accounting_disabled()):
elif not item.is_fixed_asset or (item.is_fixed_asset and not is_cwip_accounting_enabled(asset_category)):
expense_account = (item.expense_account
if (not item.enable_deferred_expense or self.is_return) else item.deferred_expense_account)
gl_entries.append(
self.get_gl_dict({
if not item.is_fixed_asset:
amount = flt(item.base_net_amount, item.precision("base_net_amount"))
else:
amount = flt(item.base_net_amount + item.item_tax_amount, item.precision("base_net_amount"))
gl_entries.append(self.get_gl_dict({
"account": expense_account,
"against": self.supplier,
"debit": flt(item.base_net_amount, item.precision("base_net_amount")),
"debit_in_account_currency": (flt(item.base_net_amount,
item.precision("base_net_amount")) if account_currency==self.company_currency
else flt(item.net_amount, item.precision("net_amount"))),
"debit": amount,
"cost_center": item.cost_center,
"project": item.project
}, account_currency, item=item)
)
}, account_currency, item=item))
# If asset is bought through this document and not linked to PR
if self.update_stock and item.landed_cost_voucher_amount:
expenses_included_in_asset_valuation = self.get_company_default("expenses_included_in_asset_valuation")
# Amount added through landed-cost-voucher
gl_entries.append(self.get_gl_dict({
"account": expenses_included_in_asset_valuation,
"against": expense_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(item.landed_cost_voucher_amount),
"project": item.project
}, item=item))
gl_entries.append(self.get_gl_dict({
"account": expense_account,
"against": expenses_included_in_asset_valuation,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": flt(item.landed_cost_voucher_amount),
"project": item.project
}, item=item))
# update gross amount of asset bought through this document
assets = frappe.db.get_all('Asset',
filters={ 'purchase_invoice': self.name, 'item_code': item.item_code }
)
for asset in assets:
frappe.db.set_value("Asset", asset.name, "gross_purchase_amount", flt(item.valuation_rate))
frappe.db.set_value("Asset", asset.name, "purchase_receipt_amount", flt(item.valuation_rate))
if self.auto_accounting_for_stock and self.is_opening == "No" and \
item.item_code in stock_items and item.item_tax_amount:
# Post reverse entry for Stock-Received-But-Not-Billed if it is booked in Purchase Receipt
if item.purchase_receipt:
if item.purchase_receipt and valuation_tax_accounts:
negative_expense_booked_in_pr = frappe.db.sql("""select name from `tabGL Entry`
where voucher_type='Purchase Receipt' and voucher_no=%s and account=%s""",
(item.purchase_receipt, self.expenses_included_in_valuation))
where voucher_type='Purchase Receipt' and voucher_no=%s and account in %s""",
(item.purchase_receipt, valuation_tax_accounts))
if not negative_expense_booked_in_pr:
gl_entries.append(
@@ -527,27 +574,27 @@ class PurchaseInvoice(BuyingController):
item.precision("item_tax_amount"))
def get_asset_gl_entry(self, gl_entries):
arbnb_account = self.get_company_default("asset_received_but_not_billed")
eiiav_account = self.get_company_default("expenses_included_in_asset_valuation")
for item in self.get("items"):
if item.is_fixed_asset:
eiiav_account = self.get_company_default("expenses_included_in_asset_valuation")
asset_amount = flt(item.net_amount) + flt(item.item_tax_amount/self.conversion_rate)
base_asset_amount = flt(item.base_net_amount + item.item_tax_amount)
if (not item.expense_account or frappe.db.get_value('Account',
item.expense_account, 'account_type') not in ['Asset Received But Not Billed', 'Fixed Asset']):
arbnb_account = self.get_company_default("asset_received_but_not_billed")
item_exp_acc_type = frappe.db.get_value('Account', item.expense_account, 'account_type')
if (not item.expense_account or item_exp_acc_type not in ['Asset Received But Not Billed', 'Fixed Asset']):
item.expense_account = arbnb_account
if not self.update_stock:
asset_rbnb_currency = get_account_currency(item.expense_account)
arbnb_currency = get_account_currency(item.expense_account)
gl_entries.append(self.get_gl_dict({
"account": item.expense_account,
"against": self.supplier,
"remarks": self.get("remarks") or _("Accounting Entry for Asset"),
"debit": base_asset_amount,
"debit_in_account_currency": (base_asset_amount
if asset_rbnb_currency == self.company_currency else asset_amount),
if arbnb_currency == self.company_currency else asset_amount),
"cost_center": item.cost_center
}, item=item))
@@ -564,8 +611,7 @@ class PurchaseInvoice(BuyingController):
item.item_tax_amount / self.conversion_rate)
}, item=item))
else:
cwip_account = get_asset_account("capital_work_in_progress_account",
item.asset, company = self.company)
cwip_account = get_asset_account("capital_work_in_progress_account", company = self.company)
cwip_account_currency = get_account_currency(cwip_account)
gl_entries.append(self.get_gl_dict({
@@ -591,6 +637,36 @@ class PurchaseInvoice(BuyingController):
item.item_tax_amount / self.conversion_rate)
}, item=item))
# When update stock is checked
# Assets are bought through this document then it will be linked to this document
if self.update_stock:
if flt(item.landed_cost_voucher_amount):
gl_entries.append(self.get_gl_dict({
"account": eiiav_account,
"against": cwip_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(item.landed_cost_voucher_amount),
"project": item.project
}, item=item))
gl_entries.append(self.get_gl_dict({
"account": cwip_account,
"against": eiiav_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": flt(item.landed_cost_voucher_amount),
"project": item.project
}, item=item))
# update gross amount of assets bought through this document
assets = frappe.db.get_all('Asset',
filters={ 'purchase_invoice': self.name, 'item_code': item.item_code }
)
for asset in assets:
frappe.db.set_value("Asset", asset.name, "gross_purchase_amount", flt(item.valuation_rate))
frappe.db.set_value("Asset", asset.name, "purchase_receipt_amount", flt(item.valuation_rate))
return gl_entries
def make_stock_adjustment_entry(self, gl_entries, item, voucher_wise_stock_value, account_currency):
@@ -641,14 +717,14 @@ class PurchaseInvoice(BuyingController):
if account_currency==self.company_currency \
else tax.tax_amount_after_discount_amount,
"cost_center": tax.cost_center
}, account_currency)
}, account_currency, item=tax)
)
# accumulate valuation tax
if self.is_opening == "No" and tax.category in ("Valuation", "Valuation and Total") and flt(tax.base_tax_amount_after_discount_amount):
if self.auto_accounting_for_stock and not tax.cost_center:
frappe.throw(_("Cost Center is required in row {0} in Taxes table for type {1}").format(tax.idx, _(tax.category)))
valuation_tax.setdefault(tax.cost_center, 0)
valuation_tax[tax.cost_center] += \
valuation_tax.setdefault(tax.name, 0)
valuation_tax[tax.name] += \
(tax.add_deduct_tax == "Add" and 1 or -1) * flt(tax.base_tax_amount_after_discount_amount)
if self.is_opening == "No" and self.negative_expense_to_be_booked and valuation_tax:
@@ -658,36 +734,38 @@ class PurchaseInvoice(BuyingController):
total_valuation_amount = sum(valuation_tax.values())
amount_including_divisional_loss = self.negative_expense_to_be_booked
i = 1
for cost_center, amount in iteritems(valuation_tax):
if i == len(valuation_tax):
applicable_amount = amount_including_divisional_loss
else:
applicable_amount = self.negative_expense_to_be_booked * (amount / total_valuation_amount)
amount_including_divisional_loss -= applicable_amount
for tax in self.get("taxes"):
if valuation_tax.get(tax.name):
if i == len(valuation_tax):
applicable_amount = amount_including_divisional_loss
else:
applicable_amount = self.negative_expense_to_be_booked * (valuation_tax[tax.name] / total_valuation_amount)
amount_including_divisional_loss -= applicable_amount
gl_entries.append(
self.get_gl_dict({
"account": self.expenses_included_in_valuation,
"cost_center": cost_center,
"against": self.supplier,
"credit": applicable_amount,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
gl_entries.append(
self.get_gl_dict({
"account": tax.account_head,
"cost_center": tax.cost_center,
"against": self.supplier,
"credit": applicable_amount,
"remarks": self.remarks or _("Accounting Entry for Stock"),
}, item=tax)
)
i += 1
i += 1
if self.auto_accounting_for_stock and self.update_stock and valuation_tax:
for cost_center, amount in iteritems(valuation_tax):
gl_entries.append(
self.get_gl_dict({
"account": self.expenses_included_in_valuation,
"cost_center": cost_center,
"against": self.supplier,
"credit": amount,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
for tax in self.get("taxes"):
if valuation_tax.get(tax.name):
gl_entries.append(
self.get_gl_dict({
"account": tax.account_head,
"cost_center": tax.cost_center,
"against": self.supplier,
"credit": valuation_tax[tax.name],
"remarks": self.remarks or "Accounting Entry for Stock"
}, item=tax)
)
def make_payment_gl_entries(self, gl_entries):
# Make Cash GL Entries
@@ -752,7 +830,11 @@ class PurchaseInvoice(BuyingController):
)
def make_gle_for_rounding_adjustment(self, gl_entries):
if self.rounding_adjustment:
# if rounding adjustment in small and conversion rate is also small then
# base_rounding_adjustment may become zero due to small precision
# eg: rounding_adjustment = 0.01 and exchange rate = 0.05 and precision of base_rounding_adjustment is 2
# then base_rounding_adjustment becomes zero and error is thrown in GL Entry
if self.rounding_adjustment and self.base_rounding_adjustment:
round_off_account, round_off_cost_center = \
get_round_off_account_and_cost_center(self.company)
@@ -880,6 +962,17 @@ class PurchaseInvoice(BuyingController):
# calculate totals again after applying TDS
self.calculate_taxes_and_totals()
def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context)
list_context.update({
'show_sidebar': True,
'show_search': True,
'no_breadcrumbs': True,
'title': _('Purchase Invoices'),
})
return list_context
@frappe.whitelist()
def make_debit_note(source_name, target_doc=None):
from erpnext.controllers.sales_and_purchase_return import make_return_doc

View File

@@ -6,8 +6,8 @@ frappe.listview_settings['Purchase Invoice'] = {
add_fields: ["supplier", "supplier_name", "base_grand_total", "outstanding_amount", "due_date", "company",
"currency", "is_return", "release_date", "on_hold"],
get_indicator: function(doc) {
if(flt(doc.outstanding_amount) < 0 && doc.docstatus == 1) {
return [__("Debit Note Issued"), "darkgrey", "outstanding_amount,<,0"]
if( (flt(doc.outstanding_amount) <= 0) && doc.docstatus == 1 && doc.status == 'Debit Note Issued') {
return [__("Debit Note Issued"), "darkgrey", "outstanding_amount,<=,0"];
} else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) {
if(cint(doc.on_hold) && !doc.release_date) {
return [__("On Hold"), "darkgrey"];

View File

@@ -10,7 +10,7 @@ from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_ent
from frappe.utils import cint, flt, today, nowdate, add_days
import frappe.defaults
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory, \
test_records as pr_test_records
test_records as pr_test_records, make_purchase_receipt, get_taxes
from erpnext.controllers.accounts_controller import get_payment_terms
from erpnext.exceptions import InvalidCurrency
from erpnext.stock.doctype.stock_entry.test_stock_entry import get_qty_after_transaction
@@ -57,16 +57,11 @@ class TestPurchaseInvoice(unittest.TestCase):
self.assertEqual([d.debit, d.credit], expected_gl_entries.get(d.account))
def test_gl_entries_with_perpetual_inventory(self):
pi = frappe.copy_doc(test_records[1])
set_perpetual_inventory(1, pi.company)
pi = make_purchase_invoice(company="_Test Company with perpetual inventory", supplier_warehouse="Work In Progress - TCP1", warehouse= "Stores - TCP1", cost_center = "Main - TCP1", expense_account ="_Test Account Cost for Goods Sold - TCP1", get_taxes_and_charges=True, qty=10)
self.assertTrue(cint(erpnext.is_perpetual_inventory_enabled(pi.company)), 1)
pi.insert()
pi.submit()
self.check_gle_for_pi(pi.name)
set_perpetual_inventory(0, pi.company)
def test_terms_added_after_save(self):
pi = frappe.copy_doc(test_records[1])
pi.insert()
@@ -196,32 +191,33 @@ class TestPurchaseInvoice(unittest.TestCase):
self.assertEqual(pi.on_hold, 0)
def test_gl_entries_with_perpetual_inventory_against_pr(self):
pr = frappe.copy_doc(pr_test_records[0])
set_perpetual_inventory(1, pr.company)
self.assertTrue(cint(erpnext.is_perpetual_inventory_enabled(pr.company)), 1)
pr.submit()
pi = frappe.copy_doc(test_records[1])
for d in pi.get("items"):
pr = make_purchase_receipt(company="_Test Company with perpetual inventory", supplier_warehouse="Work In Progress - TCP1", warehouse= "Stores - TCP1", cost_center = "Main - TCP1", get_taxes_and_charges=True,)
self.assertTrue(cint(erpnext.is_perpetual_inventory_enabled(pr.company)), 1)
pi = make_purchase_invoice(company="_Test Company with perpetual inventory", supplier_warehouse="Work In Progress - TCP1", warehouse= "Stores - TCP1", cost_center = "Main - TCP1", expense_account ="_Test Account Cost for Goods Sold - TCP1", get_taxes_and_charges=True, qty=10,do_not_save= "True")
for d in pi.items:
d.purchase_receipt = pr.name
pi.insert()
pi.submit()
self.check_gle_for_pi(pi.name)
set_perpetual_inventory(0, pr.company)
def check_gle_for_pi(self, pi):
gl_entries = frappe.db.sql("""select account, debit, credit
gl_entries = frappe.db.sql("""select account, sum(debit) as debit, sum(credit) as credit
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
order by account asc""", pi, as_dict=1)
group by account""", pi, as_dict=1)
self.assertTrue(gl_entries)
expected_values = dict((d[0], d) for d in [
["_Test Payable - _TC", 0, 720],
["Stock Received But Not Billed - _TC", 500.0, 0],
["_Test Account Shipping Charges - _TC", 100.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
["Creditors - TCP1", 0, 720],
["Stock Received But Not Billed - TCP1", 500.0, 0],
["_Test Account Shipping Charges - TCP1", 100.0, 0.0],
["_Test Account VAT - TCP1", 120.0, 0]
])
for i, gle in enumerate(gl_entries):
@@ -524,10 +520,9 @@ class TestPurchaseInvoice(unittest.TestCase):
self.assertFalse(gle)
def test_purchase_invoice_update_stock_gl_entry_with_perpetual_inventory(self):
set_perpetual_inventory()
pi = make_purchase_invoice(update_stock=1, posting_date=frappe.utils.nowdate(),
posting_time=frappe.utils.nowtime())
posting_time=frappe.utils.nowtime(), cash_bank_account="Cash - TCP1", company="_Test Company with perpetual inventory", supplier_warehouse="Work In Progress - TCP1", warehouse= "Stores - TCP1", cost_center = "Main - TCP1", expense_account ="_Test Account Cost for Goods Sold - TCP1")
gl_entries = frappe.db.sql("""select account, account_currency, debit, credit,
debit_in_account_currency, credit_in_account_currency
@@ -548,9 +543,9 @@ class TestPurchaseInvoice(unittest.TestCase):
self.assertEqual(expected_gl_entries[gle.account][2], gle.credit)
def test_purchase_invoice_for_is_paid_and_update_stock_gl_entry_with_perpetual_inventory(self):
set_perpetual_inventory()
pi = make_purchase_invoice(update_stock=1, posting_date=frappe.utils.nowdate(),
posting_time=frappe.utils.nowtime(), cash_bank_account="Cash - _TC", is_paid=1)
posting_time=frappe.utils.nowtime(), cash_bank_account="Cash - TCP1", is_paid=1, company="_Test Company with perpetual inventory", supplier_warehouse="Work In Progress - TCP1", warehouse= "Stores - TCP1", cost_center = "Main - TCP1", expense_account ="_Test Account Cost for Goods Sold - TCP1")
gl_entries = frappe.db.sql("""select account, account_currency, sum(debit) as debit,
sum(credit) as credit, debit_in_account_currency, credit_in_account_currency
@@ -563,7 +558,7 @@ class TestPurchaseInvoice(unittest.TestCase):
expected_gl_entries = dict((d[0], d) for d in [
[pi.credit_to, 250.0, 250.0],
[stock_in_hand_account, 250.0, 0.0],
["Cash - _TC", 0.0, 250.0]
["Cash - TCP1", 0.0, 250.0]
])
for i, gle in enumerate(gl_entries):
@@ -630,6 +625,7 @@ class TestPurchaseInvoice(unittest.TestCase):
self.assertEqual(pi.get("items")[0].rm_supp_cost, flt(rm_supp_cost, 2))
def test_rejected_serial_no(self):
set_perpetual_inventory(0)
pi = make_purchase_invoice(item_code="_Test Serialized Item With Series", received_qty=2, qty=1,
rejected_qty=1, rate=500, update_stock=1,
rejected_warehouse = "_Test Rejected Warehouse - _TC")
@@ -881,7 +877,7 @@ def make_purchase_invoice(**args):
pi.is_return = args.is_return
pi.return_against = args.return_against
pi.is_subcontracted = args.is_subcontracted or "No"
pi.supplier_warehouse = "_Test Warehouse 1 - _TC"
pi.supplier_warehouse = args.supplier_warehouse or "_Test Warehouse 1 - _TC"
pi.append("items", {
"item_code": args.item or args.item_code or "_Test Item",
@@ -890,14 +886,21 @@ def make_purchase_invoice(**args):
"received_qty": args.received_qty or 0,
"rejected_qty": args.rejected_qty or 0,
"rate": args.rate or 50,
'expense_account': args.expense_account or '_Test Account Cost for Goods Sold - _TC',
"conversion_factor": 1.0,
"serial_no": args.serial_no,
"stock_uom": "_Test UOM",
"cost_center": "_Test Cost Center - _TC",
"cost_center": args.cost_center or "_Test Cost Center - _TC",
"project": args.project,
"rejected_warehouse": args.rejected_warehouse or "",
"rejected_serial_no": args.rejected_serial_no or ""
})
if args.get_taxes_and_charges:
taxes = get_taxes()
for tax in taxes:
pi.append("taxes", tax)
if not args.do_not_save:
pi.insert()
if not args.do_not_submit:

View File

@@ -71,8 +71,8 @@
"expense_account",
"col_break5",
"is_fixed_asset",
"asset",
"asset_location",
"asset_category",
"deferred_expense_section",
"deferred_expense_account",
"service_stop_date",
@@ -116,6 +116,8 @@
"fieldtype": "Column Break"
},
{
"fetch_from": "item_code.item_name",
"fetch_if_empty": 1,
"fieldname": "item_name",
"fieldtype": "Data",
"in_global_search": 1,
@@ -414,6 +416,7 @@
"print_hide": 1
},
{
"depends_on": "eval:!doc.is_fixed_asset",
"fieldname": "batch_no",
"fieldtype": "Link",
"label": "Batch No",
@@ -425,12 +428,14 @@
"fieldtype": "Column Break"
},
{
"depends_on": "eval:!doc.is_fixed_asset",
"fieldname": "serial_no",
"fieldtype": "Text",
"label": "Serial No",
"no_copy": 1
},
{
"depends_on": "eval:!doc.is_fixed_asset",
"fieldname": "rejected_serial_no",
"fieldtype": "Text",
"label": "Rejected Serial No",
@@ -591,7 +596,6 @@
"oldfieldname": "purchase_order",
"oldfieldtype": "Link",
"options": "Purchase Order",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
@@ -607,6 +611,7 @@
"fieldname": "include_exploded_items",
"fieldtype": "Check",
"label": "Include Exploded Items",
"print_hide": 1,
"read_only": 1
},
{
@@ -615,6 +620,7 @@
},
{
"default": "0",
"fetch_from": "item_code.is_fixed_asset",
"fieldname": "is_fixed_asset",
"fieldtype": "Check",
"hidden": 1,
@@ -623,14 +629,6 @@
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "is_fixed_asset",
"fieldname": "asset",
"fieldtype": "Link",
"label": "Asset",
"no_copy": 1,
"options": "Asset"
},
{
"depends_on": "is_fixed_asset",
"fieldname": "asset_location",
@@ -676,7 +674,7 @@
"fieldname": "pr_detail",
"fieldtype": "Data",
"hidden": 1,
"label": "PR Detail",
"label": "Purchase Receipt Detail",
"no_copy": 1,
"oldfieldname": "pr_detail",
"oldfieldtype": "Data",
@@ -754,11 +752,21 @@
"fieldtype": "Data",
"label": "Manufacturer Part Number",
"read_only": 1
},
{
"depends_on": "is_fixed_asset",
"fetch_from": "item_code.asset_category",
"fieldname": "asset_category",
"fieldtype": "Data",
"in_preview": 1,
"label": "Asset Category",
"options": "Asset Category",
"read_only": 1
}
],
"idx": 1,
"istable": 1,
"modified": "2019-06-02 06:36:17.078419",
"modified": "2019-11-21 16:27:52.043744",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@@ -41,6 +41,8 @@ def get_pos_data():
items_list = get_items_list(pos_profile, doc.company)
customers = get_customers_list(pos_profile)
doc.plc_conversion_rate = update_plc_conversion_rate(doc, pos_profile)
return {
'doc': doc,
'default_customer': pos_profile.get('customer'),
@@ -53,7 +55,7 @@ def get_pos_data():
'batch_no_data': get_batch_no_data(),
'barcode_data': get_barcode_data(items_list),
'tax_data': get_item_tax_data(),
'price_list_data': get_price_list_data(doc.selling_price_list),
'price_list_data': get_price_list_data(doc.selling_price_list, doc.plc_conversion_rate),
'customer_wise_price_list': get_customer_wise_price_list(),
'bin_data': get_bin_data(pos_profile),
'pricing_rules': get_pricing_rule_data(doc),
@@ -62,6 +64,15 @@ def get_pos_data():
'meta': get_meta()
}
def update_plc_conversion_rate(doc, pos_profile):
conversion_rate = 1.0
price_list_currency = frappe.get_cached_value("Price List", doc.selling_price_list, "currency")
if pos_profile.get("currency") != price_list_currency:
conversion_rate = get_exchange_rate(price_list_currency,
pos_profile.get("currency"), nowdate(), args="for_selling") or 1.0
return conversion_rate
def get_meta():
doctype_meta = {
@@ -228,7 +239,7 @@ def get_contacts(customers):
for data in customers:
contact = frappe.db.sql(""" select email_id, phone, mobile_no from `tabContact`
where is_primary_contact =1 and name in
where is_primary_contact=1 and name in
(select parent from `tabDynamic Link` where link_doctype = 'Customer' and link_name = %s
and parenttype = 'Contact')""", data.name, as_dict=1)
if contact:
@@ -307,7 +318,7 @@ def get_item_tax_data():
# example: {'Consulting Services': {'Excise 12 - TS': '12.000'}}
itemwise_tax = {}
taxes = frappe.db.sql(""" select parent, tax_type, tax_rate from `tabItem Tax`""", as_dict=1)
taxes = frappe.db.sql(""" select parent, tax_type, tax_rate from `tabItem Tax Template Detail`""", as_dict=1)
for tax in taxes:
if tax.parent not in itemwise_tax:
@@ -317,14 +328,14 @@ def get_item_tax_data():
return itemwise_tax
def get_price_list_data(selling_price_list):
def get_price_list_data(selling_price_list, conversion_rate):
itemwise_price_list = {}
price_lists = frappe.db.sql("""Select ifnull(price_list_rate, 0) as price_list_rate,
item_code from `tabItem Price` ip where price_list = %(price_list)s""",
{'price_list': selling_price_list}, as_dict=1)
for item in price_lists:
itemwise_price_list[item.item_code] = item.price_list_rate
itemwise_price_list[item.item_code] = item.price_list_rate * conversion_rate
return itemwise_price_list
@@ -391,14 +402,21 @@ def make_invoice(doc_list={}, email_queue_list={}, customers_list={}):
for docs in doc_list:
for name, doc in iteritems(docs):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
validate_records(doc)
si_doc = frappe.new_doc('Sales Invoice')
si_doc.offline_pos_name = name
si_doc.update(doc)
si_doc.set_posting_time = 1
si_doc.customer = get_customer_id(doc)
si_doc.due_date = doc.get('posting_date')
name_list = submit_invoice(si_doc, name, doc, name_list)
if isinstance(doc, dict):
validate_records(doc)
si_doc = frappe.new_doc('Sales Invoice')
si_doc.offline_pos_name = name
si_doc.update(doc)
si_doc.set_posting_time = 1
si_doc.customer = get_customer_id(doc)
si_doc.due_date = doc.get('posting_date')
name_list = submit_invoice(si_doc, name, doc, name_list)
else:
doc.due_date = doc.get('posting_date')
doc.customer = get_customer_id(doc)
doc.set_posting_time = 1
doc.offline_pos_name = name
name_list = submit_invoice(doc, name, doc, name_list)
else:
name_list.append(name)
@@ -432,7 +450,6 @@ def get_customer_id(doc, customer=None):
return cust_id
def make_customer_and_address(customers):
customers_list = []
for customer, data in iteritems(customers):
@@ -449,7 +466,6 @@ def make_customer_and_address(customers):
frappe.db.commit()
return customers_list
def add_customer(data):
customer = data.get('full_name') or data.get('customer')
if frappe.db.exists("Customer", customer.strip()):
@@ -466,21 +482,18 @@ def add_customer(data):
frappe.db.commit()
return customer_doc.name
def get_territory(data):
if data.get('territory'):
return data.get('territory')
return frappe.db.get_single_value('Selling Settings','territory') or _('All Territories')
def get_customer_group(data):
if data.get('customer_group'):
return data.get('customer_group')
return frappe.db.get_single_value('Selling Settings', 'customer_group') or frappe.db.get_value('Customer Group', {'is_group': 0}, 'name')
def make_contact(args, customer):
if args.get('email_id') or args.get('phone'):
name = frappe.db.get_value('Dynamic Link',
@@ -506,7 +519,6 @@ def make_contact(args, customer):
doc.flags.ignore_mandatory = True
doc.save(ignore_permissions=True)
def make_address(args, customer):
if not args.get('address_line1'):
return
@@ -521,7 +533,10 @@ def make_address(args, customer):
address = frappe.get_doc('Address', name)
else:
address = frappe.new_doc('Address')
address.country = frappe.get_cached_value('Company', args.get('company'), 'country')
if args.get('company'):
address.country = frappe.get_cached_value('Company',
args.get('company'), 'country')
address.append('links', {
'link_doctype': 'Customer',
'link_name': customer
@@ -533,7 +548,6 @@ def make_address(args, customer):
address.flags.ignore_mandatory = True
address.save(ignore_permissions=True)
def make_email_queue(email_queue):
name_list = []
for key, data in iteritems(email_queue):
@@ -550,7 +564,6 @@ def make_email_queue(email_queue):
return name_list
def validate_item(doc):
for item in doc.get('items'):
if not frappe.db.exists('Item', item.get('item_code')):
@@ -569,7 +582,6 @@ def validate_item(doc):
item_doc.save(ignore_permissions=True)
frappe.db.commit()
def submit_invoice(si_doc, name, doc, name_list):
try:
si_doc.insert()
@@ -585,7 +597,6 @@ def submit_invoice(si_doc, name, doc, name_list):
return name_list
def save_invoice(doc, name, name_list):
try:
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):

View File

@@ -158,7 +158,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
cur_frm.meta._default_print_format = cur_frm.meta.default_print_format;
cur_frm.meta.default_print_format = cur_frm.pos_print_format;
}
} else if(cur_frm.doc.is_return) {
} else if(cur_frm.doc.is_return && !cur_frm.meta.default_print_format) {
if(cur_frm.return_print_format) {
cur_frm.meta._default_print_format = cur_frm.meta.default_print_format;
cur_frm.meta.default_print_format = cur_frm.return_print_format;

File diff suppressed because it is too large Load Diff

View File

@@ -136,6 +136,16 @@ class SalesInvoice(SellingController):
if self.redeem_loyalty_points and self.loyalty_program and self.loyalty_points:
validate_loyalty_points(self, self.loyalty_points)
def validate_fixed_asset(self):
for d in self.get("items"):
if d.is_fixed_asset and d.meta.get_field("asset") and d.asset:
asset = frappe.get_doc("Asset", d.asset)
if self.doctype == "Sales Invoice" and self.docstatus == 1:
if self.update_stock:
frappe.throw(_("'Update Stock' cannot be checked for fixed asset sale"))
elif asset.status in ("Scrapped", "Cancelled", "Sold"):
frappe.throw(_("Row #{0}: Asset {1} cannot be submitted, it is already {2}").format(d.idx, d.asset, asset.status))
def before_save(self):
set_account_for_mode_of_payment(self)
@@ -206,9 +216,9 @@ class SalesInvoice(SellingController):
total_amount_in_payments = 0
for payment in self.payments:
total_amount_in_payments += payment.amount
if total_amount_in_payments < self.rounded_total:
frappe.throw(_("Total payments amount can't be greater than {}".format(-self.rounded_total)))
invoice_total = self.rounded_total or self.grand_total
if total_amount_in_payments < invoice_total:
frappe.throw(_("Total payments amount can't be greater than {}".format(-invoice_total)))
def validate_pos_paid_amount(self):
if len(self.payments) == 0 and self.is_pos:
@@ -304,8 +314,10 @@ class SalesInvoice(SellingController):
from erpnext.selling.doctype.customer.customer import check_credit_limit
validate_against_credit_limit = False
bypass_credit_limit_check_at_sales_order = cint(frappe.get_cached_value("Customer", self.customer,
"bypass_credit_limit_check_at_sales_order"))
bypass_credit_limit_check_at_sales_order = frappe.db.get_value("Customer Credit Limit",
filters={'parent': self.customer, 'parenttype': 'Customer', 'company': self.company},
fieldname=["bypass_credit_limit_check"])
if bypass_credit_limit_check_at_sales_order:
validate_against_credit_limit = True
@@ -684,7 +696,6 @@ class SalesInvoice(SellingController):
def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
auto_accounting_for_stock = erpnext.is_perpetual_inventory_enabled(self.company)
if not gl_entries:
gl_entries = self.get_gl_entries()
@@ -696,7 +707,7 @@ class SalesInvoice(SellingController):
cint(self.redeem_loyalty_points)) else "Yes"
make_gl_entries(gl_entries, cancel=(self.docstatus == 2),
update_outstanding=update_outstanding, merge_entries=False)
update_outstanding=update_outstanding, merge_entries=False, from_repost=from_repost)
if update_outstanding == "No":
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
@@ -942,7 +953,7 @@ class SalesInvoice(SellingController):
)
def make_gle_for_rounding_adjustment(self, gl_entries):
if flt(self.rounding_adjustment, self.precision("rounding_adjustment")):
if flt(self.rounding_adjustment, self.precision("rounding_adjustment")) and self.base_rounding_adjustment:
round_off_account, round_off_cost_center = \
get_round_off_account_and_cost_center(self.company)
@@ -990,10 +1001,8 @@ class SalesInvoice(SellingController):
continue
for serial_no in item.serial_no.split("\n"):
if serial_no and frappe.db.exists('Serial No', serial_no):
sno = frappe.get_doc('Serial No', serial_no)
sno.sales_invoice = invoice
sno.db_update()
if serial_no and frappe.db.get_value('Serial No', serial_no, 'item_code') == item.item_code:
frappe.db.set_value('Serial No', serial_no, 'sales_invoice', invoice)
def validate_serial_numbers(self):
"""
@@ -1039,12 +1048,18 @@ class SalesInvoice(SellingController):
continue
for serial_no in item.serial_no.split("\n"):
sales_invoice = frappe.db.get_value("Serial No", serial_no, "sales_invoice")
if sales_invoice and self.name != sales_invoice:
sales_invoice_company = frappe.db.get_value("Sales Invoice", sales_invoice, "company")
serial_no_details = frappe.db.get_value("Serial No", serial_no,
["sales_invoice", "item_code"], as_dict=1)
if not serial_no_details:
continue
if serial_no_details.sales_invoice and serial_no_details.item_code == item.item_code \
and self.name != serial_no_details.sales_invoice:
sales_invoice_company = frappe.db.get_value("Sales Invoice", serial_no_details.sales_invoice, "company")
if sales_invoice_company == self.company:
frappe.throw(_("Serial Number: {0} is already referenced in Sales Invoice: {1}"
.format(serial_no, sales_invoice)))
.format(serial_no, serial_no_details.sales_invoice)))
def update_project(self):
if self.project:
@@ -1229,7 +1244,8 @@ class SalesInvoice(SellingController):
self.status = "Unpaid and Discounted"
elif flt(self.outstanding_amount) > 0 and getdate(self.due_date) >= getdate(nowdate()):
self.status = "Unpaid"
elif flt(self.outstanding_amount) < 0 and self.is_return==0 and frappe.db.get_value('Sales Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1}):
#Check if outstanding amount is 0 due to credit note issued against invoice
elif flt(self.outstanding_amount) <= 0 and self.is_return == 0 and frappe.db.get_value('Sales Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1}):
self.status = "Credit Note Issued"
elif self.is_return == 1:
self.status = "Return"
@@ -1510,4 +1526,4 @@ def create_invoice_discounting(source_name, target_doc=None):
"outstanding_amount": invoice.outstanding_amount
})
return invoice_discounting
return invoice_discounting

View File

@@ -68,8 +68,6 @@
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
@@ -276,7 +274,6 @@
"uom": "_Test UOM 1",
"conversion_factor": 1,
"stock_uom": "_Test UOM 1"
},
{
"cost_center": "_Test Cost Center - _TC",

View File

@@ -20,6 +20,9 @@ from erpnext.stock.doctype.item.test_item import create_item
from six import iteritems
from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_inter_company_transaction
from erpnext.regional.india.utils import get_ewb_data
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt
from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_invoice
class TestSalesInvoice(unittest.TestCase):
def make(self):
@@ -550,7 +553,6 @@ class TestSalesInvoice(unittest.TestCase):
si.get("taxes")[6].tax_amount = 2
si.insert()
print(si.name)
expected_values = [
{
@@ -679,56 +681,67 @@ class TestSalesInvoice(unittest.TestCase):
self.assertFalse(gle)
def test_pos_gl_entry_with_perpetual_inventory(self):
set_perpetual_inventory()
make_pos_profile()
self._insert_purchase_receipt()
pos = copy.deepcopy(test_records[1])
pos["is_pos"] = 1
pos["update_stock"] = 1
pos["payments"] = [{'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 300},
{'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 300}]
pr = make_purchase_receipt(company= "_Test Company with perpetual inventory",supplier_warehouse= "Work In Progress - TCP1", item_code= "_Test FG Item",warehouse= "Stores - TCP1",cost_center= "Main - TCP1")
pos = create_sales_invoice(company= "_Test Company with perpetual inventory", debit_to="Debtors - TCP1", item_code= "_Test FG Item", warehouse="Stores - TCP1", income_account = "Sales - TCP1", expense_account = "Cost of Goods Sold - TCP1", cost_center = "Main - TCP1", do_not_save=True)
pos.is_pos = 1
pos.update_stock = 1
pos.append("payments", {'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - TCP1', 'amount': 50})
pos.append("payments", {'mode_of_payment': 'Cash', 'account': 'Cash - TCP1', 'amount': 50})
taxes = get_taxes_and_charges()
pos.taxes = []
for tax in taxes:
pos.append("taxes", tax)
si = frappe.copy_doc(pos)
si.insert()
si.submit()
self.assertEqual(si.paid_amount, 100.0)
self.assertEqual(si.paid_amount, 600.0)
self.pos_gl_entry(si, pos, 300)
self.pos_gl_entry(si, pos, 50)
def test_pos_change_amount(self):
set_perpetual_inventory()
make_pos_profile()
self._insert_purchase_receipt()
pos = copy.deepcopy(test_records[1])
pos["is_pos"] = 1
pos["update_stock"] = 1
pos["payments"] = [{'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 300},
{'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 340}]
pr = make_purchase_receipt(company= "_Test Company with perpetual inventory",supplier_warehouse= "Work In Progress - TCP1", item_code= "_Test FG Item",warehouse= "Stores - TCP1",cost_center= "Main - TCP1")
si = frappe.copy_doc(pos)
si.change_amount = 5.0
si.insert()
si.submit()
pos = create_sales_invoice(company= "_Test Company with perpetual inventory", debit_to="Debtors - TCP1", item_code= "_Test FG Item", warehouse="Stores - TCP1", income_account = "Sales - TCP1", expense_account = "Cost of Goods Sold - TCP1", cost_center = "Main - TCP1", do_not_save=True)
self.assertEqual(si.grand_total, 630.0)
self.assertEqual(si.write_off_amount, -5)
pos.is_pos = 1
pos.update_stock = 1
pos.append("payments", {'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - TCP1', 'amount': 50})
pos.append("payments", {'mode_of_payment': 'Cash', 'account': 'Cash - TCP1', 'amount': 60})
pos.change_amount = 5.0
pos.insert()
pos.submit()
self.assertEqual(pos.grand_total, 100.0)
self.assertEqual(pos.write_off_amount, -5)
def test_make_pos_invoice(self):
from erpnext.accounts.doctype.sales_invoice.pos import make_invoice
set_perpetual_inventory()
make_pos_profile()
self._insert_purchase_receipt()
pr = make_purchase_receipt(company= "_Test Company with perpetual inventory",supplier_warehouse= "Work In Progress - TCP1", item_code= "_Test FG Item",warehouse= "Stores - TCP1",cost_center= "Main - TCP1")
pos = create_sales_invoice(company= "_Test Company with perpetual inventory", debit_to="Debtors - TCP1", item_code= "_Test FG Item", warehouse="Stores - TCP1", income_account = "Sales - TCP1", expense_account = "Cost of Goods Sold - TCP1", cost_center = "Main - TCP1", do_not_save=True)
pos = copy.deepcopy(test_records[1])
pos["is_pos"] = 1
pos["update_stock"] = 1
pos["payments"] = [{'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 300},
{'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 330}]
pos.is_pos = 1
pos.update_stock = 1
pos.append("payments", {'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - TCP1', 'amount': 50})
pos.append("payments", {'mode_of_payment': 'Cash', 'account': 'Cash - TCP1', 'amount': 50})
taxes = get_taxes_and_charges()
pos.taxes = []
for tax in taxes:
pos.append("taxes", tax)
invoice_data = [{'09052016142': pos}]
si = make_invoice(invoice_data).get('invoice')
@@ -736,16 +749,15 @@ class TestSalesInvoice(unittest.TestCase):
sales_invoice = frappe.get_all('Sales Invoice', fields =["*"], filters = {'offline_pos_name': '09052016142', 'docstatus': 1})
si = frappe.get_doc('Sales Invoice', sales_invoice[0].name)
self.assertEqual(si.grand_total, 630.0)
self.pos_gl_entry(si, pos, 330)
self.assertEqual(si.grand_total, 100)
self.pos_gl_entry(si, pos, 50)
def test_make_pos_invoice_in_draft(self):
from erpnext.accounts.doctype.sales_invoice.pos import make_invoice
from erpnext.stock.doctype.item.test_item import make_item
set_perpetual_inventory()
allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')
if allow_negative_stock:
frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 0)
@@ -789,7 +801,7 @@ class TestSalesInvoice(unittest.TestCase):
si.name, as_dict=1)[0]
self.assertTrue(sle)
self.assertEqual([sle.item_code, sle.warehouse, sle.actual_qty],
["_Test Item", "_Test Warehouse - _TC", -1.0])
['_Test FG Item', 'Stores - TCP1', -1.0])
# check gl entries
gl_entries = frappe.db.sql("""select account, debit, credit
@@ -797,19 +809,19 @@ class TestSalesInvoice(unittest.TestCase):
order by account asc, debit asc, credit asc""", si.name, as_dict=1)
self.assertTrue(gl_entries)
stock_in_hand = get_inventory_account('_Test Company')
stock_in_hand = get_inventory_account('_Test Company with perpetual inventory')
expected_gl_entries = sorted([
[si.debit_to, 630.0, 0.0],
[pos["items"][0]["income_account"], 0.0, 500.0],
[pos["taxes"][0]["account_head"], 0.0, 80.0],
[pos["taxes"][1]["account_head"], 0.0, 50.0],
[si.debit_to, 100.0, 0.0],
[pos.items[0].income_account, 0.0, 89.09],
['Round Off - TCP1', 0.0, 0.01],
[pos.taxes[0].account_head, 0.0, 10.69],
[pos.taxes[1].account_head, 0.0, 0.21],
[stock_in_hand, 0.0, abs(sle.stock_value_difference)],
[pos["items"][0]["expense_account"], abs(sle.stock_value_difference), 0.0],
[si.debit_to, 0.0, 300.0],
[pos.items[0].expense_account, abs(sle.stock_value_difference), 0.0],
[si.debit_to, 0.0, 50.0],
[si.debit_to, 0.0, cash_amount],
["_Test Bank - _TC", 300.0, 0.0],
["Cash - _TC", cash_amount, 0.0]
["_Test Bank - TCP1", 50, 0.0],
["Cash - TCP1", cash_amount, 0.0]
])
for i, gle in enumerate(sorted(gl_entries, key=lambda gle: gle.account)):
@@ -818,15 +830,14 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(expected_gl_entries[i][2], gle.credit)
si.cancel()
frappe.delete_doc('Sales Invoice', si.name)
gle = frappe.db.sql("""select * from `tabGL Entry`
where voucher_type='Sales Invoice' and voucher_no=%s""", si.name)
self.assertFalse(gle)
set_perpetual_inventory(0)
frappe.db.sql("delete from `tabPOS Profile`")
si.delete()
def test_pos_si_without_payment(self):
set_perpetual_inventory()
@@ -1009,7 +1020,6 @@ class TestSalesInvoice(unittest.TestCase):
"""
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item
from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note
from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_invoice
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
se = make_serialized_item()
@@ -1024,14 +1034,17 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(si.get("items")[0].serial_no, dn.get("items")[0].serial_no)
def test_return_sales_invoice(self):
set_perpetual_inventory()
make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC", qty=50, basic_rate=100)
make_stock_entry(item_code="_Test Item", target="Stores - TCP1", qty=50, basic_rate=100)
actual_qty_0 = get_qty_after_transaction()
actual_qty_0 = get_qty_after_transaction(item_code = "_Test Item", warehouse = "Stores - TCP1")
si = create_sales_invoice(qty=5, rate=500, update_stock=1)
si = create_sales_invoice(qty = 5, rate=500, update_stock=1, company= "_Test Company with perpetual inventory", debit_to="Debtors - TCP1", item_code= "_Test Item", warehouse="Stores - TCP1", income_account = "Sales - TCP1", expense_account = "Cost of Goods Sold - TCP1", cost_center = "Main - TCP1")
actual_qty_1 = get_qty_after_transaction(item_code = "_Test Item", warehouse = "Stores - TCP1")
frappe.db.commit()
actual_qty_1 = get_qty_after_transaction()
self.assertEqual(actual_qty_0 - 5, actual_qty_1)
# outgoing_rate
@@ -1039,10 +1052,9 @@ class TestSalesInvoice(unittest.TestCase):
"voucher_no": si.name}, "stock_value_difference") / 5
# return entry
si1 = create_sales_invoice(is_return=1, return_against=si.name, qty=-2, rate=500, update_stock=1)
actual_qty_2 = get_qty_after_transaction()
si1 = create_sales_invoice(is_return=1, return_against=si.name, qty=-2, rate=500, update_stock=1, company= "_Test Company with perpetual inventory", debit_to="Debtors - TCP1", item_code= "_Test Item", warehouse="Stores - TCP1", income_account = "Sales - TCP1", expense_account = "Cost of Goods Sold - TCP1", cost_center = "Main - TCP1")
actual_qty_2 = get_qty_after_transaction(item_code = "_Test Item", warehouse = "Stores - TCP1")
self.assertEqual(actual_qty_1 + 2, actual_qty_2)
incoming_rate, stock_value_difference = frappe.db.get_value("Stock Ledger Entry",
@@ -1050,7 +1062,7 @@ class TestSalesInvoice(unittest.TestCase):
["incoming_rate", "stock_value_difference"])
self.assertEqual(flt(incoming_rate, 3), abs(flt(outgoing_rate, 3)))
stock_in_hand_account = get_inventory_account('_Test Company', si1.items[0].warehouse)
stock_in_hand_account = get_inventory_account('_Test Company with perpetual inventory', si1.items[0].warehouse)
# Check gl entry
gle_warehouse_amount = frappe.db.get_value("GL Entry", {"voucher_type": "Sales Invoice",
@@ -1059,7 +1071,7 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(gle_warehouse_amount, stock_value_difference)
party_credited = frappe.db.get_value("GL Entry", {"voucher_type": "Sales Invoice",
"voucher_no": si1.name, "account": "Debtors - _TC", "party": "_Test Customer"}, "credit")
"voucher_no": si1.name, "account": "Debtors - TCP1", "party": "_Test Customer"}, "credit")
self.assertEqual(party_credited, 1000)
@@ -1067,7 +1079,6 @@ class TestSalesInvoice(unittest.TestCase):
self.assertFalse(si1.outstanding_amount)
self.assertEqual(frappe.db.get_value("Sales Invoice", si.name, "outstanding_amount"), 1500)
set_perpetual_inventory(0)
def test_discount_on_net_total(self):
si = frappe.copy_doc(test_records[2])
@@ -1525,6 +1536,8 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(si.total_taxes_and_charges, 577.05)
self.assertEqual(si.grand_total, 1827.05)
def test_create_invoice_without_terms(self):
si = create_sales_invoice(do_not_save=1)
self.assertFalse(si.get('payment_schedule'))
@@ -1931,4 +1944,29 @@ def get_outstanding_amount(against_voucher_type, against_voucher, account, party
if against_voucher_type == 'Purchase Invoice':
bal = bal * -1
return bal
return bal
def get_taxes_and_charges():
return [{
"account_head": "_Test Account Excise Duty - TCP1",
"charge_type": "On Net Total",
"cost_center": "Main - TCP1",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"idx": 1,
"included_in_print_rate": 1,
"parentfield": "taxes",
"rate": 12
},
{
"account_head": "_Test Account Education Cess - TCP1",
"charge_type": "On Previous Row Amount",
"cost_center": "Main - TCP1",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 2,
"included_in_print_rate": 1,
"parentfield": "taxes",
"rate": 2,
"row_id": 1
}]

View File

@@ -16,11 +16,13 @@ frappe.ui.form.on('Share Transfer', {
};
};
});
if (frm.doc.docstatus == 1) {
if (frm.doc.docstatus == 1 && frm.doc.equity_or_liability_account && frm.doc.asset_account) {
frm.add_custom_button(__('Create Journal Entry'), function () {
erpnext.share_transfer.make_jv(frm);
});
}
frm.toggle_reqd("asset_account", frm.doc.transfer_type != "Transfer");
},
no_of_shares: (frm) => {
if (frm.doc.rate != undefined || frm.doc.rate != null){
@@ -56,6 +58,10 @@ frappe.ui.form.on('Share Transfer', {
};
});
}
},
transfer_type: function(frm) {
frm.toggle_reqd("asset_account", frm.doc.transfer_type != "Transfer");
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -86,17 +86,23 @@ class ShareTransfer(Document):
frappe.throw(_('The field From Shareholder cannot be blank'))
if self.from_folio_no is None or self.from_folio_no is '':
self.to_folio_no = self.autoname_folio(self.to_shareholder)
if self.asset_account is None:
frappe.throw(_('The field Asset Account cannot be blank'))
elif (self.transfer_type == 'Issue'):
self.from_shareholder = ''
if self.to_shareholder is None or self.to_shareholder == '':
frappe.throw(_('The field To Shareholder cannot be blank'))
if self.to_folio_no is None or self.to_folio_no is '':
self.to_folio_no = self.autoname_folio(self.to_shareholder)
if self.asset_account is None:
frappe.throw(_('The field Asset Account cannot be blank'))
else:
if self.from_shareholder is None or self.to_shareholder is None:
frappe.throw(_('The fields From Shareholder and To Shareholder cannot be blank'))
if self.to_folio_no is None or self.to_folio_no is '':
self.to_folio_no = self.autoname_folio(self.to_shareholder)
if self.equity_or_liability_account is None:
frappe.throw(_('The field Equity/Liability Account cannot be blank'))
if self.from_shareholder == self.to_shareholder:
frappe.throw(_('The seller and the buyer cannot be the same'))
if self.no_of_shares != self.to_no - self.from_no + 1:

View File

@@ -15,67 +15,74 @@ class TestShareTransfer(unittest.TestCase):
frappe.db.sql("delete from `tabShare Balance`")
share_transfers = [
{
"doctype" : "Share Transfer",
"transfer_type" : "Issue",
"date" : "2018-01-01",
"to_shareholder" : "SH-00001",
"share_type" : "Equity",
"from_no" : 1,
"to_no" : 500,
"no_of_shares" : 500,
"rate" : 10,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Issue",
"date" : "2018-01-01",
"to_shareholder" : "SH-00001",
"share_type" : "Equity",
"from_no" : 1,
"to_no" : 500,
"no_of_shares" : 500,
"rate" : 10,
"company" : "_Test Company",
"asset_account" : "Cash - _TC",
"equity_or_liability_account": "Creditors - _TC"
},
{
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-02",
"from_shareholder" : "SH-00001",
"to_shareholder" : "SH-00002",
"share_type" : "Equity",
"from_no" : 101,
"to_no" : 200,
"no_of_shares" : 100,
"rate" : 15,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-02",
"from_shareholder" : "SH-00001",
"to_shareholder" : "SH-00002",
"share_type" : "Equity",
"from_no" : 101,
"to_no" : 200,
"no_of_shares" : 100,
"rate" : 15,
"company" : "_Test Company",
"equity_or_liability_account": "Creditors - _TC"
},
{
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-03",
"from_shareholder" : "SH-00001",
"to_shareholder" : "SH-00003",
"share_type" : "Equity",
"from_no" : 201,
"to_no" : 500,
"no_of_shares" : 300,
"rate" : 20,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-03",
"from_shareholder" : "SH-00001",
"to_shareholder" : "SH-00003",
"share_type" : "Equity",
"from_no" : 201,
"to_no" : 500,
"no_of_shares" : 300,
"rate" : 20,
"company" : "_Test Company",
"equity_or_liability_account": "Creditors - _TC"
},
{
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-04",
"from_shareholder" : "SH-00003",
"to_shareholder" : "SH-00002",
"share_type" : "Equity",
"from_no" : 201,
"to_no" : 400,
"no_of_shares" : 200,
"rate" : 15,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-04",
"from_shareholder" : "SH-00003",
"to_shareholder" : "SH-00002",
"share_type" : "Equity",
"from_no" : 201,
"to_no" : 400,
"no_of_shares" : 200,
"rate" : 15,
"company" : "_Test Company",
"equity_or_liability_account": "Creditors - _TC"
},
{
"doctype" : "Share Transfer",
"transfer_type" : "Purchase",
"date" : "2018-01-05",
"from_shareholder" : "SH-00003",
"share_type" : "Equity",
"from_no" : 401,
"to_no" : 500,
"no_of_shares" : 100,
"rate" : 25,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Purchase",
"date" : "2018-01-05",
"from_shareholder" : "SH-00003",
"share_type" : "Equity",
"from_no" : 401,
"to_no" : 500,
"no_of_shares" : 100,
"rate" : 25,
"company" : "_Test Company",
"asset_account" : "Cash - _TC",
"equity_or_liability_account": "Creditors - _TC"
}
]
for d in share_transfers:
@@ -84,30 +91,33 @@ class TestShareTransfer(unittest.TestCase):
def test_invalid_share_transfer(self):
doc = frappe.get_doc({
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-05",
"from_shareholder" : "SH-00003",
"to_shareholder" : "SH-00002",
"share_type" : "Equity",
"from_no" : 1,
"to_no" : 100,
"no_of_shares" : 100,
"rate" : 15,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Transfer",
"date" : "2018-01-05",
"from_shareholder" : "SH-00003",
"to_shareholder" : "SH-00002",
"share_type" : "Equity",
"from_no" : 1,
"to_no" : 100,
"no_of_shares" : 100,
"rate" : 15,
"company" : "_Test Company",
"equity_or_liability_account": "Creditors - _TC"
})
self.assertRaises(ShareDontExists, doc.insert)
doc = frappe.get_doc({
"doctype" : "Share Transfer",
"transfer_type" : "Purchase",
"date" : "2018-01-02",
"from_shareholder" : "SH-00001",
"share_type" : "Equity",
"from_no" : 1,
"to_no" : 200,
"no_of_shares" : 200,
"rate" : 15,
"company" : "_Test Company"
"doctype" : "Share Transfer",
"transfer_type" : "Purchase",
"date" : "2018-01-02",
"from_shareholder" : "SH-00001",
"share_type" : "Equity",
"from_no" : 1,
"to_no" : 200,
"no_of_shares" : 200,
"rate" : 15,
"company" : "_Test Company",
"asset_account" : "Cash - _TC",
"equity_or_liability_account": "Creditors - _TC"
})
self.assertRaises(ShareDontExists, doc.insert)

View File

@@ -14,13 +14,13 @@ class TestShippingRule(unittest.TestCase):
shipping_rule.name = test_records[0].get('name')
shipping_rule.get("conditions")[0].from_value = 101
self.assertRaises(FromGreaterThanToError, shipping_rule.insert)
def test_many_zero_to_values(self):
shipping_rule = frappe.copy_doc(test_records[0])
shipping_rule.name = test_records[0].get('name')
shipping_rule.get("conditions")[0].to_value = 0
self.assertRaises(ManyBlankToValuesError, shipping_rule.insert)
def test_overlapping_conditions(self):
for range_a, range_b in [
((50, 150), (0, 100)),
@@ -38,6 +38,10 @@ class TestShippingRule(unittest.TestCase):
self.assertRaises(OverlappingConditionError, shipping_rule.insert)
def create_shipping_rule(shipping_rule_type, shipping_rule_name):
if frappe.db.exists("Shipping Rule", shipping_rule_name):
return frappe.get_doc("Shipping Rule", shipping_rule_name)
sr = frappe.new_doc("Shipping Rule")
sr.account = "_Test Account Shipping Charges - _TC"
sr.calculate_based_on = "Net Total"
@@ -70,4 +74,4 @@ def create_shipping_rule(shipping_rule_type, shipping_rule_name):
})
sr.insert(ignore_permissions=True)
sr.submit()
return sr
return sr

View File

@@ -48,7 +48,6 @@ class TestTaxWithholdingCategory(unittest.TestCase):
#delete invoices to avoid clashing
for d in invoices:
d.cancel()
frappe.delete_doc("Purchase Invoice", d.name)
def test_single_threshold_tds(self):
invoices = []
@@ -83,7 +82,6 @@ class TestTaxWithholdingCategory(unittest.TestCase):
# delete invoices to avoid clashing
for d in invoices:
d.cancel()
frappe.delete_doc("Purchase Invoice", d.name)
def test_single_threshold_tds_with_previous_vouchers(self):
invoices = []
@@ -102,7 +100,6 @@ class TestTaxWithholdingCategory(unittest.TestCase):
# delete invoices to avoid clashing
for d in invoices:
d.cancel()
frappe.delete_doc("Purchase Invoice", d.name)
def create_purchase_invoice(**args):
# return sales invoice doc object

View File

@@ -3,8 +3,9 @@
from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import flt, cstr, cint
from frappe.utils import flt, cstr, cint, comma_and
from frappe import _
from erpnext.accounts.utils import get_stock_and_account_balance
from frappe.model.meta import get_field_precision
from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions
@@ -12,6 +13,7 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import g
class ClosedAccountingPeriod(frappe.ValidationError): pass
class StockAccountInvalidTransaction(frappe.ValidationError): pass
class StockValueAndAccountBalanceOutOfSync(frappe.ValidationError): pass
def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding='Yes', from_repost=False):
if gl_map:
@@ -115,11 +117,9 @@ def check_if_in_list(gle, gl_map, dimensions=None):
def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False):
if not from_repost:
validate_account_for_perpetual_inventory(gl_map)
validate_cwip_accounts(gl_map)
round_off_debit_credit(gl_map)
for entry in gl_map:
make_entry(entry, adv_adj, update_outstanding, from_repost)
@@ -127,6 +127,10 @@ def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False):
if not from_repost:
validate_expense_against_budget(entry)
if not from_repost:
validate_account_for_perpetual_inventory(gl_map)
def make_entry(args, adv_adj, update_outstanding, from_repost=False):
args.update({"doctype": "GL Entry"})
gle = frappe.get_doc(args)
@@ -137,25 +141,67 @@ def make_entry(args, adv_adj, update_outstanding, from_repost=False):
gle.submit()
def validate_account_for_perpetual_inventory(gl_map):
if cint(erpnext.is_perpetual_inventory_enabled(gl_map[0].company)) \
and gl_map[0].voucher_type=="Journal Entry":
aii_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount
where account_type = 'Stock' and is_group=0""")]
if cint(erpnext.is_perpetual_inventory_enabled(gl_map[0].company)):
account_list = [gl_entries.account for gl_entries in gl_map]
for entry in gl_map:
if entry.account in aii_accounts:
aii_accounts = [d.name for d in frappe.get_all("Account",
filters={'account_type': 'Stock', 'is_group': 0, 'company': gl_map[0].company})]
for account in account_list:
if account not in aii_accounts:
continue
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(account,
gl_map[0].posting_date, gl_map[0].company)
if gl_map[0].voucher_type=="Journal Entry":
# In case of Journal Entry, there are no corresponding SL entries,
# hence deducting currency amount
account_bal -= flt(gl_map[0].debit) - flt(gl_map[0].credit)
if account_bal == stock_bal:
frappe.throw(_("Account: {0} can only be updated via Stock Transactions")
.format(entry.account), StockAccountInvalidTransaction)
.format(account), StockAccountInvalidTransaction)
# This has been comment for a temporary, will add this code again on release of immutable ledger
# elif account_bal != stock_bal:
# precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"),
# currency=frappe.get_cached_value('Company', gl_map[0].company, "default_currency"))
# diff = flt(stock_bal - account_bal, precision)
# error_reason = _("Stock Value ({0}) and Account Balance ({1}) are out of sync for account {2} and it's linked warehouses.").format(
# stock_bal, account_bal, frappe.bold(account))
# error_resolution = _("Please create adjustment Journal Entry for amount {0} ").format(frappe.bold(diff))
# stock_adjustment_account = frappe.db.get_value("Company",gl_map[0].company,"stock_adjustment_account")
# db_or_cr_warehouse_account =('credit_in_account_currency' if diff < 0 else 'debit_in_account_currency')
# db_or_cr_stock_adjustment_account = ('debit_in_account_currency' if diff < 0 else 'credit_in_account_currency')
# journal_entry_args = {
# 'accounts':[
# {'account': account, db_or_cr_warehouse_account : abs(diff)},
# {'account': stock_adjustment_account, db_or_cr_stock_adjustment_account : abs(diff) }]
# }
# frappe.msgprint(msg="""{0}<br></br>{1}<br></br>""".format(error_reason, error_resolution),
# raise_exception=StockValueAndAccountBalanceOutOfSync,
# title=_('Values Out Of Sync'),
# primary_action={
# 'label': _('Make Journal Entry'),
# 'client_action': 'erpnext.route_to_adjustment_jv',
# 'args': journal_entry_args
# })
def validate_cwip_accounts(gl_map):
if not cint(frappe.db.get_value("Asset Settings", None, "disable_cwip_accounting")) \
and gl_map[0].voucher_type == "Journal Entry":
cwip_enabled = any([cint(ac.enable_cwip_accounting) for ac in frappe.db.get_all("Asset Category","enable_cwip_accounting")])
if cwip_enabled and gl_map[0].voucher_type == "Journal Entry":
cwip_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount
where account_type = 'Capital Work in Progress' and is_group=0""")]
for entry in gl_map:
if entry.account in cwip_accounts:
frappe.throw(_("Account: <b>{0}</b> is capital Work in progress and can not be updated by Journal Entry").format(entry.account))
frappe.throw(
_("Account: <b>{0}</b> is capital Work in progress and can not be updated by Journal Entry").format(entry.account))
def round_off_debit_credit(gl_map):
precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"),

View File

@@ -139,15 +139,11 @@ erpnext.accounts.bankTransactionUpload = class bankTransactionUpload {
}
make() {
const me = this;
frappe.upload.make({
args: {
method: 'erpnext.accounts.doctype.bank_transaction.bank_transaction_upload.upload_bank_statement',
allow_multiple: 0
},
no_socketio: true,
sample_url: "e.g. http://example.com/somefile.csv",
callback: function(attachment, r) {
const me = this;
new frappe.ui.FileUploader({
method: 'erpnext.accounts.doctype.bank_transaction.bank_transaction_upload.upload_bank_statement',
allow_multiple: 0,
on_success: function(attachment, r) {
if (!r.exc && r.message) {
me.data = r.message;
me.setup_transactions_dom();
@@ -533,9 +529,16 @@ erpnext.accounts.ReconciliationRow = class ReconciliationRow {
frappe.db.get_doc(dt, event.value)
.then(doc => {
let displayed_docs = []
let payment = []
if (dt === "Payment Entry") {
payment.currency = doc.payment_type == "Receive" ? doc.paid_to_account_currency : doc.paid_from_account_currency;
payment.doctype = dt
payment.posting_date = doc.posting_date;
payment.party = doc.party;
payment.reference_no = doc.reference_no;
payment.reference_date = doc.reference_date;
payment.paid_amount = doc.paid_amount;
payment.name = doc.name;
displayed_docs.push(payment);
} else if (dt === "Journal Entry") {
doc.accounts.forEach(payment => {
@@ -568,11 +571,11 @@ erpnext.accounts.ReconciliationRow = class ReconciliationRow {
const details_wrapper = me.dialog.fields_dict.payment_details.$wrapper;
details_wrapper.append(frappe.render_template("linked_payment_header"));
displayed_docs.forEach(values => {
details_wrapper.append(frappe.render_template("linked_payment_row", values));
displayed_docs.forEach(payment => {
details_wrapper.append(frappe.render_template("linked_payment_row", payment));
})
})
}
}
}
}

View File

@@ -816,8 +816,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
contact = me.contacts[data.name];
if(reg.test(data.name.toLowerCase())
|| reg.test(data.customer_name.toLowerCase())
|| (contact && reg.test(contact["mobile_no"]))
|| (contact && reg.test(contact["phone"]))
|| (contact && reg.test(contact["mobile_no"]))
|| (data.customer_group && reg.test(data.customer_group.toLowerCase()))){
return data;
}
@@ -1121,7 +1121,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if (key) {
return $.grep(this.items_list, function (item) {
if (search_status) {
if (in_list(me.batch_no_data[item.item_code], me.search_item.$input.val())) {
if (me.batch_no_data[item.item_code] &&
in_list(me.batch_no_data[item.item_code], me.search_item.$input.val())) {
search_status = false;
return me.item_batch_no[item.item_code] = me.search_item.$input.val()
} else if (me.serial_no_data[item.item_code]
@@ -1129,7 +1130,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
search_status = false;
me.item_serial_no[item.item_code] = [me.search_item.$input.val(), me.serial_no_data[item.item_code][me.search_item.$input.val()]]
return true
} else if (in_list(me.barcode_data[item.item_code], me.search_item.$input.val())) {
} else if (me.barcode_data[item.item_code] &&
in_list(me.barcode_data[item.item_code], me.search_item.$input.val())) {
search_status = false;
return true;
} else if (reg.test(item.item_code.toLowerCase()) || (item.description && reg.test(item.description.toLowerCase())) ||
@@ -1625,7 +1627,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
setTimeout(function () {
w.print();
w.close();
}, 1000)
}, 1000);
},
submit_invoice: function () {
@@ -1682,6 +1684,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
$(this.wrapper).find('.pos-bill').css('pointer-events', pointer_events);
$(this.wrapper).find('.pos-items-section').css('pointer-events', pointer_events);
this.set_primary_action();
$(this.wrapper).find('#pos-item-disc').prop('disabled',
this.pos_profile_data.allow_user_to_edit_discount ? false : true);
$(this.wrapper).find('#pos-item-price').prop('disabled',
this.pos_profile_data.allow_user_to_edit_rate ? false : true);
},
create_invoice: function () {
@@ -1692,20 +1700,13 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if(this.si_docs) {
this.si_docs.forEach((row) => {
existing_pos_list.push(Object.keys(row));
existing_pos_list.push(Object.keys(row)[0]);
});
}
if (this.frm.doc.offline_pos_name
&& in_list(existing_pos_list, this.frm.doc.offline_pos_name)) {
&& in_list(existing_pos_list, cstr(this.frm.doc.offline_pos_name))) {
this.update_invoice()
//to retrieve and set the default payment
invoice_data[this.frm.doc.offline_pos_name] = this.frm.doc;
invoice_data[this.frm.doc.offline_pos_name].payments[0].amount = this.frm.doc.net_total
invoice_data[this.frm.doc.offline_pos_name].payments[0].base_amount = this.frm.doc.net_total
this.frm.doc.paid_amount = this.frm.doc.net_total
this.frm.doc.outstanding_amount = 0
} else if(!this.frm.doc.offline_pos_name) {
this.frm.doc.offline_pos_name = frappe.datetime.now_datetime();
this.frm.doc.posting_date = frappe.datetime.get_today();
@@ -1762,18 +1763,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.si_docs = this.get_submitted_invoice() || [];
this.email_queue_list = this.get_email_queue() || {};
this.customers_list = this.get_customers_details() || {};
if(this.customer_doc) {
this.freeze = this.customer_doc.display
}
freeze_screen = this.freeze_screen || false;
if ((this.si_docs.length || this.email_queue_list || this.customers_list) && !this.freeze) {
this.freeze = true;
if (this.si_docs.length || this.email_queue_list || this.customers_list) {
frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice",
freeze: freeze_screen,
freeze: true,
args: {
doc_list: me.si_docs,
email_queue_list: me.email_queue_list,
@@ -1906,7 +1900,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
serial_no = me.item_serial_no[key][0];
}
if (this.items[0].has_serial_no && serial_no == "") {
if (this.items && this.items[0].has_serial_no && serial_no == "") {
this.refresh();
frappe.throw(__(repl("Error: Serial no is mandatory for item %(item)s", {
'item': this.items[0].item_code

View File

@@ -292,8 +292,11 @@ def validate_party_accounts(doc):
party_account_currency = frappe.db.get_value("Account", account.account, "account_currency", cache=True)
existing_gle_currency = get_party_gle_currency(doc.doctype, doc.name, account.company)
company_default_currency = frappe.get_cached_value('Company',
frappe.db.get_default("Company"), "default_currency")
if frappe.db.get_default("Company"):
company_default_currency = frappe.get_cached_value('Company',
frappe.db.get_default("Company"), "default_currency")
else:
company_default_currency = frappe.db.get_value('Company', account.company, "default_currency")
if existing_gle_currency and party_account_currency != existing_gle_currency:
frappe.throw(_("Accounting entries have already been made in currency {0} for company {1}. Please select a receivable or payable account with currency {0}.").format(existing_gle_currency, account.company))
@@ -365,7 +368,7 @@ def validate_due_date(posting_date, due_date, party_type, party, company=None, b
.format(formatdate(default_due_date)))
@frappe.whitelist()
def get_address_tax_category(tax_category, billing_address=None, shipping_address=None):
def get_address_tax_category(tax_category=None, billing_address=None, shipping_address=None):
addr_tax_category_from = frappe.db.get_single_value("Accounts Settings", "determine_address_tax_category_from")
if addr_tax_category_from == "Shipping Address":
if shipping_address:
@@ -469,7 +472,9 @@ def get_timeline_data(doctype, name):
# fetch and append data from Activity Log
data += frappe.db.sql("""select {fields}
from `tabActivity Log`
where reference_doctype={doctype} and reference_name={name}
where (reference_doctype="{doctype}" and reference_name="{name}")
or (timeline_doctype in ("{doctype}") and timeline_name="{name}")
or (reference_doctype in ("Quotation", "Opportunity") and timeline_name="{name}")
and status!='Success' and creation > {after}
{group_by} order by creation desc
""".format(doctype=frappe.db.escape(doctype), name=frappe.db.escape(name), fields=fields,
@@ -605,4 +610,4 @@ def get_partywise_advanced_payment_amount(party_type, posting_date = None):
.format(("credit") if party_type == "Customer" else "debit", cond) , party_type)
if data:
return frappe._dict(data)
return frappe._dict(data)

View File

@@ -1,22 +1,23 @@
{
"align_labels_right": 0,
"creation": "2016-05-05 17:16:18.564460",
"custom_format": 1,
"disabled": 0,
"doc_type": "Sales Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }} {{ offline_pos_name }}<br>\n</p>\n<p>\n\t<b>{{ __(\"Customer\") }}:</b> {{ customer }}<br>\n</p>\n\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, null,precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Qty Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ qty_total }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"line_breaks": 0,
"modified": "2018-03-21 09:10:16.693732",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Point of Sale",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Js",
"show_section_headings": 0,
"align_labels_right": 0,
"creation": "2016-05-05 17:16:18.564460",
"custom_format": 1,
"disabled": 0,
"doc_type": "Sales Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }} {{ offline_pos_name }}<br>\n</p>\n<p>\n\t<b>{{ __(\"Customer\") }}:</b> {{ customer }}<br>\n</p>\n\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, null,precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Qty Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ qty_total }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"line_breaks": 0,
"modified": "2019-09-05 17:20:30.726659",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Point of Sale",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "JS",
"raw_printing": 0,
"show_section_headings": 0,
"standard": "Yes"
}

View File

@@ -9,7 +9,7 @@
</div>
<div class="col-xs-{{ "3" if df.fieldtype=="Check" else "7" }} value">
{% if doc.get(df.fieldname) != None -%}
{{ frappe.utils.fmt_money((doc[df.fieldname])|int|abs, currency=doc.currency) }}
{{ frappe.utils.fmt_money((doc[df.fieldname])|abs, currency=doc.currency) }}
{% endif %}
</div>
</div>
@@ -26,7 +26,7 @@
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ charge.get_formatted("description") }}</label></div>
<div class="col-xs-7 text-right">
{{ frappe.utils.fmt_money((charge.tax_amount)|int|abs, currency=doc.currency) }}
{{ frappe.utils.fmt_money((charge.tax_amount)|abs, currency=doc.currency) }}
</div>
</div>
{%- endif -%}
@@ -65,8 +65,10 @@
{% for tdf in visible_columns %}
{% if not d.flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %}
<td class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
{% if tdf.fieldtype == 'Currency' %}
<div class="value">{{ frappe.utils.fmt_money((d[tdf.fieldname])|int|abs, currency=doc.currency) }}</div></td>
{% if tdf.fieldname == 'qty' %}
<div class="value">{{ (d[tdf.fieldname])|abs }}</div></td>
{% elif tdf.fieldtype == 'Currency' %}
<div class="value">{{ frappe.utils.fmt_money((d[tdf.fieldname])|abs, currency=doc.currency) }}</div></td>
{% else %}
<div class="value">{{ print_value(tdf, d, doc, visible_columns) }}</div></td>
{% endif %}
@@ -117,7 +119,7 @@
{{ render_currency(df, doc) }}
{% elif df.fieldtype =='Table' %}
{{ render_table(df, doc)}}
{% elif doc[df.fieldname] %}
{% elif doc[df.fieldname] and df.fieldname != 'total_qty' %}
{{ render_field(df, doc) }}
{% endif %}
{% endfor %}

View File

@@ -1,275 +1,269 @@
<style>
.print-format {
padding: 4mm;
font-size: 8.0pt !important;
}
.print-format td {
vertical-align:middle !important;
}
</style>
.print-format {
padding: 4mm;
font-size: 8.0pt !important;
}
.print-format td {
vertical-align:middle !important;
}
</style>
<h2 class="text-center" style="margin-top:0">{%= __(report.report_name) %}</h2>
<h4 class="text-center">
{% if (filters.customer_name) { %}
{%= filters.customer_name %}
{% } else { %}
{%= filters.customer || filters.supplier %}
{% } %}
</h4>
<h6 class="text-center">
{% if (filters.tax_id) { %}
{%= __("Tax Id: ")%} {%= filters.tax_id %}
<h2 class="text-center" style="margin-top:0">{%= __(report.report_name) %}</h2>
<h4 class="text-center">
{% if (filters.customer_name) { %}
{%= filters.customer_name %}
{% } else { %}
{%= filters.customer || filters.supplier %}
{% } %}
</h6>
<h5 class="text-center">
{%= __(filters.ageing_based_on) %}
{%= __("Until") %}
{%= frappe.datetime.str_to_user(filters.report_date) %}
</h5>
</h4>
<h6 class="text-center">
{% if (filters.tax_id) { %}
{%= __("Tax Id: ")%} {%= filters.tax_id %}
{% } %}
</h6>
<h5 class="text-center">
{%= __(filters.ageing_based_on) %}
{%= __("Until") %}
{%= frappe.datetime.str_to_user(filters.report_date) %}
</h5>
<div class="clearfix">
<div class="pull-left">
{% if(filters.payment_terms) { %}
<strong>{%= __("Payment Terms") %}:</strong> {%= filters.payment_terms %}
{% } %}
<div class="clearfix">
<div class="pull-left">
{% if(filters.payment_terms) { %}
<strong>{%= __("Payment Terms") %}:</strong> {%= filters.payment_terms %}
{% } %}
</div>
<div class="pull-right">
{% if(filters.credit_limit) { %}
<strong>{%= __("Credit Limit") %}:</strong> {%= format_currency(filters.credit_limit) %}
{% } %}
</div>
</div>
<div class="pull-right">
{% if(filters.credit_limit) { %}
<strong>{%= __("Credit Limit") %}:</strong> {%= format_currency(filters.credit_limit) %}
{% if(filters.show_future_payments) { %}
{% var balance_row = data.slice(-1).pop();
var range1 = report.columns[11].label;
var range2 = report.columns[12].label;
var range3 = report.columns[13].label;
var range4 = report.columns[14].label;
var range5 = report.columns[15].label;
%}
{% if(balance_row) { %}
<table class="table table-bordered table-condensed">
<caption class="text-right">(Amount in {%= data[0]["currency"] || "" %})</caption>
<colgroup>
<col style="width: 30mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
</colgroup>
<thead>
<tr>
<th>{%= __(" ") %}</th>
<th>{%= __(range1) %}</th>
<th>{%= __(range2) %}</th>
<th>{%= __(range3) %}</th>
<th>{%= __(range4) %}</th>
<th>{%= __(range5) %}</th>
<th>{%= __("Total") %}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{%= __("Total Outstanding") %}</td>
<td class="text-right">{%= format_number(balance_row["range1"], null, 2) %}</td>
<td class="text-right">{%= format_currency(balance_row["range2"]) %}</td>
<td class="text-right">{%= format_currency(balance_row["range3"]) %}</td>
<td class="text-right">{%= format_currency(balance_row["range4"]) %}</td>
<td class="text-right">{%= format_currency(balance_row["range5"]) %}</td>
<td class="text-right">
{%= format_currency(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) %}
</td>
</tr>
<td>{%= __("Future Payments") %}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="text-right">
{%= format_currency(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) %}
</td>
<tr class="cvs-footer">
<th class="text-left">{%= __("Cheques Required") %}</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th class="text-right">
{%= format_currency(flt(balance_row["outstanding"] - balance_row[("future_amount")]), data[data.length-1]["currency"]) %}</th>
</tr>
</tbody>
</table>
{% } %}
{% } %}
</div>
</div>
{% if(filters.show_pdc_in_print) { %}
{% var balance_row = data.slice(-1).pop();
var range1 = report.columns[11].label;
var range2 = report.columns[12].label;
var range3 = report.columns[13].label;
var range4 = report.columns[14].label;
var range5 = report.columns[15].label;
var range6 = report.columns[16].label;
%}
{% if(balance_row) { %}
<table class="table table-bordered table-condensed">
<caption class="text-right">(Amount in {%= data[0][__("currency")] || "" %})</caption>
<colgroup>
<col style="width: 30mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
<col style="width: 18mm;">
</colgroup>
<table class="table table-bordered">
<thead>
<tr>
<th>{%= __(" ") %}</th>
<th>{%= __(range1) %}</th>
<th>{%= __(range2) %}</th>
<th>{%= __(range3) %}</th>
<th>{%= __(range4) %}</th>
<th>{%= __(range5) %}</th>
<th>{%= __(range6) %}</th>
<th>{%= __("Total") %}</th>
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
<th style="width: 10%">{%= __("Date") %}</th>
<th style="width: 4%">{%= __("Age (Days)") %}</th>
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %}
<th style="width: 14%">{%= __("Reference") %}</th>
<th style="width: 10%">{%= __("Sales Person") %}</th>
{% } else { %}
<th style="width: 24%">{%= __("Reference") %}</th>
{% } %}
{% if(!filters.show_future_payments) { %}
<th style="width: 20%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
{% } %}
<th style="width: 10%; text-align: right">{%= __("Invoiced Amount") %}</th>
{% if(!filters.show_future_payments) { %}
<th style="width: 10%; text-align: right">{%= __("Paid Amount") %}</th>
<th style="width: 10%; text-align: right">{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}</th>
{% } %}
<th style="width: 10%; text-align: right">{%= __("Outstanding Amount") %}</th>
{% if(filters.show_future_payments) { %}
{% if(report.report_name === "Accounts Receivable") { %}
<th style="width: 12%">{%= __("Customer LPO No.") %}</th>
{% } %}
<th style="width: 10%">{%= __("Future Payment Ref") %}</th>
<th style="width: 10%">{%= __("Future Payment Amount") %}</th>
<th style="width: 10%">{%= __("Remaining Balance") %}</th>
{% } %}
{% } else { %}
<th style="width: 40%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
<th style="width: 15%">{%= __("Total Invoiced Amount") %}</th>
<th style="width: 15%">{%= __("Total Paid Amount") %}</th>
<th style="width: 15%">{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}</th>
<th style="width: 15%">{%= __("Total Outstanding Amount") %}</th>
{% } %}
</tr>
</thead>
<tbody>
<tr>
<td>{%= __("Total Outstanding") %}</td>
<td class="text-right">{%= format_number(balance_row[range1], null, 2) %}</td>
<td class="text-right">{%= format_currency(balance_row[range2]) %}</td>
<td class="text-right">{%= format_currency(balance_row[range3]) %}</td>
<td class="text-right">{%= format_currency(balance_row[range4]) %}</td>
<td class="text-right">{%= format_currency(balance_row[range5]) %}</td>
<td class="text-right">{%= format_currency(balance_row[range6]) %}</td>
<td class="text-right">
{%= format_currency(flt(balance_row[("outstanding_amount")]), data[data.length-1]["currency"]) %}
</td>
</tr>
<td>{%= __("PDC/LC") %}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="text-right">
{%= format_currency(flt(balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}
</td>
<tr class="cvs-footer">
<th class="text-left">{%= __("Cheques Required") %}</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th class="text-right">
{%= format_currency(flt(balance_row[("outstanding_amount")]-balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}</th>
</tr>
</tbody>
</table>
{% } %}
{% } %}
<table class="table table-bordered">
<thead>
<tr>
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
<th style="width: 10%">{%= __("Date") %}</th>
<th style="width: 4%">{%= __("Age (Days)") %}</th>
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person_in_print) { %}
<th style="width: 14%">{%= __("Reference") %}</th>
<th style="width: 10%">{%= __("Sales Person") %}</th>
{% } else { %}
<th style="width: 24%">{%= __("Reference") %}</th>
{% } %}
{% if(!filters.show_pdc_in_print) { %}
<th style="width: 20%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
{% } %}
<th style="width: 10%; text-align: right">{%= __("Invoiced Amount") %}</th>
{% if(!filters.show_pdc_in_print) { %}
<th style="width: 10%; text-align: right">{%= __("Paid Amount") %}</th>
<th style="width: 10%; text-align: right">{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}</th>
{% } %}
<th style="width: 10%; text-align: right">{%= __("Outstanding Amount") %}</th>
{% if(filters.show_pdc_in_print) { %}
{% if(report.report_name === "Accounts Receivable") { %}
<th style="width: 12%">{%= __("Customer LPO No.") %}</th>
{% } %}
<th style="width: 10%">{%= __("PDC/LC Ref") %}</th>
<th style="width: 10%">{%= __("PDC/LC Amount") %}</th>
<th style="width: 10%">{%= __("Remaining Balance") %}</th>
{% } %}
{% } else { %}
<th style="width: 40%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
<th style="width: 15%">{%= __("Total Invoiced Amount") %}</th>
<th style="width: 15%">{%= __("Total Paid Amount") %}</th>
<th style="width: 15%">{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}</th>
<th style="width: 15%">{%= __("Total Outstanding Amount") %}</th>
{% } %}
</tr>
</thead>
<tbody>
{% for(var i=0, l=data.length; i<l; i++) { %}
<tr>
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
<td>{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}</td>
<td style="text-align: right">{%= data[i][__("Age (Days)")] %}</td>
<td>
{% if(!filters.show_pdc_in_print) { %}
{%= data[i]["voucher_type"] %}
<br>
{% } %}
{%= data[i]["voucher_no"] %}
</td>
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person_in_print) { %}
<td>{%= data[i]["sales_person"] %}</td>
{% } %}
{% if(!filters.show_pdc_in_print) { %}
<td>
{% if(!(filters.customer || filters.supplier)) { %}
{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
{% if(data[i][__("Customer Name")] && data[i][__("Customer Name")] != data[i][__("Customer")]) { %}
<br> {%= data[i][__("Customer Name")] %}
{% } else if(data[i][__("Supplier Name")] != data[i][__("Supplier")]) { %}
<br> {%= data[i][__("Supplier Name")] %}
{% for(var i=0, l=data.length; i<l; i++) { %}
<tr>
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
{% if(data[i]["party"]) { %}
<td>{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}</td>
<td style="text-align: right">{%= data[i]["age"] %}</td>
<td>
{% if(!filters.show_future_payments) { %}
{%= data[i]["voucher_type"] %}
<br>
{% } %}
{%= data[i]["voucher_no"] %}
</td>
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %}
<td>{%= data[i]["sales_person"] %}</td>
{% } %}
<div>
{% if data[i][__("Remarks")] %}
{%= __("Remarks") %}:
{%= data[i][__("Remarks")] %}
{% } %}
</div>
</td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"]) %}</td>
{% if(!filters.show_pdc_in_print) { %}
<td style="text-align: right">
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
<td style="text-align: right">
{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %}</td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
{% if(filters.show_pdc_in_print) { %}
{% if(report.report_name === "Accounts Receivable") { %}
<td style="text-align: right">
{%= data[i]["po_no"] %}</td>
{% } %}
<td style="text-align: right">{%= data[i][("pdc/lc_ref")] %}</td>
<td style="text-align: right">{%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %}</td>
{% } %}
{% } else { %}
<td></td>
{% if(!filters.show_pdc_in_print) { %}
<td></td>
{% } %}
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person_in_print) { %}
<td></td>
{% } %}
<td></td>
<td style="text-align: right"><b>{%= __("Total") %}</b></td>
<td style="text-align: right">
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %}</td>
{% if(!filters.show_pdc_in_print) { %}
<td style="text-align: right">
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %} </td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
{% if(filters.show_pdc_in_print) { %}
{% if(report.report_name === "Accounts Receivable") { %}
<td style="text-align: right">
{%= data[i][__("Customer LPO")] %}</td>
{% } %}
<td style="text-align: right">{%= data[i][("pdc/lc_ref")] %}</td>
<td style="text-align: right">{%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %}</td>
{% } %}
{% } %}
{% } else { %}
{% if(data[i][__("Customer")] || data[i][__("Supplier")]|| "&nbsp;") { %}
{% if((data[i][__("Customer")] || data[i][__("Supplier")]) != __("'Total'")) { %}
{% if(!filters.show_future_payments) { %}
<td>
{% if(!(filters.customer || filters.supplier)) { %}
{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
{% if(data[i][__("Customer Name")] && data[i][__("Customer Name")] != data[i][__("Customer")]) { %}
<br> {%= data[i][__("Customer Name")] %}
{% } else if(data[i][__("Supplier Name")] != data[i][__("Supplier")]) { %}
<br> {%= data[i][__("Supplier Name")] %}
{%= data[i]["party"] %}
{% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %}
<br> {%= data[i]["customer_name"] %}
{% } else if(data[i]["supplier_name"] != data[i]["party"]) { %}
<br> {%= data[i]["supplier_name"] %}
{% } %}
{% } %}
<br>{%= __("Remarks") %}:
{%= data[i][__("Remarks")] %}
<div>
{% if data[i]["remarks"] %}
{%= __("Remarks") %}:
{%= data[i]["remarks"] %}
{% } %}
</div>
</td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}</td>
{% if(!filters.show_future_payments) { %}
<td style="text-align: right">
{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
<td style="text-align: right">
{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}</td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
{% if(filters.show_future_payments) { %}
{% if(report.report_name === "Accounts Receivable") { %}
<td style="text-align: right">
{%= data[i]["po_no"] %}</td>
{% } %}
<td style="text-align: right">{%= data[i]["future_ref"] %}</td>
<td style="text-align: right">{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}</td>
{% } %}
{% } else { %}
<td><b>{%= __("Total") %}</b></td>
<td></td>
{% if(!filters.show_future_payments) { %}
<td></td>
{% } %}
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %}
<td></td>
{% } %}
<td></td>
<td style="text-align: right"><b>{%= __("Total") %}</b></td>
<td style="text-align: right">
{%= format_currency(data[i]["invoiced"], data[i]["currency"] ) %}</td>
{% if(!filters.show_future_payments) { %}
<td style="text-align: right">
{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} </td>
{% } %}
<td style="text-align: right">
{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
{% if(filters.show_future_payments) { %}
{% if(report.report_name === "Accounts Receivable") { %}
<td style="text-align: right">
{%= data[i]["po_no"] %}</td>
{% } %}
<td style="text-align: right">{%= data[i]["future_ref"] %}</td>
<td style="text-align: right">{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}</td>
{% } %}
{% } %}
{% } else { %}
{% if(data[i]["party"]|| "&nbsp;") { %}
{% if((data[i]["party"]) != __("'Total'")) { %}
<td>
{% if(!(filters.customer || filters.supplier)) { %}
{%= data[i]["party"] %}
{% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %}
<br> {%= data[i]["customer_name"] %}
{% } else if(data[i]["supplier_name"] != data[i]["party"]) { %}
<br> {%= data[i]["supplier_name"] %}
{% } %}
{% } %}
<br>{%= __("Remarks") %}:
{%= data[i]["remarks"] %}
</td>
{% } else { %}
<td><b>{%= __("Total") %}</b></td>
{% } %}
<td style="text-align: right">{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
{% } %}
<td style="text-align: right">{%= format_currency(data[i][("total_invoiced_amt")], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][("total_paid_amt")], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= report.report_name === "Accounts Receivable Summary" ? format_currency(data[i][__("credit_note_amt")], data[i]["currency"]) : format_currency(data[i][__("debit_note_amt")], data[i]["currency"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][("total_outstanding_amt")], data[i]["currency"]) %}</td>
{% } %}
</tr>
{% } %}
</tr>
{% } %}
</tbody>
</table>
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
</tbody>
</table>
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>

View File

@@ -79,13 +79,20 @@ frappe.query_reports["Accounts Receivable"] = {
"options": "Customer",
on_change: () => {
var customer = frappe.query_report.get_filter_value('customer');
var company = frappe.query_report.get_filter_value('company');
if (customer) {
frappe.db.get_value('Customer', customer, ["tax_id", "customer_name", "credit_limit", "payment_terms"], function(value) {
frappe.db.get_value('Customer', customer, ["tax_id", "customer_name", "payment_terms"], function(value) {
frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
frappe.query_report.set_filter_value('customer_name', value["customer_name"]);
frappe.query_report.set_filter_value('credit_limit', value["credit_limit"]);
frappe.query_report.set_filter_value('payment_terms', value["payment_terms"]);
});
frappe.db.get_value('Customer Credit Limit', {'parent': customer, 'company': company},
["credit_limit"], function(value) {
if (value) {
frappe.query_report.set_filter_value('credit_limit', value["credit_limit"]);
}
}, "Customer");
} else {
frappe.query_report.set_filter_value('tax_id', "");
frappe.query_report.set_filter_value('customer_name', "");
@@ -130,13 +137,18 @@ frappe.query_reports["Accounts Receivable"] = {
"fieldtype": "Check",
},
{
"fieldname":"show_pdc_in_print",
"label": __("Show PDC in Print"),
"fieldname":"show_future_payments",
"label": __("Show Future Payments"),
"fieldtype": "Check",
},
{
"fieldname":"show_sales_person_in_print",
"label": __("Show Sales Person in Print"),
"fieldname":"show_delivery_notes",
"label": __("Show Delivery Notes"),
"fieldtype": "Check",
},
{
"fieldname":"show_sales_person",
"label": __("Show Sales Person"),
"fieldtype": "Check",
},
{

View File

@@ -14,33 +14,44 @@ class TestAccountsReceivable(unittest.TestCase):
filters = {
'company': '_Test Company 2',
'based_on_payment_terms': 1
'based_on_payment_terms': 1,
'report_date': today(),
'range1': 30,
'range2': 60,
'range3': 90,
'range4': 120
}
# check invoice grand total and invoiced column's value for 3 payment terms
name = make_sales_invoice()
report = execute(filters)
expected_data = [[100,30], [100,50], [100,20]]
expected_data = [[100, 30], [100, 50], [100, 20]]
self.assertEqual(expected_data[0], report[1][0][7:9])
self.assertEqual(expected_data[1], report[1][1][7:9])
self.assertEqual(expected_data[2], report[1][2][7:9])
for i in range(3):
row = report[1][i-1]
self.assertEqual(expected_data[i-1], [row.invoice_grand_total, row.invoiced])
# check invoice grand total, invoiced, paid and outstanding column's value after payment
make_payment(name)
report = execute(filters)
expected_data_after_payment = [[100,50], [100,20]]
expected_data_after_payment = [[100, 50, 10, 40], [100, 20, 0, 20]]
self.assertEqual(expected_data_after_payment[0], report[1][0][7:9])
self.assertEqual(expected_data_after_payment[1], report[1][1][7:9])
for i in range(2):
row = report[1][i-1]
self.assertEqual(expected_data_after_payment[i-1],
[row.invoice_grand_total, row.invoiced, row.paid, row.outstanding])
# check invoice grand total, invoiced, paid and outstanding column's value after credit note
make_credit_note(name)
report = execute(filters)
expected_data_after_credit_note = [[100,100,30,100,-30]]
self.assertEqual(expected_data_after_credit_note[0], report[1][0][7:12])
expected_data_after_credit_note = [100, 0, 0, 40, -40]
row = report[1][0]
self.assertEqual(expected_data_after_credit_note,
[row.invoice_grand_total, row.invoiced, row.paid, row.credit_note, row.outstanding])
def make_sales_invoice():
frappe.set_user("Administrator")
@@ -64,7 +75,7 @@ def make_sales_invoice():
return si.name
def make_payment(docname):
pe = get_payment_entry("Sales Invoice", docname, bank_account="Cash - _TC2", party_amount=30)
pe = get_payment_entry("Sales Invoice", docname, bank_account="Cash - _TC2", party_amount=40)
pe.paid_from = "Debtors - _TC2"
pe.insert()
pe.submit()

View File

@@ -4,235 +4,10 @@
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
from frappe.utils import flt
from frappe.utils import flt, cint
from erpnext.accounts.party import get_partywise_advanced_payment_amount
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
from six import iteritems
from six.moves import zip
class AccountsReceivableSummary(ReceivablePayableReport):
def run(self, args):
party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1])
return self.get_columns(party_naming_by, args), self.get_data(party_naming_by, args)
def get_columns(self, party_naming_by, args):
columns = [_(args.get("party_type")) + ":Link/" + args.get("party_type") + ":200"]
if party_naming_by == "Naming Series":
columns += [ args.get("party_type") + " Name::140"]
credit_debit_label = "Credit Note Amt" if args.get('party_type') == 'Customer' else "Debit Note Amt"
columns += [{
"label": _("Advance Amount"),
"fieldname": "advance_amount",
"fieldtype": "Currency",
"options": "currency",
"width": 100
},{
"label": _("Total Invoiced Amt"),
"fieldname": "total_invoiced_amt",
"fieldtype": "Currency",
"options": "currency",
"width": 100
},
{
"label": _("Total Paid Amt"),
"fieldname": "total_paid_amt",
"fieldtype": "Currency",
"options": "currency",
"width": 100
}]
columns += [
{
"label": _(credit_debit_label),
"fieldname": scrub(credit_debit_label),
"fieldtype": "Currency",
"options": "currency",
"width": 140
},
{
"label": _("Total Outstanding Amt"),
"fieldname": "total_outstanding_amt",
"fieldtype": "Currency",
"options": "currency",
"width": 160
},
{
"label": _("0-" + str(self.filters.range1)),
"fieldname": scrub("0-" + str(self.filters.range1)),
"fieldtype": "Currency",
"options": "currency",
"width": 160
},
{
"label": _(str(self.filters.range1) + "-" + str(self.filters.range2)),
"fieldname": scrub(str(self.filters.range1) + "-" + str(self.filters.range2)),
"fieldtype": "Currency",
"options": "currency",
"width": 160
},
{
"label": _(str(self.filters.range2) + "-" + str(self.filters.range3)),
"fieldname": scrub(str(self.filters.range2) + "-" + str(self.filters.range3)),
"fieldtype": "Currency",
"options": "currency",
"width": 160
},
{
"label": _(str(self.filters.range3) + "-" + str(self.filters.range4)),
"fieldname": scrub(str(self.filters.range3) + "-" + str(self.filters.range4)),
"fieldtype": "Currency",
"options": "currency",
"width": 160
},
{
"label": _(str(self.filters.range4) + _("-Above")),
"fieldname": scrub(str(self.filters.range4) + _("-Above")),
"fieldtype": "Currency",
"options": "currency",
"width": 160
}
]
if args.get("party_type") == "Customer":
columns += [{
"label": _("Territory"),
"fieldname": "territory",
"fieldtype": "Link",
"options": "Territory",
"width": 80
},
{
"label": _("Customer Group"),
"fieldname": "customer_group",
"fieldtype": "Link",
"options": "Customer Group",
"width": 80
},
{
"label": _("Sales Person"),
"fieldtype": "Data",
"fieldname": "sales_person",
"width": 120,
}]
if args.get("party_type") == "Supplier":
columns += [{
"label": _("Supplier Group"),
"fieldname": "supplier_group",
"fieldtype": "Link",
"options": "Supplier Group",
"width": 80
}]
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Link",
"options": "Currency",
"width": 80
})
return columns
def get_data(self, party_naming_by, args):
data = []
partywise_total = self.get_partywise_total(party_naming_by, args)
partywise_advance_amount = get_partywise_advanced_payment_amount(args.get("party_type"),
self.filters.get("report_date")) or {}
for party, party_dict in iteritems(partywise_total):
row = [party]
if party_naming_by == "Naming Series":
row += [self.get_party_name(args.get("party_type"), party)]
row += [partywise_advance_amount.get(party, 0)]
paid_amt = 0
if party_dict.paid_amt > 0:
paid_amt = flt(party_dict.paid_amt - partywise_advance_amount.get(party, 0))
row += [
party_dict.invoiced_amt, paid_amt, party_dict.credit_amt, party_dict.outstanding_amt,
party_dict.range1, party_dict.range2, party_dict.range3, party_dict.range4, party_dict.range5
]
if args.get("party_type") == "Customer":
row += [self.get_territory(party), self.get_customer_group(party), ", ".join(set(party_dict.sales_person))]
if args.get("party_type") == "Supplier":
row += [self.get_supplier_group(party)]
row.append(party_dict.currency)
data.append(row)
return data
def get_partywise_total(self, party_naming_by, args):
party_total = frappe._dict()
for d in self.get_voucherwise_data(party_naming_by, args):
party_total.setdefault(d.party,
frappe._dict({
"invoiced_amt": 0,
"paid_amt": 0,
"credit_amt": 0,
"outstanding_amt": 0,
"range1": 0,
"range2": 0,
"range3": 0,
"range4": 0,
"range5": 0,
"sales_person": []
})
)
for k in list(party_total[d.party]):
if k not in ["currency", "sales_person"]:
party_total[d.party][k] += flt(d.get(k, 0))
party_total[d.party].currency = d.currency
if d.sales_person:
party_total[d.party].sales_person.append(d.sales_person)
return party_total
def get_voucherwise_data(self, party_naming_by, args):
voucherwise_data = ReceivablePayableReport(self.filters).run(args)[1]
cols = ["posting_date", "party"]
if party_naming_by == "Naming Series":
cols += ["party_name"]
if args.get("party_type") == 'Customer':
cols += ["contact"]
cols += ["voucher_type", "voucher_no", "due_date"]
if args.get("party_type") == "Supplier":
cols += ["bill_no", "bill_date"]
cols += ["invoiced_amt", "paid_amt", "credit_amt",
"outstanding_amt", "age", "range1", "range2", "range3", "range4", "range5", "currency", "pdc/lc_date", "pdc/lc_ref",
"pdc/lc_amount"]
if args.get("party_type") == "Supplier":
cols += ["supplier_group", "remarks"]
if args.get("party_type") == "Customer":
cols += ["po_no", "do_no", "territory", "customer_group", "sales_person", "remarks"]
return self.make_data_dict(cols, voucherwise_data)
def make_data_dict(self, cols, data):
data_dict = []
for d in data:
data_dict.append(frappe._dict(zip(cols, d)))
return data_dict
def execute(filters=None):
args = {
@@ -241,3 +16,122 @@ def execute(filters=None):
}
return AccountsReceivableSummary(filters).run(args)
class AccountsReceivableSummary(ReceivablePayableReport):
def run(self, args):
self.party_type = args.get('party_type')
self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1])
self.get_columns()
self.get_data(args)
return self.columns, self.data
def get_data(self, args):
self.data = []
self.receivables = ReceivablePayableReport(self.filters).run(args)[1]
self.get_party_total(args)
party_advance_amount = get_partywise_advanced_payment_amount(self.party_type,
self.filters.report_date) or {}
for party, party_dict in iteritems(self.party_total):
if party_dict.outstanding <= 0:
continue
row = frappe._dict()
row.party = party
if self.party_naming_by == "Naming Series":
row.party_name = frappe.get_cached_value(self.party_type, party, scrub(self.party_type) + "_name")
row.update(party_dict)
# Advance against party
row.advance = party_advance_amount.get(party, 0)
# In AR/AP, advance shown in paid columns,
# but in summary report advance shown in separate column
row.paid -= row.advance
self.data.append(row)
def get_party_total(self, args):
self.party_total = frappe._dict()
for d in self.receivables:
self.init_party_total(d)
# Add all amount columns
for k in list(self.party_total[d.party]):
if k not in ["currency", "sales_person"]:
self.party_total[d.party][k] += d.get(k, 0.0)
# set territory, customer_group, sales person etc
self.set_party_details(d)
def init_party_total(self, row):
self.party_total.setdefault(row.party, frappe._dict({
"invoiced": 0.0,
"paid": 0.0,
"credit_note": 0.0,
"outstanding": 0.0,
"range1": 0.0,
"range2": 0.0,
"range3": 0.0,
"range4": 0.0,
"range5": 0.0,
"sales_person": []
}))
def set_party_details(self, row):
self.party_total[row.party].currency = row.currency
for key in ('territory', 'customer_group', 'supplier_group'):
if row.get(key):
self.party_total[row.party][key] = row.get(key)
if row.sales_person:
self.party_total[row.party].sales_person.append(row.sales_person)
def get_columns(self):
self.columns = []
self.add_column(label=_(self.party_type), fieldname='party',
fieldtype='Link', options=self.party_type, width=180)
if self.party_naming_by == "Naming Series":
self.add_column(_('{0} Name').format(self.party_type),
fieldname = 'party_name', fieldtype='Data')
credit_debit_label = "Credit Note" if self.party_type == 'Customer' else "Debit Note"
self.add_column(_('Advance Amount'), fieldname='advance')
self.add_column(_('Invoiced Amount'), fieldname='invoiced')
self.add_column(_('Paid Amount'), fieldname='paid')
self.add_column(_(credit_debit_label), fieldname='credit_note')
self.add_column(_('Outstanding Amount'), fieldname='outstanding')
self.setup_ageing_columns()
if self.party_type == "Customer":
self.add_column(label=_('Territory'), fieldname='territory', fieldtype='Link',
options='Territory')
self.add_column(label=_('Customer Group'), fieldname='customer_group', fieldtype='Link',
options='Customer Group')
if self.filters.show_sales_person:
self.add_column(label=_('Sales Person'), fieldname='sales_person', fieldtype='Data')
else:
self.add_column(label=_('Supplier Group'), fieldname='supplier_group', fieldtype='Link',
options='Supplier Group')
self.add_column(label=_('Currency'), fieldname='currency', fieldtype='Link',
options='Currency', width=80)
def setup_ageing_columns(self):
for i, label in enumerate(["0-{range1}".format(range1=self.filters["range1"]),
"{range1}-{range2}".format(range1=cint(self.filters["range1"])+ 1, range2=self.filters["range2"]),
"{range2}-{range3}".format(range2=cint(self.filters["range2"])+ 1, range3=self.filters["range3"]),
"{range3}-{range4}".format(range3=cint(self.filters["range3"])+ 1, range4=self.filters["range4"]),
"{range4}-{above}".format(range4=cint(self.filters["range4"])+ 1, above=_("Above"))]):
self.add_column(label=label, fieldname='range' + str(i+1))

View File

@@ -2,7 +2,7 @@
// License: GNU General Public License v3. See license.txt
frappe.require("assets/erpnext/js/financial_statements.js", function() {
frappe.query_reports["Balance Sheet"] = erpnext.financial_statements;
frappe.query_reports["Balance Sheet"] = $.extend({}, erpnext.financial_statements);
frappe.query_reports["Balance Sheet"]["filters"].push({
"fieldname": "accumulated_values",

View File

@@ -135,11 +135,11 @@ def get_chart_data(filters, columns, asset, liability, equity):
datasets = []
if asset_data:
datasets.append({'name':'Assets', 'values': asset_data})
datasets.append({'name': _('Assets'), 'values': asset_data})
if liability_data:
datasets.append({'name':'Liabilities', 'values': liability_data})
datasets.append({'name': _('Liabilities'), 'values': liability_data})
if equity_data:
datasets.append({'name':'Equity', 'values': equity_data})
datasets.append({'name': _('Equity'), 'values': equity_data})
chart = {
"data": {

View File

@@ -69,7 +69,7 @@ def get_columns(filters):
for year in fiscal_year:
for from_date, to_date in get_period_date_ranges(filters["period"], year[0]):
if filters["period"] == "Yearly":
labels = [_("Budget") + " " + str(year[0]), _("Actual ") + " " + str(year[0]), _("Varaiance ") + " " + str(year[0])]
labels = [_("Budget") + " " + str(year[0]), _("Actual ") + " " + str(year[0]), _("Variance ") + " " + str(year[0])]
for label in labels:
columns.append(label+":Float:150")
else:

View File

@@ -286,14 +286,14 @@ class PartyLedgerSummaryReport(object):
if parties and accounts:
if len(parties) == 1:
party = parties.keys()[0]
party = list(parties.keys())[0]
for account, amount in iteritems(accounts):
self.party_adjustment_accounts.add(account)
self.party_adjustment_details.setdefault(party, {})
self.party_adjustment_details[party].setdefault(account, 0)
self.party_adjustment_details[party][account] += amount
elif len(accounts) == 1 and not has_irrelevant_entry:
account = accounts.keys()[0]
account = list(accounts.keys())[0]
self.party_adjustment_accounts.add(account)
for party, amount in iteritems(parties):
self.party_adjustment_details.setdefault(party, {})

View File

@@ -425,9 +425,12 @@ def get_cost_centers_with_children(cost_centers):
all_cost_centers = []
for d in cost_centers:
lft, rgt = frappe.db.get_value("Cost Center", d, ["lft", "rgt"])
children = frappe.get_all("Cost Center", filters={"lft": [">=", lft], "rgt": ["<=", rgt]})
all_cost_centers += [c.name for c in children]
if frappe.db.exists("Cost Center", d):
lft, rgt = frappe.db.get_value("Cost Center", d, ["lft", "rgt"])
children = frappe.get_all("Cost Center", filters={"lft": [">=", lft], "rgt": ["<=", rgt]})
all_cost_centers += [c.name for c in children]
else:
frappe.throw(_("Cost Center: {0} does not exist".format(d)))
return list(set(all_cost_centers))

View File

@@ -17,7 +17,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
columns = get_columns(additional_table_columns)
company_currency = erpnext.get_company_currency(filters.get('company'))
company_currency = frappe.get_cached_value('Company', filters.get("company"), "default_currency")
item_list = get_items(filters, additional_query_columns)
if item_list:

View File

@@ -27,8 +27,8 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
fieldname:"payment_type",
label: __("Payment Type"),
fieldtype: "Select",
options: "Incoming\nOutgoing",
default: "Incoming"
options: __("Incoming") + "\n" + __("Outgoing"),
default: __("Incoming")
},
{
"fieldname":"party_type",

View File

@@ -4,11 +4,14 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.accounts_receivable.accounts_receivable import get_ageing_data
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
from frappe.utils import getdate, flt
def execute(filters=None):
if not filters: filters = {}
if not filters:
filters = {}
validate_filters(filters)
columns = get_columns(filters)
@@ -19,18 +22,28 @@ def execute(filters=None):
for d in entries:
invoice = invoice_details.get(d.against_voucher) or frappe._dict()
if d.reference_type=="Purchase Invoice":
if d.reference_type == "Purchase Invoice":
payment_amount = flt(d.debit) or -1 * flt(d.credit)
else:
payment_amount = flt(d.credit) or -1 * flt(d.debit)
row = [d.voucher_type, d.voucher_no, d.party_type, d.party, d.posting_date, d.against_voucher,
invoice.posting_date, invoice.due_date, d.debit, d.credit, d.remarks]
d.update({
"range1": 0,
"range2": 0,
"range3": 0,
"range4": 0,
"outstanding": payment_amount
})
if d.against_voucher:
row += get_ageing_data(30, 60, 90, 120, d.posting_date, invoice.posting_date, payment_amount)
else:
row += ["", "", "", "", ""]
ReceivablePayableReport(filters).get_ageing_data(invoice.posting_date, d)
row = [
d.voucher_type, d.voucher_no, d.party_type, d.party, d.posting_date, d.against_voucher,
invoice.posting_date, invoice.due_date, d.debit, d.credit, d.remarks,
d.age, d.range1, d.range2, d.range3, d.range4
]
if invoice.due_date:
row.append((getdate(d.posting_date) - getdate(invoice.due_date)).days or 0)
@@ -39,8 +52,8 @@ def execute(filters=None):
return columns, data
def validate_filters(filters):
if (filters.get("payment_type") == "Incoming" and filters.get("party_type") == "Supplier") or \
(filters.get("payment_type") == "Outgoing" and filters.get("party_type") == "Customer"):
if (filters.get("payment_type") == _("Incoming") and filters.get("party_type") == "Supplier") or \
(filters.get("payment_type") == _("Outgoing") and filters.get("party_type") == "Customer"):
frappe.throw(_("{0} payment entries can not be filtered by {1}")\
.format(filters.payment_type, filters.party_type))
@@ -51,7 +64,7 @@ def get_columns(filters):
_("Party Type") + "::100",
_("Party") + ":Dynamic Link/Party Type:140",
_("Posting Date") + ":Date:100",
_("Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == "Outgoing" else ":Link/Sales Invoice:130"),
_("Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == _("Outgoing") else ":Link/Sales Invoice:130"),
_("Invoice Posting Date") + ":Date:130",
_("Payment Due Date") + ":Date:130",
_("Debit") + ":Currency:120",
@@ -69,7 +82,7 @@ def get_conditions(filters):
conditions = []
if not filters.party_type:
if filters.payment_type == "Outgoing":
if filters.payment_type == _("Outgoing"):
filters.party_type = "Supplier"
else:
filters.party_type = "Customer"
@@ -101,7 +114,7 @@ def get_entries(filters):
def get_invoice_posting_date_map(filters):
invoice_details = {}
dt = "Sales Invoice" if filters.get("payment_type") == "Incoming" else "Purchase Invoice"
dt = "Sales Invoice" if filters.get("payment_type") == _("Incoming") else "Purchase Invoice"
for t in frappe.db.sql("select name, posting_date, due_date from `tab{0}`".format(dt), as_dict=1):
invoice_details[t.name] = t

View File

@@ -75,11 +75,11 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss):
datasets = []
if income_data:
datasets.append({'name': 'Income', 'values': income_data})
datasets.append({'name': _('Income'), 'values': income_data})
if expense_data:
datasets.append({'name': 'Expense', 'values': expense_data})
datasets.append({'name': _('Expense'), 'values': expense_data})
if net_profit:
datasets.append({'name': 'Net Profit/Loss', 'values': net_profit})
datasets.append({'name': _('Net Profit/Loss'), 'values': net_profit})
chart = {
"data": {

View File

@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.meta import get_field_precision
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions
def execute(filters=None):
@@ -68,7 +69,8 @@ def _execute(filters, additional_table_columns=None, additional_query_columns=No
total_tax = 0
for tax_acc in tax_accounts:
if tax_acc not in income_accounts:
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc))
tax_amount_precision = get_field_precision(frappe.get_meta("Sales Taxes and Charges").get_field("tax_amount"), currency=company_currency) or 2
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc), tax_amount_precision)
total_tax += tax_amount
row.append(tax_amount)
@@ -272,4 +274,4 @@ def get_mode_of_payments(invoice_list):
for d in inv_mop:
mode_of_payments.setdefault(d.parent, []).append(d.mode_of_payment)
return mode_of_payments
return mode_of_payments

View File

@@ -5,9 +5,8 @@
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"letter_head": "Capital Traders",
"modified": "2018-12-12 05:10:02.987274",
"is_standard": "Yes",
"modified": "2019-02-12 05:10:02.987274",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Supplier Ledger Summary",

View File

@@ -6,8 +6,7 @@
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"letter_head": "Gadgets International",
"modified": "2018-08-21 11:25:00.551823",
"modified": "2018-09-21 11:25:00.551823",
"modified_by": "Administrator",
"module": "Accounts",
"name": "TDS Computation Summary",

View File

@@ -1,13 +1,13 @@
{
"add_total_row": 0,
"add_total_row": 1,
"creation": "2018-08-21 11:32:30.874923",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"letter_head": "Gadgets International",
"modified": "2018-08-21 11:33:40.804532",
"modified": "2019-09-24 13:46:16.473711",
"modified_by": "Administrator",
"module": "Accounts",
"name": "TDS Payable Monthly",

View File

@@ -70,7 +70,7 @@ def get_result(filters):
rate = [i.tax_withholding_rate for i in tds_doc.rates
if i.fiscal_year == gle_map[d][0].fiscal_year]
if rate and len(rate) > 0:
if rate and len(rate) > 0 and tds_deducted:
rate = rate[0]
if getdate(filters.from_date) <= gle_map[d][0].posting_date \
@@ -164,7 +164,7 @@ def get_columns(filters):
{
"label": _("TDS Rate %"),
"fieldname": "tds_rate",
"fieldtype": "Float",
"fieldtype": "Percent",
"width": 90
},
{

View File

@@ -76,8 +76,7 @@ def get_data(filters):
accumulate_values_into_parents(accounts, accounts_by_name)
data = prepare_data(accounts, filters, total_row, parent_children_map, company_currency)
data = filter_out_zero_value_rows(data, parent_children_map,
show_zero_values=filters.get("show_zero_values"))
data = filter_out_zero_value_rows(data, parent_children_map, show_zero_values=filters.get("show_zero_values"))
return data
@@ -187,33 +186,11 @@ def calculate_values(accounts, gl_entries_by_account, opening_balances, filters,
d["closing_debit"] = d["opening_debit"] + d["debit"]
d["closing_credit"] = d["opening_credit"] + d["credit"]
total_row["debit"] += d["debit"]
total_row["credit"] += d["credit"]
if d["root_type"] == "Asset" or d["root_type"] == "Equity" or d["root_type"] == "Expense":
d["opening_debit"] -= d["opening_credit"]
d["closing_debit"] -= d["closing_credit"]
prepare_opening_closing(d)
# For opening
check_opening_closing_has_negative_value(d, "opening_debit", "opening_credit")
# For closing
check_opening_closing_has_negative_value(d, "closing_debit", "closing_credit")
if d["root_type"] == "Liability" or d["root_type"] == "Income":
d["opening_credit"] -= d["opening_debit"]
d["closing_credit"] -= d["closing_debit"]
# For opening
check_opening_closing_has_negative_value(d, "opening_credit", "opening_debit")
# For closing
check_opening_closing_has_negative_value(d, "closing_credit", "closing_debit")
total_row["opening_debit"] += d["opening_debit"]
total_row["closing_debit"] += d["closing_debit"]
total_row["opening_credit"] += d["opening_credit"]
total_row["closing_credit"] += d["closing_credit"]
for field in value_fields:
total_row[field] += d[field]
return total_row
@@ -227,6 +204,10 @@ def prepare_data(accounts, filters, total_row, parent_children_map, company_curr
data = []
for d in accounts:
# Prepare opening closing for group account
if parent_children_map.get(d.account):
prepare_opening_closing(d)
has_value = False
row = {
"account": d.name,
@@ -313,11 +294,16 @@ def get_columns():
}
]
def check_opening_closing_has_negative_value(d, dr_or_cr, switch_to_column):
# If opening debit has negetive value then move it to opening credit and vice versa.
def prepare_opening_closing(row):
dr_or_cr = "debit" if row["root_type"] in ["Asset", "Equity", "Expense"] else "credit"
reverse_dr_or_cr = "credit" if dr_or_cr == "debit" else "debit"
if d[dr_or_cr] < 0:
d[switch_to_column] = abs(d[dr_or_cr])
d[dr_or_cr] = 0.0
else:
d[switch_to_column] = 0.0
for col_type in ["opening", "closing"]:
valid_col = col_type + "_" + dr_or_cr
reverse_col = col_type + "_" + reverse_dr_or_cr
row[valid_col] -= row[reverse_col]
if row[valid_col] < 0:
row[reverse_col] = abs(row[valid_col])
row[valid_col] = 0.0
else:
row[reverse_col] = 0.0

View File

@@ -13,6 +13,10 @@ from six import iteritems
# imported to enable erpnext.accounts.utils.get_account_currency
from erpnext.accounts.doctype.account.account import get_account_currency
from erpnext.stock.utils import get_stock_value_on
from erpnext.stock import get_warehouse_account_map
class FiscalYearError(frappe.ValidationError): pass
@frappe.whitelist()
@@ -84,7 +88,8 @@ def validate_fiscal_year(date, fiscal_year, company, label="Date", doc=None):
throw(_("{0} '{1}' not in Fiscal Year {2}").format(label, formatdate(date), fiscal_year))
@frappe.whitelist()
def get_balance_on(account=None, date=None, party_type=None, party=None, company=None, in_account_currency=True, cost_center=None):
def get_balance_on(account=None, date=None, party_type=None, party=None, company=None,
in_account_currency=True, cost_center=None, ignore_account_permission=False):
if not account and frappe.form_dict.get("account"):
account = frappe.form_dict.get("account")
if not date and frappe.form_dict.get("date"):
@@ -140,7 +145,8 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, company
if account:
if not frappe.flags.ignore_account_permission:
if not (frappe.flags.ignore_account_permission
or ignore_account_permission):
acc.check_permission("read")
if report_type == 'Profit and Loss':
@@ -558,23 +564,23 @@ def fix_total_debit_credit():
(dr_or_cr, dr_or_cr, '%s', '%s', '%s', dr_or_cr),
(d.diff, d.voucher_type, d.voucher_no))
def get_stock_and_account_difference(account_list=None, posting_date=None, company=None):
from erpnext.stock.utils import get_stock_value_on
from erpnext.stock import get_warehouse_account_map
def get_stock_and_account_balance(account=None, posting_date=None, company=None):
if not posting_date: posting_date = nowdate()
difference = {}
warehouse_account = get_warehouse_account_map(company)
for warehouse, account_data in iteritems(warehouse_account):
if account_data.get('account') in account_list:
account_balance = get_balance_on(account_data.get('account'), posting_date, in_account_currency=False)
stock_value = get_stock_value_on(warehouse, posting_date)
if abs(flt(stock_value) - flt(account_balance)) > 0.005:
difference.setdefault(account_data.get('account'), flt(stock_value) - flt(account_balance))
account_balance = get_balance_on(account, posting_date, in_account_currency=False)
return difference
related_warehouses = [wh for wh, wh_details in warehouse_account.items()
if wh_details.account == account and not wh_details.is_group]
total_stock_value = 0.0
for warehouse in related_warehouses:
value = get_stock_value_on(warehouse, posting_date)
total_stock_value += value
precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency")
return flt(account_balance, precision), flt(total_stock_value, precision), related_warehouses
def get_currency_precision():
precision = cint(frappe.db.get_default("currency_precision"))
@@ -624,7 +630,7 @@ def get_held_invoices(party_type, party):
'select name from `tabPurchase Invoice` where release_date IS NOT NULL and release_date > CURDATE()',
as_dict=1
)
held_invoices = [d['name'] for d in held_invoices]
held_invoices = set([d['name'] for d in held_invoices])
return held_invoices
@@ -633,14 +639,19 @@ def get_outstanding_invoices(party_type, party, account, condition=None, filters
outstanding_invoices = []
precision = frappe.get_precision("Sales Invoice", "outstanding_amount") or 2
if erpnext.get_party_account_type(party_type) == 'Receivable':
if account:
root_type = frappe.get_cached_value("Account", account, "root_type")
party_account_type = "Receivable" if root_type == "Asset" else "Payable"
else:
party_account_type = erpnext.get_party_account_type(party_type)
if party_account_type == 'Receivable':
dr_or_cr = "debit_in_account_currency - credit_in_account_currency"
payment_dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
else:
dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
payment_dr_or_cr = "debit_in_account_currency - credit_in_account_currency"
invoice = 'Sales Invoice' if erpnext.get_party_account_type(party_type) == 'Receivable' else 'Purchase Invoice'
held_invoices = get_held_invoices(party_type, party)
invoice_list = frappe.db.sql("""
@@ -659,7 +670,6 @@ def get_outstanding_invoices(party_type, party, account, condition=None, filters
group by voucher_type, voucher_no
order by posting_date, name""".format(
dr_or_cr=dr_or_cr,
invoice = invoice,
condition=condition or ""
), {
"party_type": party_type,

View File

@@ -51,27 +51,25 @@ class CropCycle(Document):
self.create_task(disease_doc.treatment_task, self.name, start_date)
def create_project(self, period, crop_tasks):
project = frappe.new_doc("Project")
project.update({
project = frappe.get_doc({
"doctype": "Project",
"project_name": self.title,
"expected_start_date": self.start_date,
"expected_end_date": add_days(self.start_date, period - 1)
})
project.insert()
}).insert()
return project.name
def create_task(self, crop_tasks, project_name, start_date):
for crop_task in crop_tasks:
task = frappe.new_doc("Task")
task.update({
frappe.get_doc({
"doctype": "Task",
"subject": crop_task.get("task_name"),
"priority": crop_task.get("priority"),
"project": project_name,
"exp_start_date": add_days(start_date, crop_task.get("start_day") - 1),
"exp_end_date": add_days(start_date, crop_task.get("end_day") - 1)
})
task.insert()
}).insert()
def reload_linked_analysis(self):
linked_doctypes = ['Soil Texture', 'Soil Analysis', 'Plant Analysis']

View File

@@ -41,6 +41,39 @@ frappe.ui.form.on('Asset', {
});
},
setup: function(frm) {
frm.make_methods = {
'Asset Movement': () => {
frappe.call({
method: "erpnext.assets.doctype.asset.asset.make_asset_movement",
freeze: true,
args:{
"assets": [{ name: cur_frm.doc.name }]
},
callback: function (r) {
if (r.message) {
var doc = frappe.model.sync(r.message)[0];
frappe.set_route("Form", doc.doctype, doc.name);
}
}
});
},
}
frm.set_query("purchase_receipt", (doc) => {
return {
query: "erpnext.controllers.queries.get_purchase_receipts",
filters: { item_code: doc.item_code }
}
});
frm.set_query("purchase_invoice", (doc) => {
return {
query: "erpnext.controllers.queries.get_purchase_invoices",
filters: { item_code: doc.item_code }
}
});
},
refresh: function(frm) {
frappe.ui.form.trigger("Asset", "is_existing_asset");
frm.toggle_display("next_depreciation_date", frm.doc.docstatus < 1);
@@ -78,11 +111,6 @@ frappe.ui.form.on('Asset', {
});
}
if (frm.doc.status=='Submitted' && !frm.doc.is_existing_asset && !frm.doc.purchase_invoice) {
frm.add_custom_button(__("Purchase Invoice"), function() {
frm.trigger("make_purchase_invoice");
}, __('Create'));
}
if (frm.doc.maintenance_required && !frm.doc.maintenance_schedule) {
frm.add_custom_button(__("Asset Maintenance"), function() {
frm.trigger("create_asset_maintenance");
@@ -104,11 +132,36 @@ frappe.ui.form.on('Asset', {
frm.trigger("setup_chart");
}
frm.trigger("toggle_reference_doc");
if (frm.doc.docstatus == 0) {
frm.toggle_reqd("finance_books", frm.doc.calculate_depreciation);
}
},
toggle_reference_doc: function(frm) {
if (frm.doc.purchase_receipt && frm.doc.purchase_invoice && frm.doc.docstatus === 1) {
frm.set_df_property('purchase_invoice', 'read_only', 1);
frm.set_df_property('purchase_receipt', 'read_only', 1);
}
else if (frm.doc.purchase_receipt) {
// if purchase receipt link is set then set PI disabled
frm.toggle_reqd('purchase_invoice', 0);
frm.set_df_property('purchase_invoice', 'read_only', 1);
}
else if (frm.doc.purchase_invoice) {
// if purchase invoice link is set then set PR disabled
frm.toggle_reqd('purchase_receipt', 0);
frm.set_df_property('purchase_receipt', 'read_only', 1);
}
else {
frm.toggle_reqd('purchase_receipt', 1);
frm.set_df_property('purchase_receipt', 'read_only', 0);
frm.toggle_reqd('purchase_invoice', 1);
frm.set_df_property('purchase_invoice', 'read_only', 0);
}
},
make_journal_entry: function(frm) {
frappe.call({
method: "erpnext.assets.doctype.asset.asset.make_journal_entry",
@@ -176,21 +229,25 @@ frappe.ui.form.on('Asset', {
item_code: function(frm) {
if(frm.doc.item_code) {
frappe.call({
method: "erpnext.assets.doctype.asset.asset.get_item_details",
args: {
item_code: frm.doc.item_code,
asset_category: frm.doc.asset_category
},
callback: function(r, rt) {
if(r.message) {
frm.set_value('finance_books', r.message);
}
}
})
frm.trigger('set_finance_book');
}
},
set_finance_book: function(frm) {
frappe.call({
method: "erpnext.assets.doctype.asset.asset.get_item_details",
args: {
item_code: frm.doc.item_code,
asset_category: frm.doc.asset_category
},
callback: function(r, rt) {
if(r.message) {
frm.set_value('finance_books', r.message);
}
}
})
},
available_for_use_date: function(frm) {
$.each(frm.doc.finance_books || [], function(i, d) {
if(!d.depreciation_start_date) d.depreciation_start_date = frm.doc.available_for_use_date;
@@ -203,33 +260,18 @@ frappe.ui.form.on('Asset', {
},
opening_accumulated_depreciation: function(frm) {
erpnext.asset.set_accululated_depreciation(frm);
erpnext.asset.set_accumulated_depreciation(frm);
},
make_schedules_editable: function(frm) {
var is_editable = frm.doc.finance_books.filter(d => d.depreciation_method == "Manual").length > 0
? true : false;
if (frm.doc.finance_books) {
var is_editable = frm.doc.finance_books.filter(d => d.depreciation_method == "Manual").length > 0
? true : false;
frm.toggle_enable("schedules", is_editable);
frm.fields_dict["schedules"].grid.toggle_enable("schedule_date", is_editable);
frm.fields_dict["schedules"].grid.toggle_enable("depreciation_amount", is_editable);
},
make_purchase_invoice: function(frm) {
frappe.call({
args: {
"asset": frm.doc.name,
"item_code": frm.doc.item_code,
"gross_purchase_amount": frm.doc.gross_purchase_amount,
"company": frm.doc.company,
"posting_date": frm.doc.purchase_date
},
method: "erpnext.assets.doctype.asset.asset.make_purchase_invoice",
callback: function(r) {
var doclist = frappe.model.sync(r.message);
frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
}
})
frm.toggle_enable("schedules", is_editable);
frm.fields_dict["schedules"].grid.toggle_enable("schedule_date", is_editable);
frm.fields_dict["schedules"].grid.toggle_enable("depreciation_amount", is_editable);
}
},
make_sales_invoice: function(frm) {
@@ -282,17 +324,6 @@ frappe.ui.form.on('Asset', {
},
calculate_depreciation: function(frm) {
frappe.db.get_value("Asset Settings", {'name':"Asset Settings"}, 'schedule_based_on_fiscal_year', (data) => {
if (data.schedule_based_on_fiscal_year == 1) {
frm.set_df_property("depreciation_method", "options", "\nStraight Line\nManual");
frm.toggle_reqd("available_for_use_date", true);
frm.toggle_display("frequency_of_depreciation", false);
frappe.db.get_value("Fiscal Year", {'name': frappe.sys_defaults.fiscal_year}, "year_end_date", (data) => {
frm.set_value("next_depreciation_date", data.year_end_date);
})
}
})
frm.toggle_reqd("finance_books", frm.doc.calculate_depreciation);
},
@@ -302,6 +333,65 @@ frappe.ui.form.on('Asset', {
})
},
purchase_receipt: function(frm) {
frm.trigger('toggle_reference_doc');
if (frm.doc.purchase_receipt) {
if (frm.doc.item_code) {
frappe.db.get_doc('Purchase Receipt', frm.doc.purchase_receipt).then(pr_doc => {
frm.set_value('company', pr_doc.company);
frm.set_value('purchase_date', pr_doc.posting_date);
const item = pr_doc.items.find(item => item.item_code === frm.doc.item_code);
if (!item) {
frm.set_value('purchase_receipt', '');
frappe.msgprint({
title: __('Invalid Purchase Receipt'),
message: __("The selected Purchase Receipt doesn't contains selected Asset Item."),
indicator: 'red'
});
}
frm.set_value('gross_purchase_amount', item.base_net_rate);
frm.set_value('location', item.asset_location);
});
} else {
frm.set_value('purchase_receipt', '');
frappe.msgprint({
title: __('Not Allowed'),
message: __("Please select Item Code first")
});
}
}
},
purchase_invoice: function(frm) {
frm.trigger('toggle_reference_doc');
if (frm.doc.purchase_invoice) {
if (frm.doc.item_code) {
frappe.db.get_doc('Purchase Invoice', frm.doc.purchase_invoice).then(pi_doc => {
frm.set_value('company', pi_doc.company);
frm.set_value('purchase_date', pi_doc.posting_date);
const item = pi_doc.items.find(item => item.item_code === frm.doc.item_code);
if (!item) {
frm.set_value('purchase_invoice', '');
frappe.msgprint({
title: __('Invalid Purchase Invoice'),
message: __("The selected Purchase Invoice doesn't contains selected Asset Item."),
indicator: 'red'
});
}
frm.set_value('gross_purchase_amount', item.base_net_rate);
frm.set_value('location', item.asset_location);
});
} else {
frm.set_value('purchase_invoice', '');
frappe.msgprint({
title: __('Not Allowed'),
message: __("Please select Item Code first")
});
}
}
},
set_depreciation_rate: function(frm, row) {
if (row.total_number_of_depreciations && row.frequency_of_depreciation
&& row.expected_value_after_useful_life) {
@@ -371,12 +461,12 @@ frappe.ui.form.on('Depreciation Schedule', {
},
depreciation_amount: function(frm, cdt, cdn) {
erpnext.asset.set_accululated_depreciation(frm);
erpnext.asset.set_accumulated_depreciation(frm);
}
})
erpnext.asset.set_accululated_depreciation = function(frm) {
erpnext.asset.set_accumulated_depreciation = function(frm) {
if(frm.doc.depreciation_method != "Manual") return;
var accumulated_depreciation = flt(frm.doc.opening_accumulated_depreciation);
@@ -415,92 +505,19 @@ erpnext.asset.restore_asset = function(frm) {
})
};
erpnext.asset.transfer_asset = function(frm) {
var dialog = new frappe.ui.Dialog({
title: __("Transfer Asset"),
fields: [
{
"label": __("Target Location"),
"fieldname": "target_location",
"fieldtype": "Link",
"options": "Location",
"get_query": function () {
return {
filters: [
["Location", "is_group", "=", 0]
]
}
},
"reqd": 1
},
{
"label": __("Select Serial No"),
"fieldname": "serial_nos",
"fieldtype": "Link",
"options": "Serial No",
"get_query": function () {
return {
filters: {
'asset': frm.doc.name
}
}
},
"onchange": function() {
let val = this.get_value();
if (val) {
let serial_nos = dialog.get_value("serial_no") || val;
if (serial_nos) {
serial_nos = serial_nos.split('\n');
serial_nos.push(val);
const unique_sn = serial_nos.filter(function(elem, index, self) {
return index === self.indexOf(elem);
});
dialog.set_value("serial_no", unique_sn.join('\n'));
dialog.set_value("serial_nos", "");
}
}
}
},
{
"label": __("Serial No"),
"fieldname": "serial_no",
"read_only": 1,
"fieldtype": "Small Text"
},
{
"label": __("Date"),
"fieldname": "transfer_date",
"fieldtype": "Datetime",
"reqd": 1,
"default": frappe.datetime.now_datetime()
erpnext.asset.transfer_asset = function() {
frappe.call({
method: "erpnext.assets.doctype.asset.asset.make_asset_movement",
freeze: true,
args:{
"assets": [{ name: cur_frm.doc.name }],
"purpose": "Transfer"
},
callback: function (r) {
if (r.message) {
var doc = frappe.model.sync(r.message)[0];
frappe.set_route("Form", doc.doctype, doc.name);
}
]
}
});
dialog.set_primary_action(__("Transfer"), function() {
var args = dialog.get_values();
if(!args) return;
dialog.hide();
return frappe.call({
type: "GET",
method: "erpnext.assets.doctype.asset.asset.transfer_asset",
args: {
args: {
"asset": frm.doc.name,
"transaction_date": args.transfer_date,
"source_location": frm.doc.location,
"target_location": args.target_location,
"serial_no": args.serial_no,
"company": frm.doc.company
}
},
freeze: true,
callback: function(r) {
cur_frm.reload_doc();
}
})
});
dialog.show();
};

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