Compare commits

...

365 Commits

Author SHA1 Message Date
Nabin Hait
6e4ab60e4c Merge branch 'hotfix' 2016-09-05 15:43:48 +05:30
Nabin Hait
911e9caa43 bumped to version 7.0.39 2016-09-05 16:13:48 +06:00
Nabin Hait
b239a09951 Merge pull request #6282 from nabinhait/maintenance_schedule_fix
Minor fix in maintenance schedule
2016-09-05 15:39:54 +05:30
Nabin Hait
d223a03814 Merge pull request #6281 from nabinhait/notifications
Notifications filters for DN, PR and PI
2016-09-05 15:26:23 +05:30
Nabin Hait
4cb58c410a Minor fix in maintenance schedule 2016-09-05 15:14:26 +05:30
Nabin Hait
906552a401 Notifications filters for DN, PR and PI 2016-09-05 14:35:40 +05:30
Nabin Hait
3bd5014b7b Merge pull request #6280 from nabinhait/minorfixes
Minor fixes
2016-09-05 12:32:09 +05:30
Nabin Hait
8693b5c93a Minor fixes 2016-09-05 11:51:45 +05:30
Nabin Hait
36830016ee Merge branch 'hotfix' 2016-09-02 16:19:21 +05:30
Nabin Hait
533e564867 bumped to version 7.0.38 2016-09-02 16:49:21 +06:00
Nabin Hait
88d7e419ad Merge pull request #6263 from nabinhait/timesheet_fix_101
Migrate employee field to timesheet only if it exists in time log
2016-09-02 16:18:12 +05:30
Nabin Hait
54254cca58 Update set_party_name_in_payment_entry.py 2016-09-02 16:17:42 +05:30
Nabin Hait
142f14dd5c Migrate employee field to timesheet only if it exists in time log 2016-09-02 14:47:14 +05:30
Nabin Hait
0f0c131ba4 Merge branch 'hotfix' 2016-09-02 14:26:33 +05:30
Nabin Hait
e1e187bee1 bumped to version 7.0.37 2016-09-02 14:56:33 +06:00
Nabin Hait
c946c730da Merge pull request #6258 from nabinhait/party_name_in_pe
Party name in Payment Entry and cheque print format
2016-09-02 14:20:22 +05:30
Nabin Hait
5a4ca64c4a Party name in Payment Entry and cheque print format 2016-09-02 14:20:01 +05:30
Nabin Hait
47fd4c6521 Merge pull request #6261 from nabinhait/order_trends_fix
Ignore closed sales/purchase order in trends report
2016-09-02 14:17:30 +05:30
Nabin Hait
e58031ab49 Merge pull request #6249 from rohitwaghchaure/rfq_webform_issue
[RFQ] Web form alignment issue
2016-09-02 14:17:22 +05:30
Nabin Hait
f8e374643c Merge pull request #6257 from nabinhait/letter_head_in_report
Default letter head in report printing based on selected company
2016-09-02 14:17:12 +05:30
Nabin Hait
0ef9da65dc Merge pull request #6260 from rohitwaghchaure/timesheet_status_and_date_issue
[Fix] Updated timesheet status, start date, end date
2016-09-02 14:16:53 +05:30
Nabin Hait
98d58b5ed1 Merge pull request #6262 from saurabh6790/hotfix
[fix] set is_group filter in get query for warehouse
2016-09-02 14:14:47 +05:30
Saurabh
ff910f4c72 [fixes] set filter for warehouse 2016-09-02 13:39:05 +05:30
Nabin Hait
5c69fed218 Ignore closed sales/purchase order in trends report 2016-09-02 12:53:18 +05:30
Rohit Waghchaure
d07557eaf6 [Fix] Updated timesheet status 2016-09-02 12:24:54 +05:30
Nabin Hait
13b37c6346 Default letter head in report printing based on selected company 2016-09-02 11:25:42 +05:30
Rohit Waghchaure
b34ba6bd6e [RFQ] Web form alignment issue 2016-09-01 19:10:58 +05:30
Nabin Hait
94dbc14f8a Merge branch 'hotfix' 2016-09-01 12:42:29 +05:30
Nabin Hait
600ab0f7a0 bumped to version 7.0.36 2016-09-01 13:12:29 +06:00
Nabin Hait
9afee28c36 Merge pull request #6243 from rohitwaghchaure/timesheet_issue
[Patch] Check table exist
2016-09-01 12:38:30 +05:30
Rohit Waghchaure
86f143863f [Patch] Check table exist 2016-09-01 12:37:20 +05:30
Nabin Hait
c7be851bf8 Merge branch 'hotfix' 2016-09-01 12:26:11 +05:30
Nabin Hait
b6f33c7c4f bumped to version 7.0.35 2016-09-01 12:56:11 +06:00
Nabin Hait
bb2bceef62 Merge pull request #6229 from rohitwaghchaure/pos_payment_issue
[POS] Fixed POS Sales Invoice when Payment Table is Empty
2016-09-01 12:25:31 +05:30
Nabin Hait
3e805708dc Merge pull request #6237 from rohitwaghchaure/timesheet_employee_missing_issue
[Fix] Timesheet, employee is missing in patch
2016-09-01 12:15:06 +05:30
Rohit Waghchaure
7f165f19d2 [Fix] Timesheet employee is missing in patch 2016-09-01 12:07:21 +05:30
Rohit Waghchaure
774ce63b75 remove mode of payment, migrate mode of payment from v6 to v7 2016-08-31 21:21:41 +05:30
Rohit Waghchaure
879cb6ebee [POS] Fixed POS Sales Invoice when Payment Table is Empty 2016-08-31 14:41:48 +05:30
Nabin Hait
16e15283b5 Imported unicode literals 2016-08-31 12:33:22 +05:30
Nabin Hait
ef16d657ff Merge pull request #6226 from rohitwaghchaure/pos_fixes_and_cleanups
[POS] Currency format issue, added zero value condition
2016-08-31 11:02:16 +05:30
Rohit Waghchaure
d39f53319d Added zero value condition 2016-08-31 02:09:15 +05:30
Rohit Waghchaure
609e2b4ca3 [POS] Currency format issue 2016-08-31 02:04:53 +05:30
Nabin Hait
4f71190a85 Merge pull request #6215 from rohitwaghchaure/pos_precision_issue
[Fix] Precision issue for field conversion rate in POS
2016-08-30 09:52:55 +05:30
Rohit Waghchaure
a57bf5ee2e [fix] Precision issue for field conversion rate in POS 2016-08-30 01:05:01 +05:30
Nabin Hait
51a236f38b Merge branch 'hotfix' 2016-08-29 11:47:30 +05:30
Nabin Hait
11c2207a8a bumped to version 7.0.34 2016-08-29 12:17:30 +06:00
Nabin Hait
a0da708d51 Merge pull request #6185 from rohitwaghchaure/fixes_and_cleanup_pos
[POS] Fixes and cleanup
2016-08-29 11:42:09 +05:30
Nabin Hait
84e88b5d63 Merge pull request #6198 from rmehta/hotfix
[minor] validate permission in Process Payroll and all products fix for home page
2016-08-29 11:23:50 +05:30
Rushabh Mehta
9d1b56f423 [minor] validate permission in Process Payroll and all products fix for home page 2016-08-29 11:03:10 +05:30
Rohit Waghchaure
63bdd679d0 [POS] Fixes and cleanup 2016-08-27 02:53:36 +05:30
Nabin Hait
f92f04bffc Merge branch 'hotfix' 2016-08-26 12:37:19 +05:30
Nabin Hait
6592899741 bumped to version 7.0.33 2016-08-26 13:07:19 +06:00
Nabin Hait
06b27757ab Merge pull request #6179 from rohitwaghchaure/minor_fix_patch
[Sales Return] Minor fix in patch
2016-08-26 12:33:33 +05:30
Rohit Waghchaure
e21e1ebae2 [Sales Return] Minor fix in patch 2016-08-26 12:31:41 +05:30
Nabin Hait
a26bb96d2d Merge pull request #6178 from nabinhait/status_updater_fix
Ignore validating billed amount against order if order item amount is zero
2016-08-26 12:09:39 +05:30
Nabin Hait
fbe1563101 Merge pull request #6168 from rohitwaghchaure/hotfix
[POS] Fixed payment gl entry for sales return
2016-08-26 11:58:46 +05:30
Nabin Hait
47a3f639ed Ignore validating billed amount against order if order item amount is zero 2016-08-26 11:39:39 +05:30
Rohit Waghchaure
efb5bf2cfc [POS] Fixed payment gl entry for sales return 2016-08-25 16:23:47 +05:30
Nabin Hait
385311c8a2 Merge pull request #6170 from rohitwaghchaure/patch_fix
[Fix] 'SalesInvoice' object has no attribute 'account_for_change_amount'
2016-08-25 14:41:47 +05:30
Rohit Waghchaure
0788ee62c1 Fixed patch, 'SalesInvoice' object has no attribute 'account_for_change_amount' 2016-08-25 12:46:34 +05:30
Nabin Hait
ec6267e82a Merge branch 'hotfix' 2016-08-23 12:10:56 +05:30
Nabin Hait
db05ac2414 bumped to version 7.0.32 2016-08-23 12:40:56 +06:00
Nabin Hait
f862505bf9 Merge pull request #6153 from rohitwaghchaure/hotfix
[POS] Fixed decimal button not working
2016-08-23 12:07:40 +05:30
Rohit Waghchaure
ea6d7e9b09 [Fix] decimal button not working 2016-08-23 11:39:44 +05:30
Nabin Hait
8f782e71af Merge pull request #6149 from nabinhait/change_log_v7
Change logs for v7
2016-08-22 15:56:32 +05:30
Nabin Hait
dac204b1e3 Merge pull request #6124 from rohitwaghchaure/hotfix
[POS] Fixed issue of paid amount, write off account
2016-08-22 15:56:20 +05:30
Nabin Hait
9c786948d5 Merge pull request #6125 from nabinhait/lcv_hotfix
[fix] Repost only distinct purchase receipts and invoices
2016-08-22 15:53:21 +05:30
Nabin Hait
6f1795cb3d Merge pull request #6146 from neilLasrado/operation
Operations related fixes
2016-08-22 15:52:57 +05:30
Nabin Hait
01b555edc7 Change logs for v7 2016-08-22 15:50:21 +05:30
Neil Trini Lasrado
20b01873ab Made operation mandatory and removed mandatory from operation desc in Production Order Operation, set operation name as desc in operation master if desc is blank 2016-08-22 15:05:50 +05:30
Nabin Hait
43accf4c07 Merge pull request #6144 from nabinhait/timesheet_patch_fix
Ignore validating mandatory fields on converting timelogs to timesheets
2016-08-22 14:39:01 +05:30
Nabin Hait
9239ed5c44 Ignore validating mandatory fields on converting timelogs to timesheets 2016-08-22 14:35:06 +05:30
Rohit Waghchaure
713e2b7b62 [POS] Fixed issue of paid amount, write off account 2016-08-19 19:27:16 +05:30
Nabin Hait
3b6dc141c6 [fix] Repost only distinct purchase receipts and invoices 2016-08-19 16:39:50 +05:30
Nabin Hait
e4fb7b1b2f Merge branch 'hotfix' 2016-08-18 16:15:49 +05:30
Nabin Hait
9a1bcac576 bumped to version 7.0.31 2016-08-18 16:45:49 +06:00
Nabin Hait
e68b089187 Query for warehouse in delivery note 2016-08-18 16:14:23 +05:30
Nabin Hait
d8a372587d [fix] Legend in support analytics chart 2016-08-18 16:14:23 +05:30
Nabin Hait
f04ce3c5a6 [fix] check expense agaist budget 2016-08-18 16:14:23 +05:30
Nabin Hait
50f8262ac7 Currency fix in reports 2016-08-18 16:14:23 +05:30
Nabin Hait
e30fadc661 Merge branch 'develop' 2016-08-18 16:13:15 +05:30
Nabin Hait
f0937bf722 bumped to version 7.0.30 2016-08-18 16:43:15 +06:00
Nabin Hait
4810831678 Merge pull request #6107 from neilLasrado/develop
[Fix] Enroll Students from Student Applicants in Program Enrollment Tool.
2016-08-18 14:21:11 +05:30
Nabin Hait
7cdc6fd789 Merge pull request #6115 from rohitwaghchaure/pos_stock_update_issue
[POS] Fixed stock update issue
2016-08-18 14:20:26 +05:30
Rushabh Mehta
03e5ea3a0d Merge pull request #6114 from hereabdulla/patch-1
Update employee_list.js
2016-08-18 14:05:58 +05:30
Rohit Waghchaure
9d5a07d101 [POS] Fixed stock update issue 2016-08-18 13:27:06 +05:30
Rushabh Mehta
b7bc6bd75d [fix] better message for cost center, fixes #6109 2016-08-18 12:50:58 +05:30
Abdulla P I
23a6d05622 Update employee_list.js 2016-08-18 12:43:19 +05:30
Rushabh Mehta
b969c2cb60 [minor] budget link in cost center, fixes #6093 2016-08-18 12:36:20 +05:30
Neil Trini Lasrado
c4e71fcc51 [Fix] Enroll Students from Student Applicants in Program Enrollment Tool. 2016-08-17 17:37:19 +05:30
Nabin Hait
b8a8fb5877 Merge branch 'develop' 2016-08-17 17:11:09 +05:30
Nabin Hait
734cf70b43 bumped to version 7.0.29 2016-08-17 17:41:09 +06:00
Nabin Hait
6fe3ac49cf Merge pull request #6039 from rohitwaghchaure/allow_to_edit_change_amount
Allow to edit change amount
2016-08-17 17:08:54 +05:30
Rohit Waghchaure
e4e69ec027 changed field name, validation for change amount account, validation for serial no qty 2016-08-17 16:20:13 +05:30
Nabin Hait
386d9e1613 Merge pull request #6106 from nabinhait/item_reload
Default material request type field restored
2016-08-17 16:16:28 +05:30
Nabin Hait
40c60b6182 Default material request type field restored 2016-08-17 16:14:24 +05:30
Nabin Hait
95c998109d Merge pull request #6043 from aruizramon/purchase-taxes-client-validation
Validate on changing from Total to Valuation/Valuation&Total when add…
2016-08-17 12:12:14 +05:30
Nabin Hait
33bcaa8a07 Merge pull request #6080 from bcornwellmott/quoteditem_picksupplier
Quoted Item Comparison: Button for setting the default_supplier
2016-08-17 11:36:55 +05:30
Nabin Hait
4da2c81641 Merge pull request #6094 from rmehta/sales-purchase-items
[revert] is_sales_item, is_purchase_item back
2016-08-17 11:30:37 +05:30
Nabin Hait
c2595aa902 Merge pull request #6099 from nabinhait/patch_fix_for_v6_to_v7_migration
Patch fixed for v6 to v7 migration
2016-08-17 11:28:29 +05:30
Nabin Hait
613ef344f3 Patch fixed for v6 to v7 migration 2016-08-16 18:31:26 +05:30
Nabin Hait
0c1be8df35 Merge pull request #6096 from rohitwaghchaure/minor_fix
[Fix] lwp salary structure
2016-08-16 18:17:14 +05:30
Nabin Hait
815ebafa7b Merge pull request #6092 from umairsy/9aug
Updated docs (please don't merge)
2016-08-16 18:16:28 +05:30
Umair Sayyed
8f7708ed5b docs updated 2016-08-16 18:13:12 +05:30
Umair Sayyed
1bd9f22add updated docsgd 2016-08-16 18:08:24 +05:30
Umair Sayyed
f369b5951e updated docs 2016-08-16 18:08:00 +05:30
Umair Sayyed
81995389ac updated docs 2016-08-16 18:08:00 +05:30
Rohit Waghchaure
fe913c9969 [Fix] lwp salary structure 2016-08-16 15:43:50 +05:30
Nabin Hait
18d6162935 Merge branch 'develop' 2016-08-16 15:25:34 +05:30
Nabin Hait
91d6544958 bumped to version 7.0.28 2016-08-16 15:55:33 +06:00
Nabin Hait
f640ad4389 Merge pull request #6095 from nabinhait/timesheet_patch
Ignore overlap validation while creating timesheet from existing time logs
2016-08-16 15:19:56 +05:30
Nabin Hait
39bc4b2a4c Ignore overlap validation while creating timesheet from existing time logs 2016-08-16 15:18:28 +05:30
Rushabh Mehta
d973c1606a [revert] is_sales_item, is_purchase_item back 2016-08-16 11:32:08 +05:30
Nabin Hait
df9cf2ef8e Merge pull request #6068 from neilLasrado/develop
Added image field to guardian, program enrollment, fixed some typos
2016-08-16 11:01:58 +05:30
Nabin Hait
528ab53b3a Merge pull request #6067 from rohitwaghchaure/pos_fixes
[POS] fixed issue of negative stock
2016-08-16 11:00:31 +05:30
Rohit Waghchaure
9cd356c7f0 [POS] Fixed print qty decimal issue 2016-08-16 10:44:21 +05:30
Rushabh Mehta
de08639d49 [minor] fixes to patches while moving from v5 2016-08-16 10:01:56 +05:30
Neil Trini Lasrado
987009bf35 Update quotation.json 2016-08-12 16:44:00 +05:30
Rushabh Mehta
c833cc8432 Merge branch 'develop' 2016-08-12 11:53:08 +05:30
Rushabh Mehta
3f22ec9536 bumped to version 7.0.27 2016-08-12 12:23:08 +06:00
Rushabh Mehta
d643f2b249 [minor] fixes #6074; 2016-08-12 10:36:59 +05:30
Ben Cornwell-Mott
b739dd24b2 Added a button to assist in setting the default_supplier 2016-08-11 19:45:55 -07:00
Neil Trini Lasrado
c917423b01 Fixed typo in quotation, added image feild in Program Enrollment 2016-08-11 18:22:45 +05:30
Neil Trini Lasrado
6a23016f90 Added image feild to guardian 2016-08-11 17:28:21 +05:30
Rushabh Mehta
730f3e7aba [minor] remove validation #4904 2016-08-11 17:17:26 +05:30
Rohit Waghchaure
033ed00c56 [POS] fixed issue of negative stock 2016-08-11 16:37:29 +05:30
Rushabh Mehta
6c0d9579d2 Merge pull request #6055 from rohitwaghchaure/bank_reconciliation_statement_report_issue
[Fix] No permission to read DocType for account user in bank reconciliation statement report
2016-08-11 10:55:10 +05:30
Rushabh Mehta
09fc241d59 Merge pull request #6054 from rohitwaghchaure/purchase_invoice_accounting_issue_for_auto_stock
[Fix] Debit and credit not equal for purchase invoice, if update stock is yes and taxes is defined
2016-08-11 10:54:40 +05:30
Rohit Waghchaure
e78ef5f8c8 [Fix] No permission to read DocType for account user in bank reconciliation statement report 2016-08-11 00:46:15 +05:30
Rohit Waghchaure
315a5e1b4d [Fix] Debit and credit not equal for purchase invoice, if update stock is yes and taxes is defined 2016-08-11 00:35:00 +05:30
Rushabh Mehta
7909a30008 Merge branch 'develop' 2016-08-10 19:47:24 +05:30
Rushabh Mehta
cf80f850bd bumped to version 7.0.26 2016-08-10 20:17:23 +06:00
Rushabh Mehta
36f2d4f81e [fix] patch for schools; 2016-08-10 19:46:12 +05:30
Rushabh Mehta
a7d92bc8f6 Merge pull request #6050 from rohitwaghchaure/pos_serial_no_search_issue
[Fix] Serial no search issue, if serial no is similar with item code.
2016-08-10 18:52:17 +05:30
Rushabh Mehta
332729e99e Merge branch 'develop' 2016-08-10 18:19:14 +05:30
Rushabh Mehta
18480bdc23 bumped to version 7.0.25 2016-08-10 18:49:14 +06:00
Rushabh Mehta
4b08f9ad1f [fix] patch 2016-08-10 18:18:14 +05:30
Rohit Waghchaure
ea5a32d304 [Fix] Searial no search issue, if serial no is similar with item code 2016-08-10 17:18:52 +05:30
Rushabh Mehta
c9501eb460 Merge branch 'develop' 2016-08-10 14:34:39 +05:30
Rushabh Mehta
d908b99b00 bumped to version 7.0.24 2016-08-10 15:04:39 +06:00
Rushabh Mehta
6646960e31 Merge pull request #6045 from bcornwellmott/quotereportcurrency
Quoted item currency
2016-08-10 14:26:25 +05:30
Rushabh Mehta
185c247286 Merge pull request #6024 from rohitwaghchaure/get_account_of_payment_mode_issue
[Fix] Get account of the mode of payment on sales invoice and pos profile
2016-08-10 14:25:42 +05:30
Rushabh Mehta
a56121a342 Merge pull request #6034 from netchampfaris/ui-fixes
[ui] fix thumbnail for long images in image view frappe/erpnext#1939
2016-08-10 14:24:58 +05:30
Rushabh Mehta
cc054a5bbc [minor] fix reload for school migrate patch 2016-08-10 14:24:16 +05:30
Rushabh Mehta
aa12d30d5a Merge pull request #6048 from PawanMeh/fixes_5723
[fix] #5723
2016-08-10 14:12:56 +05:30
pawan mehta
399a4bf201 [fix] #5723 2016-08-10 13:20:16 +05:30
Rohit Waghchaure
70be24d6f0 [Fix] Get account of the mode of payment on sales invoice and pos profile 2016-08-10 13:16:39 +05:30
Rushabh Mehta
6ddbb8820a Merge pull request #6047 from revant/develop
[fix] Issue #6046 group_name replaced with name
2016-08-10 12:57:53 +05:30
Rushabh Mehta
6252e935a0 Merge pull request #5844 from bcornwellmott/quoteditemplot-1
Added C3.JS Plot to compare quotes in Print view
2016-08-10 12:50:36 +05:30
Revant Nandgaonkar
5bbc68df8b [fix] Issue #6046 group_name replaced with name 2016-08-10 11:06:31 +05:30
aruizramon
8bd2487533 semicolon 2016-08-09 16:04:45 -04:00
Alec Ruiz-Ramon
08fb39f1ba Validate on changing from Total to Valuation/Valuation&Total when add_deduct_tax is 'Deduct' 2016-08-09 15:38:34 -04:00
Rohit Waghchaure
baef2624a2 Given provision to enter write off and change amount on POS 2016-08-10 00:50:53 +05:30
Nabin Hait
88fff46ab4 Merge pull request #6038 from nabinhait/portal_settings_schools
Portal settings for schools
2016-08-09 17:20:56 +05:30
Nabin Hait
f44b5152d2 Portal settings for schools 2016-08-09 17:08:13 +05:30
Rushabh Mehta
ec2d09c557 [minor] setting up website optional in setup wizard 2016-08-09 16:44:37 +05:30
Nabin Hait
722b22a834 Merge branch 'develop' 2016-08-09 15:30:32 +05:30
Nabin Hait
08e2105b09 bumped to version 7.0.23 2016-08-09 16:00:31 +06:00
Nabin Hait
11d565b07c Update migrate_schools_to_erpnext.py 2016-08-09 15:23:01 +05:30
Nabin Hait
a2c9d13f68 Merge branch 'develop' 2016-08-09 15:00:16 +05:30
Nabin Hait
508542d4d9 bumped to version 7.0.22 2016-08-09 15:30:16 +06:00
Nabin Hait
50ff8471e0 Merge pull request #6023 from neilLasrado/docs
Merged docs for schools to erpnext docs
2016-08-09 14:23:48 +05:30
Nabin Hait
78b8cdc3c1 Merge pull request #6033 from nabinhait/patch_fix_10
[patch] Reload Purchase Invoice in patch. Fixed #6032
2016-08-09 14:22:40 +05:30
Nabin Hait
2275cd15e6 [patch] Reload Purchase Invoice in patch 2016-08-09 14:21:29 +05:30
Faris Ansari
d217387400 [ui] fix thumbnail for long images in image view 2016-08-09 14:15:59 +05:30
Nabin Hait
b9376641af Merge pull request #6031 from nabinhait/patch_fix_9
[fix]Patch order changed. Fixed #6026
2016-08-09 11:28:48 +05:30
Nabin Hait
ee018b5ae1 [fix]Patch order changed. Fixed #6026 2016-08-09 11:27:28 +05:30
Rohit Waghchaure
c41ab8d15b Added change amount account 2016-08-08 23:19:18 +05:30
Rohit Waghchaure
7127a8f522 Allow user to edit change amount from sales invoice form for is pos 2016-08-08 23:19:18 +05:30
Neil Trini Lasrado
acf85dffc5 Merged docs for schools to erpnext docs 2016-08-08 18:59:15 +05:30
Nabin Hait
660f3ed0d6 Merge branch 'develop' 2016-08-08 15:50:00 +05:30
Nabin Hait
d5c83122f2 bumped to version 7.0.21 2016-08-08 16:20:00 +06:00
Nabin Hait
2777f23ace Merge pull request #6019 from nabinhait/pcv_test_case
Fixed test cases for period closing voucher
2016-08-08 15:45:19 +05:30
Nabin Hait
ae65172dca Added 'Ledger' button to show accounting entries against PCV 2016-08-08 15:44:45 +05:30
Nabin Hait
d261d40c7e Fixed test cases for period closing voucher 2016-08-08 15:44:45 +05:30
Nabin Hait
4b231c2692 Merge pull request #6018 from rohitwaghchaure/add_calendar_to_timesheets
Added a Calendar view for timesheet logs
2016-08-08 14:46:18 +05:30
Nabin Hait
7e27e32e92 Merge pull request #6017 from nabinhait/repost_future_stock_transactions
Repost gle for future transactions if update stock checked in back dated purchase invoice
2016-08-08 14:45:17 +05:30
Ben Cornwell-Mott
ed1b8cfe3f Added a Calendar view for timesheet logs 2016-08-08 14:17:06 +05:30
Nabin Hait
99d4ff4a29 Repost gle for future transactions if update stock checked in back dated purchase invoice 2016-08-08 14:12:58 +05:30
Nabin Hait
595dbd6dea Merge pull request #5963 from neilLasrado/assessment
Assessment Groups
2016-08-08 12:50:10 +05:30
Nabin Hait
f979b18ddb Merge pull request #6003 from neilLasrado/bug-fix
[bug fix] Fixed bug in fee caclulation, renamed functions
2016-08-08 12:44:27 +05:30
Nabin Hait
3ef6e7847e Merge pull request #6010 from rohitwaghchaure/minor_fix_pos
[Fix] pos ambiguous issue
2016-08-08 12:40:28 +05:30
Nabin Hait
2dba3b5e25 Merge pull request #6012 from bohlian/develop
[Enhancement + Fix] Disable buttons when Production Order is Stopped, Fixed Stopping and Re-Opening of Production Order
2016-08-08 12:40:00 +05:30
Nabin Hait
2cb8c6a867 Merge pull request #6015 from nabinhait/ar_ap_cols
[fix] Label for ageing cols in AR/AP report
2016-08-08 12:37:19 +05:30
Nabin Hait
be3aee973c Merge pull request #6011 from saurabh6790/get_acount_balance_fix
[minor][fix] return if account details not found
2016-08-08 12:36:40 +05:30
Nabin Hait
c30c342bdf [fix] Label for ageing cols in AR/AP report 2016-08-08 11:47:13 +05:30
Neil Trini Lasrado
f02a0d4d24 [bug fix] Fixed bug in fee caclulation, renamed functions 2016-08-08 11:09:29 +05:30
Ben Cornwell-Mott
44f85fed26 Converted to a common currency (company) 2016-08-07 10:29:51 -07:00
Rohit Waghchaure
cd6c00d505 [Fix] pos ambiguous issue 2016-08-07 14:29:21 +05:30
Javier Wong
e6cd228288 [Enhancement + Fix] Disable buttons when Production Order is Stopped, Fixed Stopping and Re-Opening of Production Order
Disabled the following buttons:
- Make Timesheet
- Start
- Finish `

- A better fix than 316f78f859
- Sets the Status to In Process or Not Started instead of Unstopped
- Displays this same status on the client prompt (msgprint)
2016-08-07 16:01:49 +08:00
Saurabh
ec14c81ebd [minor][fix] return if account details not found 2016-08-07 08:52:45 +05:30
Nabin Hait
8793b823af Merge branch 'develop' 2016-08-06 14:15:34 +05:30
Nabin Hait
537301a210 bumped to version 7.0.20 2016-08-06 14:45:34 +06:00
Nabin Hait
f1d8fc3d51 Merge pull request #6008 from KanchanChauhan/leave-application-validation
Leave Application Validation for processed salary
2016-08-06 14:13:46 +05:30
Nabin Hait
20b4666e89 Merge pull request #5958 from rohitwaghchaure/minor_fixes_and_cleanups
fixes and cleanups.
2016-08-06 14:11:24 +05:30
Rushabh Mehta
84969bdb2d Merge pull request #6007 from KanchanChauhan/task-json-fixed
[Minor] Removed hard coded success URL from task webform
2016-08-06 13:42:50 +05:30
Kanchan Chauhan
705384d8fe Leave Application Validation for processed salary 2016-08-06 13:42:18 +05:30
Rushabh Mehta
2123e02eda Merge pull request #6005 from revant/patch-2
[fix] success_url Issue #6004
2016-08-06 13:40:02 +05:30
Rohit Waghchaure
b77a1057ce fixes and cleanups. 2016-08-06 12:45:02 +05:30
Kanchan Chauhan
93b1f2ad72 [Minor] Removed hard coded success URL 2016-08-06 12:09:08 +05:30
Revant Nandgaonkar
9a433ffca1 [fix] success_url Issue #6004 2016-08-05 21:44:34 +05:30
Nabin Hait
c1162796c5 Merge branch 'develop' 2016-08-05 16:45:14 +05:30
Nabin Hait
82446bf83e bumped to version 7.0.19 2016-08-05 17:15:14 +06:00
Nabin Hait
c72f8976aa Merge pull request #5989 from umairsy/2aug
updated docs
2016-08-05 15:50:34 +05:30
Nabin Hait
c49a3425ef Merge pull request #6002 from nabinhait/pe_fix_101
Payment Entry fix: Unallocated amount in payment entry considering deductions
2016-08-05 15:44:44 +05:30
Neil Trini Lasrado
50b2278eda Renamed fields in Examination Doctype, Renamed examination doctype to Assessment, Added Assessment Group, added patch 2016-08-05 15:09:49 +05:30
Nabin Hait
e1d85f2467 Payment Entry fix: Unallocated amount in payment entry considering deductions 2016-08-05 14:51:36 +05:30
Umair Sayyed
3962cded76 updated docs 2016-08-04 19:01:02 +05:30
Umair Sayyed
66360f694e updated docs 2016-08-04 19:01:02 +05:30
Umair Sayyed
5dba950afa docs update 2016-08-04 19:01:02 +05:30
Umair Sayyed
6a3f51bee2 updated docs 2016-08-04 19:01:02 +05:30
Rushabh Mehta
efe1ab742f [minor] fixes for demo 2016-08-04 17:29:46 +05:30
Rushabh Mehta
4d32d5301a Merge pull request #5996 from KanchanChauhan/users-selection-for-project
'Project Users' role not required to add user to the project
2016-08-04 14:25:52 +05:30
Kanchan Chauhan
58bc00f954 Project Users role not required to add user to the project 2016-08-04 14:21:20 +05:30
Nabin Hait
155074479b Merge pull request #5986 from nabinhait/pe_fix_101
Set received amount based on paid amount if currency is same
2016-08-03 17:54:01 +05:30
Nabin Hait
fa1775b6a6 Merge pull request #5988 from nabinhait/item_route
default material request type field restored in item
2016-08-03 17:53:11 +05:30
Nabin Hait
764e6ef210 default material request type field restored in item 2016-08-03 17:32:26 +05:30
Rushabh Mehta
f2d89987f5 [minor] ignore email validation if comes from email; 2016-08-03 16:42:29 +05:30
Rushabh Mehta
06c92a782a [fix] small text for route 2016-08-03 16:27:11 +05:30
Nabin Hait
f43e49f378 Set received amount based on paid amount if currency is same 2016-08-03 14:17:05 +05:30
Rushabh Mehta
ea5ad84c5e [minor] fix image for demo 2016-08-02 21:26:04 +05:30
Nabin Hait
46f328cbda Merge branch 'develop' 2016-08-02 18:07:53 +05:30
Nabin Hait
1b9a01b6c3 bumped to version 7.0.18 2016-08-02 18:37:52 +06:00
Nabin Hait
e8ab7b8898 Merge pull request #5976 from nabinhait/patch_fix_109
[patch] Set default material request type in Item based on default bom
2016-08-02 18:05:03 +05:30
Nabin Hait
ae921ce2c8 [patch] Set default material request type in Item based on default bom 2016-08-02 18:02:31 +05:30
Nabin Hait
b77ad7c31d Merge branch 'develop' 2016-08-02 17:16:46 +05:30
Nabin Hait
cc13a9f2f6 bumped to version 7.0.17 2016-08-02 17:46:46 +06:00
Nabin Hait
97c74f9f8f Merge pull request #5925 from rohitwaghchaure/bcornwellmott-1
PPT looks at default MR type in Item to set MR type.
2016-08-02 17:15:02 +05:30
Nabin Hait
e1e6468b33 Merge pull request #5974 from nabinhait/pos_change_amount
Change amount calcualtion in POS if there is write off amount and gl entries in this scenario
2016-08-02 17:14:50 +05:30
Nabin Hait
6620e2a494 Test case fixed for pos gl entry 2016-08-02 17:14:28 +05:30
Rohit Waghchaure
08aadb853c PPT looks at default MR type in Item to set MR type. 2016-08-02 16:59:03 +05:30
Nabin Hait
3bb1a421f0 Change amount calcualtion in POS if there is write off amount and gl entries in this scenario 2016-08-02 16:41:15 +05:30
Nabin Hait
afc0bbc8ff Merge pull request #5964 from frappe/neilLasrado-patch-1-1
Fixes for patch - make_guardian.py
2016-08-02 11:30:45 +05:30
Nabin Hait
8869430a81 Merge pull request #5967 from rohitwaghchaure/minor_fix
minor fix in payment entry
2016-08-02 11:29:48 +05:30
Rohit Waghchaure
7f031d1bfd minor fix in payment entry 2016-08-02 11:07:40 +05:30
Rushabh Mehta
5b1ebc5c54 Merge pull request #5933 from shreyasp/erpnext/update-travis
[Minor] Updated the travis.yml to use latest bench installer for erpnext
2016-08-02 10:44:39 +05:30
Neil Trini Lasrado
5bb2f56b47 Update make_guardian.py 2016-08-02 00:01:00 +05:30
Nabin Hait
1e3e6865ce Merge branch 'develop' 2016-08-01 18:07:21 +05:30
Nabin Hait
94542e104c bumped to version 7.0.16 2016-08-01 18:37:20 +06:00
Nabin Hait
90bf69aa52 Merge pull request #5957 from nabinhait/guardian_patch_fix
[patch] reload guardian interest
2016-08-01 18:05:33 +05:30
Nabin Hait
3b8109780f [patch] reload guardian interest 2016-08-01 17:59:46 +05:30
Nabin Hait
f863055b91 Merge pull request #5955 from umairsy/28jul
added documentation for the new features
2016-08-01 17:53:26 +05:30
Nabin Hait
3aac12d56b Merge branch 'develop' 2016-08-01 17:48:28 +05:30
Nabin Hait
ed75667f64 bumped to version 7.0.15 2016-08-01 18:18:27 +06:00
Nabin Hait
16a0fef759 Merge pull request #5956 from nabinhait/guardian_patch_fix
[patch] fixed reload doc and permission issue in guardian patch
2016-08-01 17:47:48 +05:30
Nabin Hait
08aec855c4 [patch] fixed reload doc and permission issue in guardian patch 2016-08-01 17:46:56 +05:30
Umair Sayyed
e96b3ce725 added documentation for the new features 2016-08-01 17:42:30 +05:30
shreyas
60e9f84c8a [Minor] Updated the travis.yml to use new installer for erpnext 2016-08-01 17:40:20 +05:30
Nabin Hait
1ffa76ba5c Merge branch 'develop' 2016-08-01 17:35:02 +05:30
Nabin Hait
798f3897a3 bumped to version 7.0.14 2016-08-01 18:05:02 +06:00
Nabin Hait
e810ea3a2f Merge pull request #5954 from nabinhait/guardian_patch_fix
Run guardian patch only if student doctype exists and there is father_name column
2016-08-01 17:33:51 +05:30
Nabin Hait
29a8a93aa1 Run guardian patch only if student doctype exists and there is father_name column 2016-08-01 17:31:17 +05:30
Nabin Hait
53133dbd4d Merge branch 'develop' 2016-08-01 16:24:53 +05:30
Nabin Hait
cd339b2ecf bumped to version 7.0.13 2016-08-01 16:54:53 +06:00
Nabin Hait
c9d04ab1fc Merge pull request #5952 from nabinhait/lcv_reference
[patch] Update refdoc in Landed Cost Voucher
2016-08-01 16:23:33 +05:30
Nabin Hait
6f84026c24 Merge pull request #5951 from nabinhait/patch_fix_104
[patch] Reload RFQ and timesheet before removing customer/supplier roles
2016-08-01 16:15:47 +05:30
Rushabh Mehta
24f45af27e [fix] minor dont make lead for invalid email 2016-08-01 16:07:56 +05:30
Nabin Hait
3c364dd5b8 [patch] Update refdoc in Landed Cost Voucher 2016-08-01 15:53:36 +05:30
Rushabh Mehta
185110159e Merge pull request #5828 from neilLasrado/guardian
Added Guardian
2016-08-01 15:36:48 +05:30
Nabin Hait
5940dc1a8e [patch] Reload RFQ and timesheet before removing customer/supplier roles 2016-08-01 15:30:44 +05:30
Neil Trini Lasrado
3e78558357 Moved Intrest to HR module 2016-08-01 15:18:36 +05:30
Neil Trini Lasrado
74dbd168c2 [new Feature] Added guardian master 2016-08-01 15:08:04 +05:30
Nabin Hait
1d7bd0efb8 Merge branch 'develop' 2016-08-01 14:12:47 +05:30
Nabin Hait
de745e1df6 bumped to version 7.0.12 2016-08-01 14:42:47 +06:00
Nabin Hait
77dd190cc8 Merge pull request #5939 from rohitwaghchaure/pos_batch_no_fixes
[Fix] batch no searching in pos & minor fixes
2016-08-01 13:17:00 +05:30
Nabin Hait
ddde4bec39 Merge pull request #5932 from rohitwaghchaure/demo_records
[demo] sales and purchase returns
2016-08-01 13:11:54 +05:30
Nabin Hait
9ed1891440 Merge pull request #5931 from neilLasrado/student-log
[new feature] Added Student Log
2016-08-01 13:10:19 +05:30
Nabin Hait
dfcf55d010 Merge pull request #5948 from nabinhait/department_role
Assigned permissions for Academic User role in Department
2016-08-01 13:07:02 +05:30
Nabin Hait
66126ffc7a Merge pull request #5938 from nabinhait/salary_renaming
Delete old salary earning and deduction doctypes
2016-08-01 13:06:52 +05:30
Nabin Hait
7c52d09dc2 Merge pull request #5947 from nabinhait/patch_order_fix
Changed the order of the patch
2016-08-01 13:06:13 +05:30
Rohit Waghchaure
a88dec8775 [Fix] batch no searching in pos 2016-08-01 13:01:13 +05:30
Nabin Hait
86a477d07e Assigned permissions for Academic User role in Department 2016-08-01 12:51:04 +05:30
Nabin Hait
bc691dccba Changed the order of the patch 2016-08-01 12:36:28 +05:30
Nabin Hait
e9674f8866 Create columns for custom fields in new table Salary Detail and Component 2016-08-01 12:13:11 +05:30
Nabin Hait
84306ccc4c Salary component fixtures 2016-08-01 11:54:19 +05:30
Nabin Hait
feed313a66 Delete old salary earning and deduction doctypes 2016-08-01 11:54:19 +05:30
Rushabh Mehta
62658fde45 Merge pull request #5941 from nabinhait/link_formatter
minor fix for item and employee link formatter
2016-08-01 10:28:48 +05:30
Nabin Hait
981f6ea34e minor fix for item and employee link formatter 2016-07-31 11:44:43 +05:30
Nabin Hait
ba1c34eef3 Merge pull request #5919 from bcornwellmott/timesheet_dates
Timesheets update on date changes in Salary Slip
2016-07-29 20:31:01 +05:30
Rushabh Mehta
3e001b5fac Merge branch 'develop' 2016-07-29 18:55:48 +05:30
Rushabh Mehta
6201068f8f bumped to version 7.0.11 2016-07-29 19:25:48 +06:00
Rushabh Mehta
9421a109cf [fix] reports template 2016-07-29 18:52:00 +05:30
Rushabh Mehta
26005c25b2 [minor] fix filter for item-code 2016-07-29 18:52:00 +05:30
Rushabh Mehta
180e43585f [minor] formatter for item and employee 2016-07-29 18:52:00 +05:30
Rohit Waghchaure
05cc36a864 [demo] sales and purchase returns 2016-07-29 18:26:02 +05:30
Neil Trini Lasrado
1e5c251ce2 [new feature] Added Student Log 2016-07-29 17:05:49 +05:30
Nabin Hait
95c2ba9736 Merge pull request #5901 from bcornwellmott/fix_employee_lookup
Fix Timesheet employee query to show names
2016-07-29 16:28:18 +05:30
Nabin Hait
69e0441041 Merge pull request #5930 from KanchanChauhan/demo-data-for-leave-attendance
Demo data for Leave Allocation, Leave Application and Attendance
2016-07-29 16:20:29 +05:30
Kanchan Chauhan
db0e57cdce Demo data for Leave Allocation, Leave Application and Attendance 2016-07-29 15:59:39 +05:30
Rushabh Mehta
51a593b0b5 Merge pull request #5918 from revant/patch-1
[Docs] changed path to login
2016-07-29 07:50:55 +05:30
Revant Nandgaonkar
cc8fb1a8d6 changed path to login
frappe.templates.pages.login.login_via_google changed to frappe.www.login.login_via_google
2016-07-28 19:50:15 +05:30
Nabin Hait
1892520324 Merge branch 'develop' 2016-07-28 18:26:23 +05:30
Nabin Hait
3bf486c5c6 bumped to version 7.0.10 2016-07-28 18:56:23 +06:00
Nabin Hait
6b8024a834 Merge pull request #5909 from nabinhait/fix_113
[fix] Show supplier name field if it is different from supplier id
2016-07-28 17:52:02 +05:30
Nabin Hait
33b10a0405 Merge pull request #5908 from nabinhait/pe_precision_fix
Set difference amount in Payment Entry as per field precision
2016-07-28 17:51:57 +05:30
Nabin Hait
7bae70a993 [fix] Show supplier name field if it is different from supplier id 2016-07-28 17:19:35 +05:30
Nabin Hait
e7d0639edc Set difference amount in Payment Entry as per field precision 2016-07-28 16:56:59 +05:30
Nabin Hait
0d5e208f8c Merge branch 'develop' 2016-07-28 16:01:00 +05:30
Nabin Hait
a163299991 bumped to version 7.0.9 2016-07-28 16:31:00 +06:00
Nabin Hait
acff41ddd2 Merge pull request #5906 from nabinhait/opportunity_status_fix
Added converted status in Opportunity
2016-07-28 15:59:43 +05:30
Nabin Hait
e72ff9377a Added converted status in Opportunity 2016-07-28 15:59:20 +05:30
Nabin Hait
a948407460 Merge branch 'develop' 2016-07-28 15:46:36 +05:30
Nabin Hait
ee70f26131 bumped to version 7.0.8 2016-07-28 16:16:35 +06:00
Rushabh Mehta
142b6187b3 Merge pull request #5902 from akshay83/develop
[fix] serial no button
2016-07-28 15:05:04 +05:30
akshay
14384c2787 [fix] serial no button 2016-07-28 13:53:17 +05:30
Nabin Hait
7357902802 Merge pull request #5896 from nabinhait/fix_112
[fix] repost gle only if there is any stock account without warehouse
2016-07-27 17:34:23 +05:30
Nabin Hait
fa97b3cac7 [fix] repost gle only if there is any stock account without warehouse 2016-07-27 17:33:32 +05:30
Nabin Hait
95f53cca44 Merge pull request #5885 from nabinhait/payment_entry_fix12
[fix] Set amounts only if party and bank account exists
2016-07-27 16:45:20 +05:30
Nabin Hait
949ceb18fc Merge pull request #5894 from nabinhait/sle_fix_101
minor fix for stock ledger entry
2016-07-27 16:44:54 +05:30
Nabin Hait
7590b8fff1 minor fix for stock ledger entry 2016-07-27 16:44:26 +05:30
Rushabh Mehta
5a8b7ca7be Merge pull request #5888 from neilLasrado/develop
[Patch] Change status in Opportunity to Quotation where status is converted
2016-07-27 16:03:21 +05:30
Neil Trini Lasrado
98151ce5b2 [Patch] Change status in Opportunity to Quotation where status is converted 2016-07-27 15:58:16 +05:30
Rushabh Mehta
380dbb044f Merge pull request #5886 from neilLasrado/develop
[Fix] Fixed issues in Fee records
2016-07-27 15:32:26 +05:30
Neil Trini Lasrado
ee75d41da0 [Fix] Fixed issues in Fee records 2016-07-27 15:23:19 +05:30
Rushabh Mehta
e26a42dc7a Merge branch 'develop' 2016-07-27 15:19:58 +05:30
Rushabh Mehta
b2c9848886 bumped to version 7.0.7 2016-07-27 15:49:58 +06:00
Nabin Hait
b4bf757a15 Update fix_nonwarehouse_ledger_gl_entries_for_transactions.py 2016-07-27 15:19:12 +05:30
Rushabh Mehta
fc49c2c5f9 Merge branch 'develop' 2016-07-27 15:09:03 +05:30
Rushabh Mehta
384f0b18c0 bumped to version 7.0.6 2016-07-27 15:39:03 +06:00
Nabin Hait
2a2346422d [fix] Set amounts only if party and bank account exists 2016-07-27 13:08:00 +05:30
Rushabh Mehta
548ea777a9 Merge pull request #5883 from saurabh6790/maintenance_schedule_fix
[fix] report filter fix
2016-07-27 12:43:41 +05:30
Nabin Hait
67047fbb06 Merge branch 'rohitwaghchaure-warehouse_blank_issue_for_non_stock_account' into develop 2016-07-27 12:43:25 +05:30
Nabin Hait
10007ab4df [fix] reposting of gle where stock account not linked with warehouse 2016-07-27 12:43:02 +05:30
Nabin Hait
444bedcd20 Merge branch 'warehouse_blank_issue_for_non_stock_account' of https://github.com/rohitwaghchaure/erpnext_develop into rohitwaghchaure-warehouse_blank_issue_for_non_stock_account 2016-07-27 12:33:10 +05:30
Rushabh Mehta
2af5dfa9cc Merge pull request #5884 from saurabh6790/schools_fix
[minor][fix] rename attribute from amount to components
2016-07-27 12:23:22 +05:30
Saurabh
4bc0f7d105 [minor][fix] rename attribute from amount to components 2016-07-27 12:10:21 +05:30
Saurabh
3642f987c7 [fix] report filter fix 2016-07-27 11:42:50 +05:30
Ben Cornwell-Mott
07e5758a94 Timesheets update on date changes in Salary Slip 2016-07-26 21:00:43 -07:00
Ben Cornwell-Mott
e326ae95ef Fixed typo 2016-07-26 19:55:09 -07:00
bcornwellmott
5f59a0a00f Corrected SQL query 2016-07-28 06:56:20 -07:00
Rushabh Mehta
fd288f36ec Merge pull request #5880 from bcornwellmott/fixSalarySlip_TimeSheet_SQL
Added date filters for the Timesheet query in Salary Slip
2016-07-27 08:22:29 +05:30
Ben Cornwell-Mott
19cb34ce40 removed test variable 2016-07-26 13:48:36 -07:00
Ben Cornwell-Mott
5342ec5055 Added employee name to get_employee_list query 2016-07-26 13:47:55 -07:00
Rushabh Mehta
593d2e3146 Merge pull request #5877 from rohitwaghchaure/v7_fixes
[minor] Fixes
2016-07-26 21:21:45 +05:30
Rohit Waghchaure
c4afd63e50 [minor] Fixes 2016-07-26 20:47:42 +05:30
Rushabh Mehta
6fe4a336f1 Merge branch 'develop' 2016-07-26 18:02:38 +05:30
Rushabh Mehta
154be9b693 bumped to version 7.0.5 2016-07-26 18:32:38 +06:00
Rushabh Mehta
d46235ed83 Merge pull request #5874 from saurabh6790/maintenance_schedule_fix
[minor][fix] end date should not be less or equal to start date
2016-07-26 17:44:42 +05:30
Saurabh
17a9940f00 [minor][fix] end date should not be less or equal to start date 2016-07-26 17:18:45 +05:30
Rohit Waghchaure
4d3e8da4a2 [Fix] Set warehouse to stock account and fixed gl entries against transactions. 2016-07-26 17:09:33 +05:30
Ben Cornwell-Mott
d4d1f1b036 Added date filters for the Timesheet query in Salary Slip 2016-07-26 03:33:38 -07:00
Rushabh Mehta
9b542f303c Merge pull request #5870 from saurabh6790/fee_component_patch_fix
[fix] fee component rename patch fix
2016-07-26 15:06:56 +05:30
Saurabh
21a5658fdf [fix] fee component rename patch fix 2016-07-26 15:03:41 +05:30
Rushabh Mehta
0540d52449 Merge pull request #5868 from rohitwaghchaure/patch_issue
[Fix] Timesheet patch
2016-07-26 12:59:00 +05:30
Rohit Waghchaure
8a9daece7e [Fix] Timesheet patch 2016-07-26 12:57:05 +05:30
Rushabh Mehta
c85aa3d9c5 Merge branch 'develop' 2016-07-26 09:24:00 +05:30
Rushabh Mehta
5662ad6d96 bumped to version 7.0.4 2016-07-26 09:54:00 +06:00
Rushabh Mehta
859843687e [minor] add abbr if missing 2016-07-26 08:23:32 +05:30
Rushabh Mehta
40cf3db0b1 Merge pull request #5865 from rohitwaghchaure/v7_fixes_and_cleanup
[mionr] fixes and cleanups
2016-07-26 07:58:03 +05:30
Ben Cornwell-Mott
590d2d524b Updated html file to use c3.js instead of Google Charts 2016-07-25 18:03:01 -07:00
Rohit Waghchaure
26cf01aaba [mionr] fixes and cleanups 2016-07-26 00:30:25 +05:30
Rushabh Mehta
eac602304c Merge pull request #5864 from neilLasrado/rename
[rename] Renamed Fee Amount to Fee Component
2016-07-25 18:37:09 +05:30
Neil Trini Lasrado
ce1c63f776 [rename] Renamed Fee Amount to Fee Component 2016-07-25 18:24:37 +05:30
Rushabh Mehta
95b550dd8f Merge pull request #5862 from neilLasrado/rename
Renamed sg_creation_tool_course to Student Group Creation Tool Course
2016-07-25 16:21:32 +05:30
Rushabh Mehta
bb78f1ac16 Merge pull request #5861 from neilLasrado/develop
[Fix] fixed test cases for schools
2016-07-25 16:21:18 +05:30
Neil Trini Lasrado
feea2e3dec [Doctype Rename] Renamed sg_creation_tool_course to Student Group Creation Tool Course 2016-07-25 16:13:05 +05:30
Neil Trini Lasrado
7dae3e1ed4 [Fix] fixed test cases for schools 2016-07-25 15:55:31 +05:30
Rushabh Mehta
5658fdfaed Merge branch 'develop' 2016-07-25 15:45:46 +05:30
Rushabh Mehta
1c93dd0591 bumped to version 7.0.3 2016-07-25 16:15:46 +06:00
Rushabh Mehta
c910e0c614 [translations] update icenlandic 2016-07-25 15:03:39 +05:30
Rushabh Mehta
6c3ac9587e [fix] quick entry 2016-07-25 15:03:39 +05:30
Rushabh Mehta
316f78f859 Merge pull request #5858 from bohlian/develop
[Fixed] Stopping and Re-Opening of Production Order
2016-07-25 14:24:16 +05:30
Javier Wong
5b2af6ad40 [Fixed] Stopping and Re-Opening of Production Order 2016-07-25 16:49:39 +08:00
Ben Cornwell-Mott
fe11e71084 Removed hover tooltip 2016-07-22 10:02:41 -07:00
Ben Cornwell-Mott
2c76aec119 Added Google Chart to compare quotes in Print view 2016-07-22 09:56:29 -07:00
470 changed files with 8879 additions and 2593 deletions

View File

@@ -1,4 +1,5 @@
language: python
dist: trusty
python:
- "2.7"
@@ -11,10 +12,14 @@ before_install:
- "sh -e /etc/init.d/xvfb start"
install:
- sudo apt-get purge -y mysql-common
- wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
- sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop
- sudo pip install --upgrade pip
- sudo apt-get purge -y mysql-common mysql-server mysql-client
# - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
# - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
- sudo python install.py --develop --user travis --without-bench-setup
- sudo pip install -e ~/bench
# - sudo pip install --upgrade pip
- rm $TRAVIS_BUILD_DIR/.git/shallow
- bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
- cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
@@ -30,7 +35,7 @@ script:
- bench --verbose run-tests --driver Firefox
before_script:
- mysql -e 'create database test_frappe'
- mysql -u root -ptravis -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis

View File

@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '7.0.2'
__version__ = '7.0.39'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -47,7 +47,7 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(__('Chart of Accounts'),
function() { frappe.set_route("Tree", "Account"); }, __("View"))
function() { frappe.set_route("Tree", "Account"); });
if (doc.is_group == 1) {
cur_frm.add_custom_button(__('Group to Non-Group'),
@@ -61,7 +61,7 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
"company": doc.company
};
frappe.set_route("query-report", "General Ledger");
}, __("View"));
});
cur_frm.add_custom_button(__('Non-Group to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')

View File

@@ -18,7 +18,8 @@ frappe.ui.form.on('Asset', {
frm.set_query("warehouse", function() {
return {
"filters": {
"company": frm.doc.company
"company": frm.doc.company,
"is_group": 0
}
};
});
@@ -232,7 +233,10 @@ erpnext.asset.transfer_asset = function(frm) {
"options": "Warehouse",
"get_query": function () {
return {
filters: [["Warehouse", "company", "in", ["", cstr(frm.doc.company)]]]
filters: [
["Warehouse", "company", "in", ["", cstr(frm.doc.company)]],
["Warehouse", "is_group", "=", 0]
]
}
},
"reqd": 1

View File

@@ -7,7 +7,10 @@ frappe.ui.form.on('Asset Movement', {
frm.set_query("target_warehouse", function() {
return {
filters: [["Warehouse", "company", "in", ["", cstr(frm.doc.company)]]]
filters: [
["Warehouse", "company", "in", ["", cstr(frm.doc.company)]],
["Warehouse", "is_group", "=", 0]
]
}
})

View File

@@ -8,6 +8,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
@@ -65,24 +66,24 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "monthly_distribution",
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Monthly Distribution",
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Monthly Distribution",
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -170,24 +171,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"depends_on": "eval:in_list([\"Stop\", \"Warn\"], doc.action_if_accumulated_monthly_budget_exceeded)",
"fieldname": "monthly_distribution",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"label": "Monthly Distribution",
"length": 0,
"no_copy": 0,
"options": "Company",
"options": "Monthly Distribution",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -271,13 +273,14 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-05-16 15:00:40.233685",
"modified": "2016-08-18 14:46:02.653081",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",

View File

@@ -5,7 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, getdate, add_months, get_last_day
from frappe.utils import flt, getdate, add_months, get_last_day, fmt_money
from frappe.model.naming import make_autoname
from frappe.model.document import Document
@@ -73,25 +73,30 @@ def validate_expense_against_budget(args):
args.posting_date, args.fiscal_year, budget.budget_amount)
args["month_end_date"] = get_last_day(args.posting_date)
compare_expense_with_budget(args, budget.cost_center,
budget_amount, _("Accumulated Monthly"), monthly_action)
elif yearly_action in ["Stop", "Warn"]:
compare_expense_with_budget(args, budget.cost_center,
flt(budget.budget_amount), _("Annual"), yearly_action)
if yearly_action in ("Stop", "Warn") and monthly_action != "Stop" \
and yearly_action != monthly_action:
compare_expense_with_budget(args, budget.cost_center,
flt(budget.budget_amount), _("Annual"), yearly_action)
def compare_expense_with_budget(args, cost_center, budget_amount, action_for, action):
actual_expense = get_actual_expense(args, cost_center)
if actual_expense > budget_amount:
diff = actual_expense - budget_amount
currency = frappe.db.get_value('Company', frappe.db.get_value('Cost Center',
cost_center, 'company'), 'default_currency')
msg = _("{0} Budget for Account {1} against Cost Center {2} is {3}. It will exceed by {4}").format(_(action_for), args.account, cost_center, budget_amount, diff)
msg = _("{0} Budget for Account {1} against Cost Center {2} is {3}. It will exceed by {4}").format(_(action_for),
frappe.bold(args.account), frappe.bold(cost_center),
frappe.bold(fmt_money(budget_amount, currency=currency)), frappe.bold(fmt_money(diff, currency=currency)))
if action=="Stop":
frappe.throw(msg, BudgetError)
else:
frappe.msgprint(msg)
frappe.msgprint(msg, indicator='orange')
def get_accumulated_monthly_budget(monthly_distribution, posting_date, fiscal_year, annual_budget):
distribution = {}

View File

@@ -43,7 +43,7 @@ def create_or_update_cheque_print_format(template_name):
</span>
<span style="top:%(payer_name_from_top_edge)scm;left: %(payer_name_from_left_edge)scm;
position: absolute;">
{{doc.party}}
{{doc.party_name}}
</span>
<span style="top:%(amt_in_words_from_top_edge)scm; left:%(amt_in_words_from_left_edge)scm;
position: absolute; display: block; width: %(amt_in_word_width)scm;

View File

@@ -32,8 +32,13 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_display('sb1', doc.is_group==0)
cur_frm.set_intro(intro_txt);
cur_frm.add_custom_button(__('Chart of Cost Centers'),
function() { frappe.set_route("Tree", "Cost Center"); }, __("View"))
if(!cur_frm.doc.__islocal) {
cur_frm.add_custom_button(__('Chart of Cost Centers'),
function() { frappe.set_route("Tree", "Cost Center"); });
cur_frm.add_custom_button(__('Budget'),
function() { frappe.set_route("List", "Budget", {'cost_center': cur_frm.doc.name}); });
}
}
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {

View File

@@ -772,6 +772,9 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
company_currency = get_company_currency(company)
account_details = frappe.db.get_value("Account", account, ["account_type", "account_currency"], as_dict=1)
if not account_details:
return
if account_details.account_type == "Receivable":
party_type = "Customer"
elif account_details.account_type == "Payable":

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
{% include "erpnext/public/js/controllers/accounts.js" %}
frappe.ui.form.on('Payment Entry', {
onload: function(frm) {
@@ -95,13 +96,13 @@ frappe.ui.form.on('Payment Entry', {
frm.doc.paid_to_account_currency != company_currency &&
frm.doc.paid_from_account_currency != frm.doc.paid_to_account_currency));
frm.toggle_display("base_paid_amount", frm.doc.paid_from_account_currency != company_currency);
frm.toggle_display("base_paid_amount", frm.doc.paid_from_account_currency != company_currency);
frm.toggle_display("base_received_amount", (frm.doc.paid_to_account_currency != company_currency &&
frm.doc.paid_from_account_currency != frm.doc.paid_to_account_currency));
frm.toggle_display("received_amount",
frm.doc.paid_from_account_currency != frm.doc.paid_to_account_currency)
frm.toggle_display("received_amount", (frm.doc.payment_type=="Internal Transfer" ||
frm.doc.paid_from_account_currency != frm.doc.paid_to_account_currency))
frm.toggle_display(["base_total_allocated_amount"],
(frm.doc.paid_amount && frm.doc.received_amount && frm.doc.base_total_allocated_amount &&
@@ -225,6 +226,12 @@ frappe.ui.form.on('Payment Entry', {
party: function(frm) {
if(frm.doc.payment_type && frm.doc.party_type && frm.doc.party) {
if(!frm.doc.posting_date) {
frappe.msgprint(__("Please select Posting Date before selecting Party"))
frm.set_value("party", "");
return ;
}
frm.set_party_account_based_on_party = true;
return frappe.call({
@@ -257,22 +264,6 @@ frappe.ui.form.on('Payment Entry', {
}
},
mode_of_payment: function(frm) {
return frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
args: {
"mode_of_payment": frm.doc.mode_of_payment,
"company": frm.doc.company
},
callback: function(r, rt) {
if(r.message) {
var payment_account_field = frm.doc.payment_type == "Receive" ? "paid_to" : "paid_from";
frm.set_value(payment_account_field, r.message['account']);
}
}
});
},
paid_from: function(frm) {
if(frm.set_party_account_based_on_party) return;
@@ -414,10 +405,7 @@ frappe.ui.form.on('Payment Entry', {
paid_amount: function(frm) {
frm.set_value("base_paid_amount", flt(frm.doc.paid_amount) * flt(frm.doc.source_exchange_rate));
frm.trigger("reset_received_amount");
frm.set_paid_amount_based_on_received_amount = false;
},
received_amount: function(frm) {
@@ -436,22 +424,19 @@ frappe.ui.form.on('Payment Entry', {
frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount);
else
frm.events.set_difference_amount(frm);
frm.set_paid_amount_based_on_received_amount = false;
},
reset_received_amount: function(frm) {
if(!frm.set_paid_amount_based_on_received_amount &&
(frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency)) {
// var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
// function(d) { return d.amount}));
//
// var received_amount = frm.doc.paid_amount +
// flt(total_deductions) / flt(frm.doc.source_exchange_rate);
//
frm.set_value("received_amount", frm.doc.paid_amount);
frm.set_value("target_exchange_rate", frm.doc.source_exchange_rate);
frm.set_value("base_received_amount", frm.doc.base_paid_amount);
}
if(frm.doc.payment_type == "Receive")
frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.paid_amount);
else
@@ -607,11 +592,18 @@ frappe.ui.form.on('Payment Entry', {
if(frm.doc.party) {
var party_amount = frm.doc.payment_type=="Receive" ?
frm.doc.paid_amount : frm.doc.received_amount;
var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
function(d) { return flt(d.amount) }));
if(frm.doc.total_allocated_amount < party_amount)
unallocated_amount = party_amount - frm.doc.total_allocated_amount;
if(frm.doc.total_allocated_amount < party_amount) {
if(frm.doc.payment_type == "Receive") {
unallocated_amount = party_amount - (frm.doc.total_allocated_amount - total_deductions);
} else {
unallocated_amount = party_amount - (frm.doc.total_allocated_amount + total_deductions);
}
}
}
frm.set_value("unallocated_amount", unallocated_amount);
var difference_amount = 0;

View File

@@ -15,6 +15,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "type_of_payment",
"fieldtype": "Section Break",
"hidden": 0,
@@ -40,6 +41,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
@@ -66,13 +68,14 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_list_view": 1,
"label": "Payment Type",
"length": 0,
"no_copy": 0,
@@ -92,6 +95,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
"fieldname": "party_type",
"fieldtype": "Select",
@@ -119,6 +123,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"fieldname": "party",
"fieldtype": "Dynamic Link",
@@ -146,6 +151,33 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "party_name",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Party Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_5",
"fieldtype": "Column Break",
"hidden": 0,
@@ -170,6 +202,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"default": "Today",
"fieldname": "posting_date",
"fieldtype": "Date",
@@ -196,6 +229,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
@@ -222,6 +256,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"hidden": 0,
@@ -248,6 +283,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"columns": 0,
"fieldname": "payment_accounts_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -273,6 +309,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "party",
"fieldname": "party_balance",
"fieldtype": "Currency",
@@ -299,6 +336,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(in_list([\"Internal Transfer\", \"Pay\"], doc.payment_type) || doc.party)",
"fieldname": "paid_from",
"fieldtype": "Link",
@@ -326,6 +364,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "paid_from",
"fieldname": "paid_from_account_currency",
"fieldtype": "Link",
@@ -353,6 +392,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "paid_from",
"fieldname": "paid_from_account_balance",
"fieldtype": "Currency",
@@ -380,6 +420,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_18",
"fieldtype": "Column Break",
"hidden": 0,
@@ -404,6 +445,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(in_list([\"Internal Transfer\", \"Receive\"], doc.payment_type) || doc.party)",
"fieldname": "paid_to",
"fieldtype": "Link",
@@ -431,6 +473,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "paid_to",
"fieldname": "paid_to_account_currency",
"fieldtype": "Link",
@@ -458,6 +501,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "paid_to",
"fieldname": "paid_to_account_balance",
"fieldtype": "Currency",
@@ -486,6 +530,7 @@
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": "",
"columns": 0,
"depends_on": "eval:(doc.paid_to && doc.paid_from)",
"fieldname": "payment_amounts_section",
"fieldtype": "Section Break",
@@ -512,6 +557,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "paid_amount",
"fieldtype": "Currency",
@@ -539,6 +585,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "source_exchange_rate",
"fieldtype": "Float",
@@ -565,6 +612,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "base_paid_amount",
"fieldtype": "Currency",
@@ -592,6 +640,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_21",
"fieldtype": "Column Break",
"hidden": 0,
@@ -616,6 +665,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "received_amount",
"fieldtype": "Currency",
@@ -643,6 +693,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "target_exchange_rate",
"fieldtype": "Float",
@@ -669,6 +720,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "base_received_amount",
"fieldtype": "Currency",
@@ -697,6 +749,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "references",
"columns": 0,
"depends_on": "eval:(doc.party && doc.paid_from && doc.paid_to && doc.paid_amount && doc.received_amount)",
"fieldname": "section_break_14",
"fieldtype": "Section Break",
@@ -723,6 +776,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "references",
"fieldtype": "Table",
@@ -750,6 +804,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "section_break_34",
"fieldtype": "Section Break",
@@ -776,6 +831,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(doc.paid_amount && doc.received_amount && doc.references)",
"fieldname": "total_allocated_amount",
"fieldtype": "Currency",
@@ -802,6 +858,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "base_total_allocated_amount",
"fieldtype": "Currency",
@@ -829,6 +886,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "set_exchange_gain_loss",
"fieldtype": "Button",
"hidden": 0,
@@ -854,6 +912,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_36",
"fieldtype": "Column Break",
"hidden": 0,
@@ -878,6 +937,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(doc.paid_amount && doc.received_amount && doc.references)",
"fieldname": "unallocated_amount",
"fieldtype": "Currency",
@@ -904,6 +964,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(doc.paid_amount && doc.received_amount)",
"fieldname": "difference_amount",
"fieldtype": "Currency",
@@ -931,6 +992,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "difference_amount",
"fieldname": "write_off_difference_amount",
"fieldtype": "Button",
@@ -958,6 +1020,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "deductions",
"columns": 0,
"depends_on": "eval:(doc.paid_amount && doc.received_amount)",
"fieldname": "deductions_or_loss_section",
"fieldtype": "Section Break",
@@ -984,6 +1047,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "deductions",
"fieldtype": "Table",
"hidden": 0,
@@ -1010,6 +1074,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "transaction_references",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1035,6 +1100,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(doc.paid_from && doc.paid_to)",
"fieldname": "reference_no",
"fieldtype": "Data",
@@ -1061,6 +1127,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_23",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1085,6 +1152,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(doc.paid_from && doc.paid_to)",
"fieldname": "reference_date",
"fieldtype": "Date",
@@ -1111,6 +1179,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.docstatus==1",
"fieldname": "clearance_date",
"fieldtype": "Date",
@@ -1138,6 +1207,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "",
"columns": 0,
"depends_on": "eval:(doc.paid_from && doc.paid_to && doc.paid_amount && doc.received_amount)",
"fieldname": "section_break_12",
"fieldtype": "Section Break",
@@ -1164,6 +1234,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "project",
"fieldtype": "Link",
@@ -1191,6 +1262,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "remarks",
"fieldtype": "Small Text",
"hidden": 0,
@@ -1216,6 +1288,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_16",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1240,6 +1313,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
@@ -1266,6 +1340,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "print_heading",
"fieldtype": "Link",
"hidden": 0,
@@ -1292,6 +1367,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -1317,6 +1393,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
@@ -1349,8 +1426,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-07-11 08:06:33.121527",
"modified_by": "NuranVerkleij@example.com",
"modified": "2016-09-05 11:06:18.183458",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
"name_case": "",

View File

@@ -73,6 +73,9 @@ class PaymentEntry(AccountsController):
if not self.party:
frappe.throw(_("Party is mandatory"))
self.party_name = frappe.db.get_value(self.party_type, self.party,
self.party_type.lower() + "_name")
if self.party:
if not self.party_balance:
@@ -247,12 +250,17 @@ class PaymentEntry(AccountsController):
if self.party:
party_amount = self.paid_amount if self.payment_type=="Receive" else self.received_amount
total_deductions = sum([flt(d.amount) for d in self.get("deductions")])
if self.total_allocated_amount < party_amount:
self.unallocated_amount = party_amount - self.total_allocated_amount
if self.payment_type == "Receive":
self.unallocated_amount = party_amount - (self.total_allocated_amount - total_deductions)
else:
self.unallocated_amount = party_amount - (self.total_allocated_amount + total_deductions)
def set_difference_amount(self):
base_unallocated_amount = flt(self.unallocated_amount) * \
(self.source_exchange_rate if self.payment_type=="Receive" else self.target_exchange_rate)
base_unallocated_amount = flt(self.unallocated_amount) * (flt(self.source_exchange_rate)
if self.payment_type=="Receive" else flt(self.target_exchange_rate))
base_party_amount = flt(self.base_total_allocated_amount) + flt(base_unallocated_amount)
@@ -267,6 +275,8 @@ class PaymentEntry(AccountsController):
if d.amount:
self.difference_amount -= flt(d.amount)
self.difference_amount = flt(self.difference_amount, self.precision("difference_amount"))
def clear_unallocated_reference_document_rows(self):
self.set("references", self.get("references", {"allocated_amount": ["not in", [0, None, ""]]}))
@@ -567,10 +577,9 @@ def get_company_defaults(company):
@frappe.whitelist()
def get_reference_details(reference_doctype, reference_name, party_account_currency):
total_amount = outstanding_amount = exchange_rate = None
ref_doc = frappe.get_doc(reference_doctype, reference_name)
if reference_doctype != "Journal Entry":
ref_doc = frappe.get_doc(reference_doctype, reference_name)
if party_account_currency == ref_doc.company_currency:
total_amount = ref_doc.base_grand_total
exchange_rate = 1
@@ -672,7 +681,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
pe.setup_party_account_field()
pe.set_missing_values()
if bank:
if party_account and bank:
pe.set_exchange_rate()
pe.set_amounts()
return pe

View File

@@ -1,6 +0,0 @@
frappe.listview_settings['Payment Entry'] = {
add_fields: ["payment_type"],
get_indicator: function(doc) {
return [__(doc.payment_type), (doc.docstatus==0 ? 'red' : 'blue'), 'status=' + doc.payment_type]
}
}

View File

@@ -47,7 +47,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-07-25 01:35:33.540019",
"modified": "2016-07-25 05:24:22.726993",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Gateway",
@@ -95,7 +95,7 @@
"write": 0
}
],
"quick_entry": 0,
"quick_entry": 1,
"read_only": 1,
"read_only_onload": 0,
"sort_field": "modified",

View File

@@ -1,21 +1,37 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
//========================== On Load =================================================
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
}
// ***************** Get Account Head *****************
cur_frm.fields_dict['closing_account_head'].get_query = function(doc, cdt, cdn) {
return {
filters: [
['Account', 'company', '=', doc.company],
['Account', 'is_group', '=', '0'],
['Account', 'freeze_account', '=', 'No'],
['Account', 'root_type', 'in', 'Liability, Equity']
]
frappe.ui.form.on('Period Closing Voucher', {
onload: function(frm) {
if (!frm.doc.transaction_date) frm.doc.transaction_date = dateutil.obj_to_str(new Date());
},
setup: function(frm) {
frm.set_query("closing_account_head", function() {
return {
filters: [
['Account', 'company', '=', frm.doc.company],
['Account', 'is_group', '=', '0'],
['Account', 'freeze_account', '=', 'No'],
['Account', 'root_type', 'in', 'Liability, Equity']
]
}
});
},
refresh: function(frm) {
if(frm.doc.docstatus==1) {
frm.add_custom_button(__('Ledger'), function() {
frappe.route_options = {
"voucher_no": frm.doc.name,
"from_date": frm.doc.posting_date,
"to_date": frm.doc.posting_date,
"company": frm.doc.company,
group_by_voucher: 0
};
frappe.set_route("query-report", "General Ledger");
}, "icon-table");
}
}
}
})

View File

@@ -55,9 +55,8 @@ class TestPeriodClosingVoucher(unittest.TestCase):
if random_expense_account:
# Check posted value for teh above random_expense_account
gle_for_random_expense_account = frappe.db.sql("""
select debit - credit as amount,
debit_in_account_currency - credit_in_account_currency
as amount_in_account_currency
select sum(debit - credit) as amount,
sum(debit_in_account_currency - credit_in_account_currency) as amount_in_account_currency
from `tabGL Entry`
where voucher_type='Period Closing Voucher' and voucher_no=%s and account =%s""",
(pcv.name, random_expense_account[0].account), as_dict=True)

View File

@@ -1,6 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
{% include "erpnext/public/js/controllers/accounts.js" %}
frappe.ui.form.on("POS Profile", "onload", function(frm) {
frm.set_query("selling_price_list", function() {
return { filters: { selling: 1 } };

View File

@@ -8,6 +8,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -117,6 +118,32 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "campaign",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Campaign",
"length": 0,
"no_copy": 0,
"options": "Campaign",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -689,6 +716,32 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "account_for_change_amount",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Account for Change Amount",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -832,7 +885,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-06-13 21:20:13.805101",
"modified": "2016-08-17 15:12:56.713748",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",
@@ -879,7 +932,7 @@
"write": 0
}
],
"quick_entry": 1,
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",

View File

@@ -232,7 +232,8 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
return {
query: "erpnext.controllers.queries.item_query"
query: "erpnext.controllers.queries.item_query",
filters: {'is_purchase_item': 1}
}
}
@@ -339,14 +340,20 @@ frappe.ui.form.on("Purchase Invoice", {
$.each(["warehouse", "rejected_warehouse"], function(i, field) {
frm.set_query(field, "items", function() {
return {
filters: [["Warehouse", "company", "in", ["", cstr(frm.doc.company)]]]
filters: [
["Warehouse", "company", "in", ["", cstr(frm.doc.company)]],
["Warehouse", "is_group", "=", 0]
]
}
})
})
frm.set_query("supplier_warehouse", function() {
return {
filters: [["Warehouse", "company", "in", ["", cstr(frm.doc.company)]]]
filters: [
["Warehouse", "company", "in", ["", cstr(frm.doc.company)]],
["Warehouse", "is_group", "=", 0]
]
}
})
},

View File

@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 1,
@@ -117,6 +118,33 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "bill_no",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Supplier Invoice No",
"length": 0,
"no_copy": 0,
"oldfieldname": "bill_no",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -142,6 +170,32 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "0",
"fieldname": "is_return",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Return",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -198,19 +252,18 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "bill_no",
"fieldtype": "Data",
"fieldname": "due_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Supplier Invoice No",
"label": "Due Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "bill_no",
"oldfieldtype": "Data",
"oldfieldname": "due_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
@@ -299,32 +352,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "0",
"fieldname": "is_return",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Return",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -2497,32 +2524,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "due_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Due Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "due_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -3031,7 +3032,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-06-30 13:40:39.440648",
"modified": "2016-08-24 12:50:15.777689",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@@ -301,7 +301,7 @@ class PurchaseInvoice(BuyingController):
asset.flags.ignore_validate_update_after_submit = True
asset.save()
def make_gl_entries(self, repost_future_gle=False):
def make_gl_entries(self, repost_future_gle=True):
self.auto_accounting_for_stock = \
cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
@@ -497,6 +497,18 @@ class PurchaseInvoice(BuyingController):
i += 1
if self.update_stock and valuation_tax:
for cost_center, amount in valuation_tax.items():
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"
})
)
def make_payment_gl_entries(self, gl_entries):
# Make Cash GL Entries
if cint(self.is_paid) and self.cash_bank_account and self.paid_amount:

View File

@@ -18,3 +18,13 @@ frappe.ui.form.on("Purchase Taxes and Charges", "add_deduct_tax", function(doc,
}
refresh_field('add_deduct_tax', d.name, 'taxes');
});
frappe.ui.form.on("Purchase Taxes and Charges", "category", function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
msgprint(__("Cannot deduct when category is for 'Valuation' or 'Vaulation and Total'"));
d.add_deduct_tax = '';
}
refresh_field('add_deduct_tax', d.name, 'taxes');
});

View File

@@ -13,17 +13,18 @@ from erpnext.controllers.accounts_controller import get_taxes_and_charges
@frappe.whitelist()
def get_pos_data():
doc = frappe.new_doc('Sales Invoice')
doc.update_stock = 1;
doc.is_pos = 1;
pos_profile = get_pos_profile(doc.company) or {}
doc.update_stock = pos_profile.get('update_stock')
if pos_profile.get('name'):
pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name'))
else:
frappe.msgprint('<a href="#Form/POS Profile/New POS Profile">'
frappe.msgprint('<a href="#List/POS Profile">'
+ _("Welcome to POS: Create your POS Profile") + '</a>');
update_pos_profile_data(doc, pos_profile)
company_data = get_company_data(doc.company)
update_pos_profile_data(doc, pos_profile, company_data)
update_multi_mode_option(doc, pos_profile)
default_print_format = pos_profile.get('print_format') or "Point of Sale"
print_template = frappe.db.get_value('Print Format', default_print_format, 'html')
@@ -32,10 +33,9 @@ def get_pos_data():
'doc': doc,
'default_customer': pos_profile.get('customer'),
'items': get_items(doc, pos_profile),
'customers': get_customers(pos_profile, doc),
'customers': get_customers(pos_profile, doc, company_data.default_currency),
'pricing_rules': get_pricing_rules(doc),
'print_template': print_template,
'write_off_account': pos_profile.get('write_off_account'),
'meta': {
'invoice': frappe.get_meta('Sales Invoice'),
'items': frappe.get_meta('Sales Invoice Item'),
@@ -43,9 +43,16 @@ def get_pos_data():
}
}
def update_pos_profile_data(doc, pos_profile):
company_data = frappe.db.get_value('Company', doc.company, '*', as_dict=1)
def get_company_data(company):
return frappe.get_all('Company', fields = ["*"], filters= {'name': company})[0]
def update_pos_profile_data(doc, pos_profile, company_data):
doc.campaign = pos_profile.get('campaign')
doc.write_off_account = pos_profile.get('write_off_account') or \
company_data.write_off_account
doc.change_amount_account = pos_profile.get('change_amount_account') or \
company_data.default_cash_account
doc.taxes_and_charges = pos_profile.get('taxes_and_charges')
if doc.taxes_and_charges:
update_tax_table(doc)
@@ -54,7 +61,8 @@ def update_pos_profile_data(doc, pos_profile):
doc.conversion_rate = 1.0
if doc.currency != company_data.default_currency:
doc.conversion_rate = get_exchange_rate(doc.currency, company_data.default_currency)
doc.selling_price_list = pos_profile.get('selling_price_list') or frappe.db.get_value('Selling Settings', None, 'selling_price_list')
doc.selling_price_list = pos_profile.get('selling_price_list') or \
frappe.db.get_value('Selling Settings', None, 'selling_price_list')
doc.naming_series = pos_profile.get('naming_series') or 'SINV-'
doc.letter_head = pos_profile.get('letter_head') or company_data.default_letter_head
doc.ignore_pricing_rule = pos_profile.get('ignore_pricing_rule') or 0
@@ -91,7 +99,7 @@ def update_multi_mode_option(doc, pos_profile):
def get_mode_of_payment(doc):
return frappe.db.sql(""" select mpa.default_account, mpa.parent, mp.type as type from `tabMode of Payment Account` mpa,
`tabMode of Payment` mp where mpa.parent = mp.name and company = %(company)s""", {'company': doc.company}, as_dict=1)
`tabMode of Payment` mp where mpa.parent = mp.name and mpa.company = %(company)s""", {'company': doc.company}, as_dict=1)
def update_tax_table(doc):
taxes = get_taxes_and_charges('Sales Taxes and Charges Template', doc.taxes_and_charges)
@@ -100,7 +108,7 @@ def update_tax_table(doc):
def get_items(doc, pos_profile):
item_list = []
for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0}):
for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0, 'is_sales_item': 1}):
item_doc = frappe.get_doc('Item', item.name)
if item_doc.taxes:
item.taxes = json.dumps(dict(([d.tax_type, d.tax_rate] for d in
@@ -108,27 +116,34 @@ def get_items(doc, pos_profile):
item.price_list_rate = frappe.db.get_value('Item Price', {'item_code': item.name,
'price_list': doc.selling_price_list}, 'price_list_rate') or 0
item.default_warehouse = pos_profile.get('warehouse') or item.default_warehouse or None
item.default_warehouse = pos_profile.get('warehouse') or \
get_item_warehouse_for_company(doc.company, item.default_warehouse) or None
item.expense_account = pos_profile.get('expense_account') or item.expense_account
item.income_account = pos_profile.get('income_account') or item_doc.income_account
item.cost_center = pos_profile.get('cost_center') or item_doc.selling_cost_center
item.actual_qty = frappe.db.get_value('Bin', {'item_code': item.name,
'warehouse': item.default_warehouse}, 'actual_qty') or 0
item.serial_nos = get_serial_nos(item, pos_profile)
item.batch_nos = frappe.db.sql_list("""select name from `tabBatch` where expiry_date > curdate()
item.serial_nos = get_serial_nos(item, pos_profile, doc.company)
item.batch_nos = frappe.db.sql_list("""select name from `tabBatch` where ifnull(expiry_date, '4000-10-10') > curdate()
and item = %(item_code)s""", {'item_code': item.item_code})
item_list.append(item)
return item_list
def get_serial_nos(item, pos_profile):
def get_item_warehouse_for_company(company, warehouse):
if frappe.db.get_value('Warehouse', warehouse, 'company') != company:
warehouse = None
return warehouse
def get_serial_nos(item, pos_profile, company):
cond = "1=1"
if pos_profile.get('update_stock') and pos_profile.get('warehouse'):
cond = "warehouse = '{0}'".format(pos_profile.get('warehouse'))
serial_nos = frappe.db.sql("""select name, warehouse from `tabSerial No` where {0}
and item_code = %(item_code)s""".format(cond), {'item_code': item.item_code}, as_dict=1)
and item_code = %(item_code)s and company = %(company)s
""".format(cond), {'item_code': item.item_code, 'company': company}, as_dict=1)
serial_no_list = {}
for serial_no in serial_nos:
@@ -136,24 +151,25 @@ def get_serial_nos(item, pos_profile):
return serial_no_list
def get_customers(pos_profile, doc):
def get_customers(pos_profile, doc, company_currency):
filters = {'disabled': 0}
customer_list = []
customers = frappe.get_all("Customer", fields=["*"], filters = filters)
for customer in customers:
customer_currency = get_party_account_currency('Customer', customer.name, doc.company) or doc.currency
if customer_currency == doc.currency:
if customer_currency == doc.currency or customer_currency == company_currency:
customer_list.append(customer)
return customer_list
def get_pricing_rules(doc):
pricing_rules = ""
if doc.ignore_pricing_rule == 0:
pricing_rules = frappe.db.sql(""" Select * from `tabPricing Rule` where docstatus < 2 and disable = 0
and selling = 1 and ifnull(company, '') in (%(company)s, '') and
ifnull(for_price_list, '') in (%(price_list)s, '') and %(date)s between
ifnull(valid_from, '2000-01-01') and ifnull(valid_upto, '2500-12-31') order by priority desc, name desc""",
pricing_rules = frappe.db.sql(""" Select * from `tabPricing Rule` where docstatus < 2
and ifnull(for_price_list, '') in (%(price_list)s, '') and selling = 1
and ifnull(company, '') in (%(company)s, '') and disable = 0 and %(date)s
between ifnull(valid_from, '2000-01-01') and ifnull(valid_upto, '2500-12-31')
order by priority desc, name desc""",
{'company': doc.company, 'price_list': doc.selling_price_list, 'date': nowdate()}, as_dict=1)
return pricing_rules
@@ -166,17 +182,23 @@ def make_invoice(doc_list):
for docs in doc_list:
for name, doc in docs.items():
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
validate_customer(doc)
validate_item(doc)
if not frappe.db.exists('Sales Invoice',
{'offline_pos_name': name, 'docstatus': ("<", "2")}):
validate_records(doc)
si_doc = frappe.new_doc('Sales Invoice')
si_doc.offline_pos_name = name
si_doc.update(doc)
submit_invoice(si_doc, name)
name_list.append(name)
else:
name_list.append(name)
return name_list
def validate_records(doc):
validate_customer(doc)
validate_item(doc)
def validate_customer(doc):
if not frappe.db.exists('Customer', doc.get('customer')):
customer_doc = frappe.new_doc('Customer')
@@ -188,8 +210,6 @@ def validate_customer(doc):
frappe.db.commit()
doc['customer'] = customer_doc.name
return doc
def validate_item(doc):
for item in doc.get('items'):
if not frappe.db.exists('Item', item.get('item_code')):
@@ -214,9 +234,10 @@ def submit_invoice(si_doc, name):
save_invoice(e, si_doc, name)
def save_invoice(e, si_doc, name):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
si_doc.docstatus = 0
si_doc.name = ''
si_doc.save(ignore_permissions=True)
si_doc.flags.ignore_mandatory = True
si_doc.insert()
make_scheduler_log(e, si_doc.name)
def make_scheduler_log(e, sales_invoice):

View File

@@ -267,6 +267,16 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
amount: function(){
this.write_off_outstanding_amount_automatically()
},
change_amount: function(){
if(this.frm.doc.paid_amount > this.frm.doc.grand_total){
this.calculate_write_off_amount()
}else {
this.frm.set_value("change_amount", 0.0)
}
this.frm.refresh_fields();
}
});
@@ -458,7 +468,7 @@ frappe.ui.form.on('Sales Invoice', {
]
}
}
},
}
})
frappe.ui.form.on('Sales Invoice Timesheet', {

File diff suppressed because it is too large Load Diff

View File

@@ -61,11 +61,12 @@ class SalesInvoice(SellingController):
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
self.add_remarks()
self.validate_write_off_account()
self.validate_account_for_change_amount()
self.validate_fixed_asset()
self.set_income_account_for_fixed_assets()
# if cint(self.is_pos):
# self.validate_pos()
if cint(self.is_pos):
self.validate_pos()
if cint(self.update_stock):
self.validate_dropship_item()
@@ -87,16 +88,9 @@ class SalesInvoice(SellingController):
def before_save(self):
set_account_for_mode_of_payment(self)
def update_change_amount(self):
self.base_paid_amount = 0.0
if self.paid_amount:
self.base_paid_amount = flt(self.paid_amount * self.conversion_rate, self.precision("base_paid_amount"))
self.change_amount = self.base_change_amount = 0.0
if self.paid_amount > self.grand_total:
self.change_amount = flt(self.paid_amount - self.grand_total, self.precision("change_amount"))
self.base_change_amount = flt(self.change_amount * self.conversion_rate, self.precision("base_change_amount"))
def on_submit(self):
self.validate_pos_paid_amount()
if not self.recurring_id:
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
self.company, self.base_grand_total, self)
@@ -110,6 +104,7 @@ class SalesInvoice(SellingController):
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_in_dn()
self.clear_unallocated_mode_of_payments()
# Updating stock ledger should always be called after updating prevdoc status,
# because updating reserved qty in bin depends upon updated delivered qty in SO
@@ -128,6 +123,10 @@ class SalesInvoice(SellingController):
self.update_time_sheet(self.name)
def validate_pos_paid_amount(self):
if len(self.payments) == 0 and self.is_pos:
frappe.throw(_("At least one mode of payment is required for POS invoice."))
def before_cancel(self):
self.update_time_sheet(None)
@@ -226,6 +225,20 @@ class SalesInvoice(SellingController):
timesheet.set_status()
timesheet.save()
def on_update(self):
self.set_paid_amount()
def set_paid_amount(self):
paid_amount = 0.0
base_paid_amount = 0.0
for data in self.payments:
data.base_amount = flt(data.amount*self.conversion_rate, self.precision("base_paid_amount"))
paid_amount += data.amount
base_paid_amount += data.base_amount
self.paid_amount = paid_amount
self.base_paid_amount = base_paid_amount
def validate_time_sheets_are_submitted(self):
for data in self.timesheets:
if data.time_sheet:
@@ -241,12 +254,22 @@ class SalesInvoice(SellingController):
from erpnext.stock.get_item_details import get_pos_profile_item_details, get_pos_profile
pos = get_pos_profile(self.company)
if not self.get('payments') and not for_validate:
pos_profile = frappe.get_doc('POS Profile', pos.name) if pos else None
update_multi_mode_option(self, pos_profile)
if not self.account_for_change_amount:
self.account_for_change_amount = frappe.db.get_value('Company', self.company, 'default_cash_account')
if pos:
if not for_validate and not self.customer:
self.customer = pos.customer
self.mode_of_payment = pos.mode_of_payment
# self.set_customer_defaults()
if pos.get('account_for_change_amount'):
self.account_for_change_amount = pos.get('account_for_change_amount')
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
'selling_price_list', 'company', 'select_print_heading', 'cash_bank_account',
'write_off_account', 'write_off_cost_center'):
@@ -273,10 +296,6 @@ class SalesInvoice(SellingController):
if self.taxes_and_charges and not len(self.get("taxes")):
self.set_taxes()
if not self.get('payments'):
pos_profile = frappe.get_doc('POS Profile', pos.name)
update_multi_mode_option(self, pos_profile)
return pos
def get_company_abbr(self):
@@ -296,6 +315,12 @@ class SalesInvoice(SellingController):
frappe.throw(_("Debit To account must be a Receivable account"))
self.party_account_currency = account.account_currency
def clear_unallocated_mode_of_payments(self):
self.set("payments", self.get("payments", {"amount": ["not in", [0, None, ""]]}))
frappe.db.sql("""delete from `tabSales Invoice Payment` where parent = %s
and amount = 0""", self.name)
def validate_with_previous_doc(self):
super(SalesInvoice, self).validate_with_previous_doc({
@@ -351,11 +376,8 @@ class SalesInvoice(SellingController):
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project))
def validate_pos(self):
if not self.cash_bank_account and flt(self.paid_amount):
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
if flt(self.paid_amount) + flt(self.write_off_amount) \
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)):
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)) and self.is_return:
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
@@ -376,11 +398,16 @@ class SalesInvoice(SellingController):
if d.delivery_note:
msgprint(_("Stock cannot be updated against Delivery Note {0}").format(d.delivery_note), raise_exception=1)
def validate_write_off_account(self):
if flt(self.write_off_amount) and not self.write_off_account:
self.write_off_account = frappe.db.get_value('Company', self.company, 'write_off_account')
if flt(self.write_off_amount) and not self.write_off_account:
msgprint(_("Please enter Write Off Account"), raise_exception=1)
def validate_account_for_change_amount(self):
if flt(self.change_amount) and not self.account_for_change_amount:
msgprint(_("Please enter Account for Change Amount"), raise_exception=1)
def validate_c_form(self):
""" Blank C-form no if C-form applicable marked as 'No'"""
@@ -504,6 +531,7 @@ class SalesInvoice(SellingController):
gl_entries = merge_similar_entries(gl_entries)
self.make_pos_gl_entries(gl_entries)
self.make_gle_for_change_amount(gl_entries)
self.make_write_off_gl_entry(gl_entries)
@@ -577,52 +605,62 @@ class SalesInvoice(SellingController):
gl_entries += super(SalesInvoice, self).get_gl_entries()
def make_pos_gl_entries(self, gl_entries):
if cint(self.is_pos) and self.paid_amount:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": self.cash_bank_account,
"credit": flt(self.base_paid_amount - self.base_change_amount),
"credit_in_account_currency": flt(self.base_paid_amount - self.base_change_amount) \
if self.party_account_currency==self.company_currency else flt(self.paid_amount - self.change_amount),
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
cash_account = ''
if cint(self.is_pos):
for payment_mode in self.payments:
if payment_mode.type == 'Cash':
cash_account = payment_mode.account
if payment_mode.base_amount > 0:
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
"account": payment_mode.account,
"against": self.customer,
"debit": payment_mode.base_amount,
"debit_in_account_currency": payment_mode.base_amount \
if payment_mode_account_currency==self.company_currency else payment_mode.amount
}, payment_mode_account_currency)
)
if self.change_amount:
cash_account = cash_account or self.payments[0].account
cash_account_currency = get_account_currency(cash_account)
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"account": cash_account,
"against": self.customer,
"credit": self.base_change_amount,
"credit_in_account_currency": self.base_change_amount \
if payment_mode_account_currency==self.company_currency else self.change_amount
}, payment_mode_account_currency)
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": payment_mode.account,
"credit": payment_mode.base_amount,
"credit_in_account_currency": payment_mode.base_amount \
if self.party_account_currency==self.company_currency \
else payment_mode.amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
"account": payment_mode.account,
"against": self.customer,
"debit": payment_mode.base_amount,
"debit_in_account_currency": payment_mode.base_amount \
if payment_mode_account_currency==self.company_currency else payment_mode.amount
}, payment_mode_account_currency)
)
def make_gle_for_change_amount(self, gl_entries):
if cint(self.is_pos) and self.change_amount:
if self.account_for_change_amount:
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": self.account_for_change_amount,
"debit": flt(self.base_change_amount),
"debit_in_account_currency": flt(self.base_change_amount) \
if self.party_account_currency==self.company_currency else flt(self.change_amount),
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype
}, self.party_account_currency)
)
gl_entries.append(
self.get_gl_dict({
"account": self.account_for_change_amount,
"against": self.customer,
"credit": self.base_change_amount
})
)
else:
frappe.throw(_("Select change amount account"), title="Mandatory Field")
def make_write_off_gl_entry(self, gl_entries):
# write off entries, applicable if only pos
if self.write_off_account and self.write_off_amount:

View File

@@ -455,6 +455,25 @@ class TestSalesInvoice(unittest.TestCase):
self.pos_gl_entry(si, pos, 300)
def test_pos_change_amount(self):
set_perpetual_inventory()
self.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}]
si = frappe.copy_doc(pos)
si.change_amount = 5.0
si.insert()
si.submit()
self.assertEquals(si.grand_total, 630.0)
self.assertEquals(si.write_off_amount, -5)
def test_make_pos_invoice(self):
from erpnext.accounts.doctype.sales_invoice.pos import make_invoice
@@ -503,7 +522,8 @@ class TestSalesInvoice(unittest.TestCase):
[pos["taxes"][1]["account_head"], 0.0, 50.0],
[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, si.paid_amount],
[si.debit_to, 0.0, 300.0],
[si.debit_to, 0.0, cash_amount],
["_Test Bank - _TC", 300.0, 0.0],
["Cash - _TC", cash_amount, 0.0]
])

View File

@@ -69,13 +69,13 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
var me = this;
// navigator.onLine
this.connection_status = false;
this.page.set_indicator("Offline", "grey")
this.page.set_indicator(__("Offline"), "grey")
frappe.call({
method:"frappe.handler.ping",
callback: function(r){
if(r.message){
me.connection_status = true;
me.page.set_indicator("Online", "green")
me.page.set_indicator(__("Online"), "green")
}
}
})
@@ -177,11 +177,20 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
doc = JSON.parse(localStorage.getItem('doc'))
if(this.frm.doc.payments.length == 0){
this.frm.doc.payments = doc.payments;
this.calculate_outstanding_amount();
}
if(this.frm.doc.customer){
this.party_field.$input.val(this.frm.doc.customer);
}
if(!this.frm.doc.write_off_account){
this.frm.doc.write_off_account = doc.write_off_account
}
if(!this.frm.doc.account_for_change_amount){
this.frm.doc.account_for_change_amount = doc.account_for_change_amount
}
},
get_invoice_doc: function(si_docs){
@@ -208,7 +217,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
window.meta = r.message.meta;
window.print_template = r.message.print_template;
me.default_customer = r.message.default_customer || null;
me.write_off_account = r.message.write_off_account;
localStorage.setItem('doc', JSON.stringify(r.message.doc));
if(callback){
callback();
@@ -278,7 +286,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
"fieldtype": "Data",
"label": "Item",
"fieldname": "pos_item",
"placeholder": "Search Item"
"placeholder": __("Search Item")
},
parent: this.wrapper.find(".search-area"),
only_input: true,
@@ -420,19 +428,25 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
}
key = this.search.$input.val().toLowerCase();
search_status = true
if(key){
return $.grep(window.items, function(item){
if( (item.item_code.toLowerCase().match(key)) ||
(item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key)) ){
return true
}else if(item.barcode == me.search.$input.val()){
return item.barcode == me.search.$input.val();
} else if (in_list(Object.keys(item.serial_nos), me.search.$input.val())){
me.item_serial_no[item.item_code] = [me.search.$input.val(), item.serial_nos[me.search.$input.val()]]
return true
} else if(in_list(item.batch_nos, me.search.$input.val())){
return me.item_batch_no[item.item_code] = me.search.$input.val()
if(search_status){
if(in_list(item.batch_nos, me.search.$input.val())){
search_status = false;
return me.item_batch_no[item.item_code] = me.search.$input.val()
} else if(in_list(Object.keys(item.serial_nos), me.search.$input.val())) {
search_status = false;
me.item_serial_no[item.item_code] = [me.search.$input.val(), item.serial_nos[me.search.$input.val()]]
return true
} else if(item.barcode == me.search.$input.val()) {
search_status = false;
return item.barcode == me.search.$input.val();
} else if((item.item_code.toLowerCase().match(key)) ||
(item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key))) {
return true
}
}
})
}else{
@@ -478,11 +492,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.remove_item = []
$.each(this.frm.doc["items"] || [], function(i, d) {
if (d.item_code == item_code && d.serial_no
&& field == 'qty' && cint(value) != value) {
d.qty = 0.0;
me.refresh();
frappe.throw(__("Serial no item cannot be a fraction"))
if(d.serial_no){
me.validate_serial_no_qty(d, item_code, field, value)
}
if (d.item_code == item_code) {
@@ -498,7 +509,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.remove_zero_qty_item();
}
this.refresh();
this.update_paid_amount_status(false)
},
remove_zero_qty_item: function(){
@@ -580,7 +591,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if (!caught)
this.add_new_item_to_grid();
this.refresh();
this.update_paid_amount_status(false)
},
add_new_item_to_grid: function() {
@@ -605,6 +616,14 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
? this.item_serial_no[this.child.item_code][0] : '');
},
update_paid_amount_status: function(update_paid_amount){
if(this.name){
update_paid_amount = update_paid_amount ? false : true;
}
this.refresh(update_paid_amount);
},
refresh: function(update_paid_amount) {
var me = this;
this.refresh_fields(update_paid_amount);
@@ -612,6 +631,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.update_rate();
this.set_primary_action();
},
refresh_fields: function(update_paid_amount) {
this.apply_pricing_rule();
this.discount_amount_applied = false;
@@ -687,7 +707,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if (this.frm.doc.docstatus==0) {
this.page.set_primary_action(__("Pay"), function() {
me.validate()
me.validate();
me.update_paid_amount_status(true);
me.create_invoice();
me.make_payment();
}, "octicon octicon-credit-card");
@@ -716,49 +737,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
}, 1000)
},
write_off_amount: function(){
var me = this;
var value = 0.0;
if(this.frm.doc.outstanding_amount > 0){
dialog = new frappe.ui.Dialog({
title: 'Write Off Amount',
fields: [
{fieldtype: "Check", fieldname: "write_off_amount", label: __("Write off Outstanding Amount")},
{fieldtype: "Link", options:"Account", default:this.write_off_account, fieldname: "write_off_account",
label: __("Write off Account"), get_query: function() {
return {
filters: {'is_group': 0, 'report_type': 'Profit and Loss'}
}
}}
]
});
dialog.show();
dialog.fields_dict.write_off_amount.$input.change(function(){
write_off_amount = dialog.get_values().write_off_amount;
me.frm.doc.write_off_outstanding_amount_automatically = write_off_amount;
me.frm.doc.base_write_off_amount = (write_off_amount==1) ? flt(me.frm.doc.grand_total - me.frm.doc.paid_amount, precision("outstanding_amount")) : 0;
me.frm.doc.write_off_account = (write_off_amount==1) ? dialog.get_values().write_off_account : '';
me.frm.doc.write_off_amount = flt(me.frm.doc.base_write_off_amount * me.frm.doc.conversion_rate, precision("write_off_amount"))
me.calculate_outstanding_amount();
me.set_primary_action();
})
dialog.fields_dict.write_off_account.$input.change(function(){
me.frm.doc.write_off_account = dialog.get_values().write_off_account;
})
dialog.set_primary_action(__("Submit"), function(){
dialog.hide()
me.submit_invoice()
})
}else{
this.submit_invoice()
}
},
submit_invoice: function(){
var me = this;
frappe.confirm(__("Do you really want to submit the invoice?"), function () {
@@ -797,6 +775,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.update_invoice()
}else{
this.name = $.now();
this.frm.doc.posting_date = frappe.datetime.get_today();
this.frm.doc.posting_time = frappe.datetime.now_time();
invoice_data[this.name] = this.frm.doc
this.si_docs.push(invoice_data)
this.update_localstorage();
@@ -869,6 +849,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
for(key in data){
if(data[key].docstatus == 1 && index < 50){
index++
data[key].docstatus = 0;
return data
}
}
@@ -941,6 +922,23 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
}
},
validate_serial_no_qty: function(args, item_code, field, value){
var me = this;
if (args.item_code == item_code && args.serial_no
&& field == 'qty' && cint(value) != value) {
args.qty = 0.0;
this.refresh();
frappe.throw(__("Serial no item cannot be a fraction"))
}
if(args.serial_no && args.serial_no.split('\n').length != cint(value)){
args.qty = 0.0;
args.serial_no = ''
this.refresh();
frappe.throw(__("Total nos of serial no is not equal to quantity."))
}
},
mandatory_batch_no: function(){
var me = this;
if(this.items[0].has_batch_no && !this.item_batch_no[this.items[0].item_code]){
@@ -968,11 +966,13 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
get_pricing_rule: function(item){
var me = this;
return $.grep(this.pricing_rules, function(data){
if(data.item_code == item.item_code || in_list(['All Item Groups', item.item_group], data.item_group)) {
if(in_list(['Customer', 'Customer Group', 'Territory'], data.applicable_for)){
return me.validate_condition(data)
}else{
return true
if(item.qty >= data.min_qty && (item.qty <= (data.max_qty ? data.max_qty : item.qty)) ){
if(data.item_code == item.item_code || in_list(['All Item Groups', item.item_group], data.item_group)) {
if(in_list(['Customer', 'Customer Group', 'Territory', 'Campaign'], data.applicable_for)){
return me.validate_condition(data)
}else{
return true
}
}
}
})
@@ -991,6 +991,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
'Customer': [data.customer, [this.frm.doc.customer]],
'Customer Group': [data.customer_group, [this.frm.doc.customer_group, 'All Customer Groups']],
'Territory': [data.territory, [this.frm.doc.territory, 'All Territories']],
'Campaign': [data.campaign, [this.frm.doc.campaign]],
}
},

View File

@@ -6,9 +6,9 @@
"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{{ __(\"Invoice\") }}<br>\n</p>\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\">{{ item.qty }}<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</tbody>\n</table>\n\n\n<hr>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"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{{ __(\"Invoice\") }}<br>\n</p>\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, 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</tbody>\n</table>\n\n\n<hr>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"modified": "2016-05-21 00:25:20.359074",
"modified": "2016-08-11 07:23:04.530676",
"modified_by": "Administrator",
"name": "Point of Sale",
"owner": "Administrator",

View File

@@ -1 +1 @@
{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}

View File

@@ -1 +1 @@
{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}

View File

@@ -1,5 +1,5 @@
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
{%= frappe.boot.letter_heads[frappe.get_doc(":Company", filters.company).default_letter_head || frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h4 class="text-center">{%= filters.customer || filters.supplier %} </h4>

View File

@@ -52,10 +52,10 @@ class ReceivablePayableReport(object):
if not "range3" in self.filters:
self.filters["range3"] = "90"
for label in ("0-{range1}".format(**self.filters),
"{range1}-{range2}".format(**self.filters),
"{range2}-{range3}".format(**self.filters),
"{range3}-{above}".format(range3=self.filters.range3, above=_("Above"))):
for label in ("0-{range1}".format(range1=self.filters["range1"]),
"{range1}-{range2}".format(range1=self.filters["range1"]+1, range2=self.filters["range2"]),
"{range2}-{range3}".format(range2=self.filters["range2"]+1, range3=self.filters["range3"]),
"{range3}-{above}".format(range3=self.filters["range3"] + 1, above=_("Above"))):
columns.append({
"label": label,
"fieldtype": "Currency",
@@ -66,7 +66,8 @@ class ReceivablePayableReport(object):
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"fieldtype": "Link",
"options": "Currency",
"width": 100
})
if args.get("party_type") == "Customer":

View File

@@ -1 +1 @@
{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}

View File

@@ -34,7 +34,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"fieldtype": "Link",
"options": "Currency",
"width": 80
})

View File

@@ -1 +1 @@
{% include "erpnext/accounts/report/financial_statements.html" %}
{% include "accounts/report/financial_statements.html" %}

View File

@@ -55,14 +55,6 @@ def get_columns():
"fieldtype": "Date",
"width": 90
},
{
"fieldname": "payment_document",
"label": _("Payment Document"),
"fieldtype": "Link",
"options": "DocType",
"width": 120,
"hidden": 1
},
{
"fieldname": "payment_entry",
"label": _("Payment Entry"),

View File

@@ -13,7 +13,9 @@
height: 37px;
}
</style>
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[frappe.get_doc(":Company", filters.company).default_letter_head || frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h4 class="text-center">{%= filters.company %}</h3>
<h4 class="text-center">{%= filters.fiscal_year %}</h3>

View File

@@ -1,5 +1,5 @@
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[filters.letter_head || frappe.defaults.get_default("letter_head")] %}
{%= frappe.boot.letter_heads[filters.letter_head || frappe.get_doc(":Company", filters.company).default_letter_head || frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __("Statement of Account") %}</h2>
<h4 class="text-center">{%= (filters.party || filters.account) && ((filters.party || filters.account) + ", ") || "" %} {%= filters.company %}</h4>

View File

@@ -25,6 +25,9 @@ def execute(filters=None):
return columns, res
def validate_filters(filters, account_details):
if not filters.get('company'):
frappe.throw(_('{0} is mandatory').format(_('Company')))
if filters.get("account") and not account_details.get(filters.account):
frappe.throw(_("Account {0} does not exists").format(filters.account))
@@ -87,7 +90,7 @@ def get_columns(filters):
columns += [
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":160",
_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150",
_("Project") + ":Link/Project:100", _("Cost Center") + ":Link/Cost Center:100",
_("Project") + ":Link/Project:100", _("Cost Center") + ":Link/Cost Center:100",
_("Remarks") + "::400"
]
@@ -111,7 +114,7 @@ def get_gl_entries(filters):
if filters.get("group_by_voucher") else "group by name"
gl_entries = frappe.db.sql("""
select
select
posting_date, account, party_type, party,
sum(debit) as debit, sum(credit) as credit,
voucher_type, voucher_no, cost_center, project,

View File

@@ -1 +1 @@
{% include "erpnext/accounts/report/financial_statements.html" %}
{% include "accounts/report/financial_statements.html" %}

View File

@@ -1 +1 @@
{% include "erpnext/accounts/report/financial_statements.html" %}
{% include "accounts/report/financial_statements.html" %}

View File

@@ -79,7 +79,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
}
} else {
return{
query: "erpnext.controllers.queries.item_query"
query: "erpnext.controllers.queries.item_query",
filters: {'is_purchase_item': 1}
}
}
});
@@ -87,7 +88,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
refresh: function(doc) {
this.frm.toggle_display("supplier_name",
(this.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier));
(this.frm.doc.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier));
if(this.frm.docstatus==0 &&
(this.frm.doctype==="Purchase Order" || this.frm.doctype==="Material Request")) {

View File

@@ -3,10 +3,12 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "naming_series:",
"beta": 0,
"creation": "2013-04-30 13:13:03",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
@@ -16,6 +18,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
@@ -24,6 +27,7 @@
"options": "QI-",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -40,6 +44,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Report Date",
@@ -49,6 +54,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -64,6 +70,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -71,6 +78,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -86,6 +94,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Inspection Type",
@@ -96,6 +105,7 @@
"options": "\nIncoming\nOutgoing\nIn Process",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -111,6 +121,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Receipt No",
@@ -121,6 +132,7 @@
"options": "Purchase Receipt",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -136,6 +148,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Delivery Note No",
@@ -146,6 +159,7 @@
"options": "Delivery Note",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -161,6 +175,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -168,6 +183,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -183,6 +199,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
@@ -193,6 +210,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -208,6 +226,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item Serial No",
@@ -218,6 +237,7 @@
"options": "Serial No",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -233,6 +253,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Batch No",
@@ -243,6 +264,7 @@
"options": "Batch",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -258,6 +280,7 @@
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Sample Size",
@@ -267,6 +290,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -282,6 +306,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -289,6 +314,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -305,6 +331,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item Name",
@@ -313,6 +340,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -328,6 +356,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Description",
@@ -337,6 +366,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -353,6 +383,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -360,6 +391,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -376,6 +408,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Inspected By",
@@ -386,6 +419,7 @@
"options": "User",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -401,6 +435,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Verified By",
@@ -410,6 +445,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -425,6 +461,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -432,6 +469,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -447,6 +485,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
@@ -456,6 +495,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -471,6 +511,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
@@ -481,6 +522,7 @@
"options": "Quality Inspection",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -496,6 +538,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@@ -505,6 +548,7 @@
"options": "Simple",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -520,6 +564,7 @@
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Get Specification Details",
@@ -528,6 +573,7 @@
"options": "get_item_specification_details",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -543,6 +589,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Readings",
@@ -553,6 +600,7 @@
"options": "Quality Inspection Reading",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -565,13 +613,14 @@
"hide_toolbar": 0,
"icon": "icon-search",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.786379",
"modified": "2016-07-31 11:42:40.498926",
"modified_by": "Administrator",
"module": "Buying",
"name": "Quality Inspection",
@@ -598,7 +647,10 @@
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item_code, report_date, purchase_receipt_no, delivery_note_no"
"search_fields": "item_code, report_date, purchase_receipt_no, delivery_note_no",
"sort_order": "ASC",
"track_seen": 0
}

View File

@@ -30,7 +30,7 @@ frappe.ui.form.on("Request for Quotation",{
},
onload: function(frm) {
frm.add_fetch('standard_reply', 'response', 'response');
frm.add_fetch('standard_reply', 'response', 'message_for_supplier');
if(!frm.doc.message_for_supplier) {
frm.set_value("message_for_supplier", __("Please supply the specified items at the best possible rates"))

View File

@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -296,7 +297,7 @@
"options": "Standard Reply",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
@@ -638,7 +639,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-06-30 01:57:49.233065",
"modified": "2016-08-01 08:45:39.777405",
"modified_by": "Administrator",
"module": "Buying",
"name": "Request for Quotation",

View File

@@ -3,12 +3,14 @@
"allow_import": 1,
"allow_rename": 1,
"autoname": "naming_series:",
"beta": 0,
"creation": "2013-01-10 16:34:11",
"custom": 0,
"description": "Supplier of Goods or Services.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -705,16 +707,18 @@
"icon": "icon-user",
"idx": 370,
"image_field": "image",
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-04-28 17:36:44.742525",
"modified": "2016-07-25 05:20:29.238820",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
"name_case": "Title Case",
"owner": "Administrator",
"permissions": [
{
@@ -858,7 +862,7 @@
"write": 0
}
],
"quick_entry": 0,
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "supplier_name, supplier_type",

View File

@@ -0,0 +1,132 @@
<head>
<link href="/assets/frappe/css/c3.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/assets/frappe/js/lib/d3.min.js"></script>
<script type="text/javascript" src="/assets/frappe/js/lib/c3.min.js"></script>
<script type="text/javascript">
onReady("#chart_div", function() {
var chartData = [];
{% var q = 0; %}
{% for(var j=0, m=data.length+1; j<m; j++) { %}
var tempData{%=j%} = [];
{% for(var i=1, l=report.columns.length; i<l; i++) { %}
{% if(__(report.columns[i].label) != __("Quotation")) { %}
{% if(j == 0) { %}
{% if(i == 1) { %}
tempData{%=j%}[{%=i%}-1] = \"x\";
{% } else { %}
tempData{%=j%}[{%=i%}-1] = Math.log(parseInt(\"{%= report.columns[i].label %}\".replace(\"Qty: \",\"\"))) / Math.LN10;
{% } %}
{% } else { %}
{% if(i == 1) { %}
tempData{%=j%}[{%=i%}-1] = \"{%= data[j-1][report.columns[i].field] %} \";
{% } else { %}
tempData{%=j%}[{%=i%}-1] = {% if(data[j-1][report.columns[i].field] == "") { if (i > 2) { %}
tempData{%=j%}[{%=i%}-2]
{% } else { %}
0
{% } } else { %}
{%= data[j-1][report.columns[i].field] %}
{% } %};
{% } %};
{% } %}
{% } else { %}
{% if(j == 0) { %}
{% if(i < l-1) { %}
tempData{%=j%}[{%=i%}-1] = Math.log(parseInt(\"{%= report.columns[i+1].label %}\".replace(\"Qty: \",\"\"))-1) / Math.LN10;
{% } else { %}
tempData{%=j%}[{%=i%}-1] = Math.log(2*parseInt(\"{%= report.columns[i-1].label %}\".replace(\"Qty: \",\"\"))) / Math.LN10;
{% } %}
{% } else { %}
tempData{%=j%}[{%=i%}-1] = tempData{%=j%}[{%=i%}-2];
{% } %}
{% } %}
{% } %}
chartData[{%=j%}] = tempData{%=j%};
{% } %}
console.log(chartData);
hold = {
bindto: "#chart_div" ,data: {
x: "x",
columns: chartData
},
axis: {
x: {
tick: {
format: function (x22) { return Math.pow(10,x22).toFixed(0); },
culling: {
max: {%=report.columns.length%} / 2
}
}
}
},
point: {
show: false
}
};
console.log(hold);
var chart = c3.generate(hold);
});
function onReady(selector, callback) {
var intervalID = window.setInterval(function() {
if (document.querySelector(selector) !== undefined) {
window.clearInterval(intervalID);
callback.call(this);
}
}, 500);}
</script>
</head>
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h4 class="text-center">{%= filters.item %} </h4>
<hr>
<table class="table table-bordered">
<thead>
<tr>
{% for(var i=0, l=report.columns.length; i<l; i++) { %}
<th style="width: 15%">{%= report.columns[i].label %}</th>
{% } %}
</tr>
</thead>
<tbody>
{% for(var i=0, l=data.length; i<l; i++) { %}
<tr>
{% for(var j=0,m=report.columns.length; j<m; j++) { %}
<td style="width: 15%">{%= data[i][report.columns[j].field] %}</td>
{% } %}
</tr>
{% } %}
</tbody>
</table>
<h4 class="text-center"> Analysis Chart </h4>
<div id="chart_div"></div>
<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>

View File

@@ -11,5 +11,72 @@ frappe.query_reports["Quoted Item Comparison"] = {
"default": ""
}
]
],
onload: function(report) {
//Create a button for setting the default supplier
report.page.add_inner_button(__("Select Default Supplier"), function() {
var reporter = frappe.query_reports["Quoted Item Comparison"];
//Always make a new one so that the latest values get updated
reporter.make_default_supplier_dialog(report);
report.dialog.show();
setTimeout(function() { report.dialog.input.focus(); }, 1000);
}, 'Tools');
},
"make_default_supplier_dialog": function (report) {
//Get the name of the item to change
var filters = report.get_values();
var item_code = filters.item;
//Get a list of the suppliers (with a blank as well) for the user to select
var select_options = "";
for (let supplier of report.data)
{
select_options += supplier.supplier_name+ '\n'
}
//Create a dialog window for the user to pick their supplier
var d = new frappe.ui.Dialog({
title: __('Select Default Supplier'),
fields: [
{fieldname: 'supplier', fieldtype:'Select', label:'Supplier', reqd:1,options:select_options},
{fieldname: 'ok_button', fieldtype:'Button', label:'Set Default Supplier'},
]
});
//On the user clicking the ok button
d.fields_dict.ok_button.input.onclick = function() {
var btn = d.fields_dict.ok_button.input;
var v = report.dialog.get_values();
if(v) {
$(btn).set_working();
//Set the default_supplier field of the appropriate Item to the selected supplier
frappe.call({
method: "frappe.client.set_value",
args: {
doctype: "Item",
name: item_code,
fieldname: "default_supplier",
value: v.supplier,
},
callback: function (r){
$(btn).done_working();
msgprint("Successfully Set Supplier");
report.dialog.hide();
}
});
}
}
report.dialog = d;
}
}

View File

@@ -2,6 +2,8 @@
# For license information, please see license.txt
from __future__ import unicode_literals
from erpnext.setup.utils import get_exchange_rate
import frappe
def execute(filters=None):
@@ -22,6 +24,7 @@ def get_quote_list(item, qty_list):
if item:
price_data = []
suppliers = []
company_currency = frappe.db.get_default("currency")
# Get the list of suppliers
for root in frappe.db.sql("""select parent, qty, rate from `tabSupplier Quotation Item` where item_code=%s and docstatus < 2""", item, as_dict=1):
for splr in frappe.db.sql("""SELECT supplier from `tabSupplier Quotation` where name =%s and docstatus < 2""", root.parent, as_dict=1):
@@ -35,6 +38,9 @@ def get_quote_list(item, qty_list):
#Add a row for each supplier
for root in set(suppliers):
supplier_currency = frappe.db.get_value("Supplier",root,"default_currency")
exg = get_exchange_rate(supplier_currency,company_currency)
row = frappe._dict({
"supplier_name": root
})
@@ -42,7 +48,7 @@ def get_quote_list(item, qty_list):
# Get the quantity for this row
for item_price in price_data:
if str(item_price.qty) == col.key and item_price.supplier == root:
row[col.key] = item_price.rate
row[col.key] = item_price.rate * exg
row[col.key + "QUOTE"] = item_price.parent
break
else:

View File

@@ -0,0 +1,58 @@
#### New POS
- Offline
- Multiple Payment Modes
- Standard documents cannot be edited in POS view
#### Payment Entry
- Dedicated form for managing Payments
- Designed for normal users who do not have accounting background
#### Request for Quotation
- Updated workflow: Material Request -> **Request for Quotation** -> Supplier Quotation -> Purchase Order
#### Fixed Asset Management
- Manage fixed asset records and their depreciation
#### Improved Navigation
- Heatmaps
- Centralized navigation from Masters like Item, Customer, Supplier, Employee etc.
#### Timesheets
- New grid
- Multiple time logs in one timesheets
- Linked to Payroll and Billing
#### Graphs in Reports
- Added graphs in some important reports like Balance Sheet, Accounts Receivable etc.
#### Sub-warehouse
- Tree view for Warehouse
#### New Portal Design
- New Homepage Design
- Sidebar in Portal View
- New Cart View
#### Collaborative Project Management
- Web View
- Customers/Suppliers can add/edit issues and view timesheets
#### Budget
- Dedicated budget form
- Budget can be assigned against Cost Center Group
#### Check Printing Format
- Ability to customize Cheque Printing Format for any bank
#### Schools application is now part of ERPNext
#### Minor
- Selling Price calculation based on Margin defined in the Pricing Rule
- Document flow-chart on Sales / Purchase Transactions
- Domain specific desktop views
- Add opening Stock and Rate while creating a new Item
- Book payments and update stock directly from Purchase Invoice
- List view for Products on Website
- Features Setup is deprecated, settings moved to individual module setup views
- Added Safety Stock to Item Master

View File

@@ -26,6 +26,12 @@ def get_data():
"name": "Payment Entry",
"description": _("Bank/Cash transactions against party or for internal transfer")
},
{
"type": "page",
"name": "pos",
"label": _("POS"),
"description": _("Point of Sale")
},
{
"type": "report",
"name": "Accounts Receivable",

View File

@@ -229,12 +229,12 @@ def get_data():
"type": "list"
},
{
"module_name": "Examination",
"module_name": "Assessment",
"color": "#8a70be",
"icon": "icon-file-text-alt",
"label": _("Examination"),
"link": "List/Examination",
"_doctype": "Examination",
"label": _("Assessment"),
"link": "List/Assessment",
"_doctype": "Assessment",
"type": "list"
},
{
@@ -261,7 +261,7 @@ def get_data():
"icon": "icon-map-marker",
"label": _("Room"),
"link": "List/Room",
"_doctype": "Examination",
"_doctype": "Room",
"type": "list"
},
{

View File

@@ -12,7 +12,7 @@ You can create Custom Form, Fields, Scripts and can also create your own Apps
to extend ERPNext functionality.
ERPNext is Open Source under the GNU General Public Licence v3 and has been
listed as one of the Best Open Source Softwares in the world by my online
listed as one of the Best Open Source Softwares in the world by many online
blogs."""
docs_version = "6.x.x"

View File

@@ -11,6 +11,10 @@ def get_data():
"type": "doctype",
"name": "Student"
},
{
"type": "doctype",
"name": "Student Log"
},
{
"type": "doctype",
"name": "Student Batch"
@@ -57,7 +61,11 @@ def get_data():
},
{
"type": "doctype",
"name": "Examination"
"name": "Assessment"
},
{
"type": "doctype",
"name": "Assessment Group"
},
{
"type": "doctype",

View File

@@ -17,7 +17,8 @@ def get_filters_cond(doctype, filters, conditions):
if isinstance(f[1], basestring) and f[1][0] == '!':
flt.append([doctype, f[0], '!=', f[1][1:]])
else:
flt.append([doctype, f[0], '=', f[1]])
value = frappe.db.escape(f[1]) if isinstance(f[1], basestring) else f[1]
flt.append([doctype, f[0], '=', value])
query = DatabaseQuery(doctype)
query.filters = flt

View File

@@ -167,9 +167,7 @@ def make_return_doc(doctype, source_name, target_doc=None):
target_doc.qty = -1* source_doc.qty
if doctype == "Purchase Receipt":
target_doc.received_qty = -1* source_doc.qty
target_doc.prevdoc_doctype = source_doc.prevdoc_doctype
target_doc.prevdoc_docname = source_doc.prevdoc_docname
target_doc.prevdoc_detail_docname = source_doc.prevdoc_detail_docname
target_doc.purchase_order = source_doc.purchase_order
elif doctype == "Purchase Invoice":
target_doc.received_qty = -1* source_doc.qty
target_doc.purchase_order = source_doc.purchase_order

View File

@@ -142,7 +142,7 @@ class StatusUpdater(Document):
if item['reduce_by'] > .01:
self.limits_crossed_error(args, item)
else:
elif item[args['target_ref_field']]:
self.check_overflow_with_tolerance(item, args)
def check_overflow_with_tolerance(self, item, args):

View File

@@ -38,6 +38,7 @@ class StockController(AccountsController):
gl_list = []
warehouse_with_no_account = []
for detail in voucher_details:
sle_list = sle_map.get(detail.name)
if sle_list:
@@ -203,10 +204,10 @@ class StockController(AccountsController):
from erpnext.stock.stock_ledger import make_sl_entries
make_sl_entries(sl_entries, is_amended, allow_negative_stock, via_landed_cost_voucher)
def make_gl_entries_on_cancel(self):
def make_gl_entries_on_cancel(self, repost_future_gle=True):
if frappe.db.sql("""select name from `tabGL Entry` where voucher_type=%s
and voucher_no=%s""", (self.doctype, self.name)):
self.make_gl_entries()
self.make_gl_entries(repost_future_gle)
def get_serialized_items(self):
serialized_items = []
@@ -260,16 +261,15 @@ def update_gl_entries_after(posting_date, posting_time, for_warehouses=None, for
future_stock_vouchers = get_future_stock_vouchers(posting_date, posting_time, for_warehouses, for_items)
gle = get_voucherwise_gl_entries(future_stock_vouchers, posting_date)
for voucher_type, voucher_no in future_stock_vouchers:
existing_gle = gle.get((voucher_type, voucher_no), [])
voucher_obj = frappe.get_doc(voucher_type, voucher_no)
expected_gle = voucher_obj.get_gl_entries(warehouse_account)
if expected_gle:
if not existing_gle or not compare_existing_and_expected_gle(existing_gle,
expected_gle):
_delete_gl_entries(voucher_type, voucher_no)
voucher_obj.make_gl_entries(repost_future_gle=False)
if not existing_gle or not compare_existing_and_expected_gle(existing_gle, expected_gle):
_delete_gl_entries(voucher_type, voucher_no)
voucher_obj.make_gl_entries(repost_future_gle=False)
else:
_delete_gl_entries(voucher_type, voucher_no)

View File

@@ -420,8 +420,10 @@ class calculate_taxes_and_totals(object):
# NOTE:
# write_off_amount is only for POS Invoice
# total_advance is only for non POS Invoice
if self.doc.is_return:
return
if self.doc.doctype == "Sales Invoice":
self.calculate_paid_amount()
if self.doc.is_return: return
self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"])
self._set_in_company_currency(self.doc, ['write_off_amount'])
@@ -435,16 +437,18 @@ class calculate_taxes_and_totals(object):
- flt(self.doc.base_write_off_amount), self.doc.precision("grand_total"))
if self.doc.doctype == "Sales Invoice":
self.calculate_paid_amount()
self.doc.round_floats_in(self.doc, ["paid_amount"])
paid_amount = self.doc.paid_amount \
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
self.doc.outstanding_amount = 0
if total_amount_to_pay > paid_amount:
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
self.doc.precision("outstanding_amount"))
self.change_amount()
change_amount = self.doc.change_amount \
if self.doc.party_account_currency == self.doc.currency else self.doc.base_change_amount
self.calculate_write_off_amount()
self.calculate_change_amount()
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
flt(change_amount), self.doc.precision("outstanding_amount"))
elif self.doc.doctype == "Purchase Invoice":
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))
@@ -459,15 +463,22 @@ class calculate_taxes_and_totals(object):
self.doc.paid_amount = flt(paid_amount, self.doc.precision("paid_amount"))
self.doc.base_paid_amount = flt(base_paid_amount, self.doc.precision("base_paid_amount"))
def change_amount(self):
change_amount = 0.0
def calculate_change_amount(self):
self.doc.change_amount = 0.0
self.doc.base_change_amount = 0.0
if self.doc.paid_amount > self.doc.grand_total:
change_amount = flt(self.doc.paid_amount - self.doc.grand_total,
self.doc.precision("change_amount"))
self.doc.change_amount = flt(self.doc.paid_amount - self.doc.grand_total +
self.doc.write_off_amount, self.doc.precision("change_amount"))
self.doc.change_amount = change_amount;
self.doc.base_change_amount = flt(change_amount * self.doc.conversion_rate,
self.doc.precision("base_change_amount"))
self.doc.base_change_amount = flt(self.doc.base_paid_amount - self.doc.base_grand_total +
self.doc.base_write_off_amount, self.doc.precision("base_change_amount"))
def calculate_write_off_amount(self):
if flt(self.doc.change_amount) > 0:
self.doc.write_off_amount = flt(self.doc.grand_total - self.doc.paid_amount + self.doc.change_amount,
self.doc.precision("write_off_amount"))
self.doc.base_write_off_amount = flt(self.doc.write_off_amount * self.doc.conversion_rate,
self.doc.precision("base_write_off_amount"))
def calculate_margin(self, item):
total_margin = 0.0

View File

@@ -39,6 +39,7 @@ def validate_filters(filters):
frappe.throw(_("'Based On' and 'Group By' can not be same"))
def get_data(filters, conditions):
data = []
inc, cond= '',''
query_details = conditions["based_on_select"] + conditions["period_wise_select"]
@@ -49,6 +50,9 @@ def get_data(filters, conditions):
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
if conditions.get('trans') in ['Sales Order', 'Purchase Order']:
cond += "and t1.status != 'Closed'"
year_start_date, year_end_date = frappe.db.get_value("Fiscal Year",
filters.get('fiscal_year'), ["year_start_date", "year_end_date"])
@@ -85,10 +89,10 @@ def get_data(filters, conditions):
#to get distinct value of col specified by group_by in filter
row = frappe.db.sql("""select DISTINCT(%s) from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
and t1.docstatus = 1 and %s = %s %s
and t1.docstatus = 1 and %s = %s %s %s
""" %
(sel_col, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", posting_date, "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
"%s", posting_date, "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond"), cond),
(filters.get("company"), year_start_date, year_end_date, data1[d][0]), as_list=1)
for i in range(len(row)):
@@ -97,11 +101,11 @@ def get_data(filters, conditions):
#get data for group_by filter
row1 = frappe.db.sql(""" select %s , %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
and t1.docstatus = 1 and %s = %s and %s = %s %s
and t1.docstatus = 1 and %s = %s and %s = %s %s %s
""" %
(sel_col, conditions["period_wise_select"], conditions["trans"],
conditions["trans"], conditions["addl_tables"], "%s", posting_date, "%s","%s", sel_col,
"%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
"%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond"), cond),
(filters.get("company"), year_start_date, year_end_date, row[i][0],
data1[d][0]), as_list=1)

View File

@@ -38,7 +38,8 @@ class Lead(SellingController):
frappe.throw(_("Campaign Name is required"))
if self.email_id:
validate_email_add(self.email_id, True)
if not self.flags.ignore_email_validation:
validate_email_add(self.email_id, True)
if self.email_id == self.lead_owner:
# Lead Owner cannot be same as the Lead

View File

@@ -51,7 +51,8 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
this.frm.set_query("item_code", "items", function() {
return {
query: "erpnext.controllers.queries.item_query"
query: "erpnext.controllers.queries.item_query",
filters: {'is_sales_item': 1}
};
});

View File

@@ -10,6 +10,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
@@ -266,7 +267,7 @@
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
"options": "Open\nQuotation\nLost\nReplied\nClosed",
"options": "Open\nQuotation\nConverted\nLost\nReplied\nClosed",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
@@ -1001,7 +1002,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-06-14 15:50:55.080217",
"modified": "2016-07-28 15:58:06.614493",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",

View File

@@ -63,6 +63,8 @@ class Opportunity(TransactionBase):
"email_id": self.contact_email,
"lead_name": sender_name
})
lead.flags.ignore_email_validation = True
lead.insert(ignore_permissions=True)
lead_name = lead.name

View File

@@ -53,7 +53,7 @@ def simulate():
if not runs_for:
runs_for = frappe.utils.date_diff(frappe.utils.nowdate(), current_date)
# runs_for = 100
fixed_asset.work()
for i in xrange(runs_for):
@@ -72,9 +72,6 @@ def simulate():
stock.work()
accounts.work()
projects.run_projects(current_date)
# run_stock()
# run_accounts()
# run_projects()
# run_messages()
current_date = frappe.utils.add_days(current_date, 1)

View File

@@ -32,6 +32,7 @@ def setup_data():
setup_employee()
setup_salary_structure()
setup_salary_structure_for_timesheet()
setup_leave_allocation()
setup_mode_of_payment()
setup_account_to_expense_type()
setup_user_roles()
@@ -211,7 +212,7 @@ def setup_user():
user = frappe.new_doc("User")
user.update(u)
user.flags.no_welcome_mail
user.password = 'demo'
user.new_password = 'demo'
user.insert()
def import_json(doctype, submit=False, values=None):
@@ -376,6 +377,12 @@ def setup_budget():
def setup_user_roles():
user = frappe.get_doc('User', 'demo@erpnext.com')
user.add_roles('HR User', 'HR Manager', 'Accounts User', 'Accounts Manager',
'Stock User', 'Stock Manager', 'Sales User', 'Sales Manager', 'Purchase User',
'Purchase Manager', 'Projects User', 'Manufacturing User', 'Manufacturing Manager',
'Support Team')
if not frappe.db.get_global('demo_hr_user'):
user = frappe.get_doc('User', 'CharmaineGaudreau@example.com')
user.add_roles('HR User', 'HR Manager', 'Accounts User')
@@ -430,3 +437,23 @@ def setup_pos_profile():
})
pos.insert()
def setup_leave_allocation():
year = now_datetime().year
for employee in frappe.get_all('Employee', fields=['name']):
leave_types = frappe.get_all("Leave Type", fields=['name', 'max_days_allowed'])
for leave_type in leave_types:
if not leave_type.max_days_allowed:
leave_type.max_days_allowed = 10
leave_allocation = frappe.get_doc({
"doctype": "Leave Allocation",
"employee": employee.name,
"from_date": "{0}-01-01".format(year),
"to_date": "{0}-12-31".format(year),
"leave_type": leave_type.name,
"new_leaves_allocated": random.randint(1, int(leave_type.max_days_allowed))
})
leave_allocation.insert()
leave_allocation.submit()
frappe.db.commit()

View File

@@ -1,15 +1,19 @@
from __future__ import unicode_literals
import frappe
import random
from frappe.utils import random_string
from frappe.utils import random_string, add_days
from erpnext.projects.doctype.timesheet.test_timesheet import make_timesheet
from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_sales_invoice
from frappe.utils.make_random import how_many, get_random
from erpnext.hr.doctype.expense_claim.expense_claim import get_expense_approver, make_bank_entry
from erpnext.hr.doctype.leave_application.leave_application import get_leave_balance_on, OverlapError
def work():
frappe.set_user(frappe.db.get_global('demo_hr_user'))
year, month = frappe.flags.current_date.strftime("%Y-%m").split("-")
mark_attendance()
make_leave_application()
# process payroll
if not frappe.db.get_value("Salary Slip", {"month": month, "fiscal_year": year}):
@@ -123,4 +127,53 @@ def make_sales_invoice_for_timesheet(name):
sales_invoice.calculate_taxes_and_totals()
sales_invoice.insert()
sales_invoice.submit()
frappe.db.commit()
frappe.db.commit()
def make_leave_application():
allocated_leaves = frappe.get_all("Leave Allocation", fields=['employee', 'leave_type'])
for allocated_leave in allocated_leaves:
leave_balance = get_leave_balance_on(allocated_leave.employee, allocated_leave.leave_type, frappe.flags.current_date,
consider_all_leaves_in_the_allocation_period=True)
if leave_balance != 0:
if leave_balance == 1:
to_date = frappe.flags.current_date
else:
to_date = add_days(frappe.flags.current_date, random.randint(0, leave_balance-1))
leave_application = frappe.get_doc({
"doctype": "Leave Application",
"employee": allocated_leave.employee,
"from_date": frappe.flags.current_date,
"to_date": to_date,
"leave_type": allocated_leave.leave_type,
"status": "Approved"
})
try:
leave_application.insert()
leave_application.submit()
frappe.db.commit()
except (OverlapError):
frappe.db.rollback()
def mark_attendance():
att_date = frappe.flags.current_date
for employee in frappe.get_all('Employee', fields=['name'], filters = {'status': 'Active'}):
if not frappe.db.get_value("Attendance", {"employee": employee.name, "att_date": att_date}):
attendance = frappe.get_doc({
"doctype": "Attendance",
"employee": employee.name,
"att_date": att_date
})
leave = frappe.db.sql("""select name from `tabLeave Application`
where employee = %s and %s between from_date and to_date and status = 'Approved'
and docstatus = 1""", (employee.name, att_date))
if leave:
attendance.status = "Absent"
else:
attendance.status = "Present"
attendance.save()
attendance.submit()
frappe.db.commit()

View File

@@ -7,6 +7,8 @@ import frappe, random
from frappe.desk import query_report
from erpnext.stock.stock_ledger import NegativeStockError
from erpnext.stock.doctype.serial_no.serial_no import SerialNoRequiredError, SerialNoQtyError
from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return
def work():
frappe.set_user(frappe.db.get_global('demo_manufacturing_user'))
@@ -15,6 +17,8 @@ def work():
make_delivery_note()
make_stock_reconciliation()
submit_draft_stock_entries()
make_sales_return_records()
make_purchase_return_records()
def make_purchase_receipt():
if random.random() < 0.6:
@@ -95,3 +99,26 @@ def submit_draft_stock_entries():
OperationsNotCompleteError):
frappe.db.rollback()
def make_sales_return_records():
for data in frappe.get_all('Delivery Note', fields=["name"], filters={"docstatus": 1}):
if random.random() < 0.2:
print "dn"
try:
dn = make_sales_return(data.name)
dn.insert()
dn.submit()
frappe.db.commit()
except Exception, e:
frappe.db.rollback()
def make_purchase_return_records():
for data in frappe.get_all('Purchase Receipt', fields=["name"], filters={"docstatus": 1}):
if random.random() < 0.2:
print "purchase"
try:
pr = make_purchase_return(data.name)
pr.insert()
pr.submit()
frappe.db.commit()
except Exception, e:
frappe.db.rollback()

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

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