Compare commits

...

153 Commits

Author SHA1 Message Date
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
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
210 changed files with 1731 additions and 1446 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.4'
__version__ = '7.0.20'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -95,13 +95,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 &&
@@ -414,10 +414,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 +433,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 +601,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

@@ -247,12 +247,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 +272,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 +574,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 +678,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

@@ -20,7 +20,7 @@ def get_pos_data():
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)
@@ -108,27 +108,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:
@@ -214,9 +221,9 @@ def submit_invoice(si_doc, name):
save_invoice(e, si_doc, name)
def save_invoice(e, si_doc, name):
si_doc.docstatus = 0
si_doc.name = ''
si_doc.save(ignore_permissions=True)
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
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

@@ -10,6 +10,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -1135,7 +1136,7 @@
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
@@ -3676,7 +3677,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-07-07 13:40:27.977803",
"modified": "2016-08-03 11:50:49.680278",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -87,15 +87,6 @@ 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):
if not self.recurring_id:
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
@@ -110,6 +101,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
@@ -296,6 +288,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({
@@ -504,6 +502,7 @@ class SalesInvoice(SellingController):
gl_entries = merge_similar_entries(gl_entries)
self.make_pos_gl_entries(gl_entries)
self.make_gle_for_change(gl_entries)
self.make_write_off_gl_entry(gl_entries)
@@ -578,27 +577,24 @@ class SalesInvoice(SellingController):
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 = ''
for payment_mode in self.payments:
if payment_mode.type == 'Cash':
cash_account = payment_mode.account
if payment_mode.base_amount > 0:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"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({
@@ -609,20 +605,44 @@ class SalesInvoice(SellingController):
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)
def make_gle_for_change(self, gl_entries):
if cint(self.is_pos) and self.change_amount:
cash_account = self.get_cash_account()
if cash_account:
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": cash_account,
"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": 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)
"credit": self.base_change_amount
})
)
def get_cash_account(self):
cash_account = [d.account for d in self.payments if d.type=="Cash"]
if cash_account:
cash_account = cash_account[0]
else:
cash_account = frappe.db.get_value("Account",
filters={"company": self.company, "account_type": "Cash", "is_group": 0})
return cash_account
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

@@ -503,7 +503,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

@@ -177,6 +177,7 @@ 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){
@@ -423,16 +424,16 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
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)) ){
if(in_list(item.batch_nos, me.search.$input.val())){
return me.item_batch_no[item.item_code] = 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 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()
}
})
}else{
@@ -869,6 +870,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
}
}

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 +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/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

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

View File

@@ -87,7 +87,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

@@ -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

@@ -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"

View File

@@ -440,33 +440,32 @@ class calculate_taxes_and_totals(object):
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()
self.calculate_change_amount()
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
flt(self.doc.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"))
def calculate_paid_amount(self):
paid_amount = base_paid_amount = 0.0
for payment in self.doc.get('payments'):
payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
paid_amount += payment.amount
base_paid_amount += payment.base_amount
if flt(payment.amount) > 0:
payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
paid_amount += payment.amount
base_paid_amount += payment.base_amount
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
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.base_change_amount = flt(self.doc.change_amount * self.doc.conversion_rate,
self.doc.precision("base_change_amount"))
def calculate_margin(self, item):

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

@@ -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: 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.

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -38,7 +38,7 @@ You can create Custom Form, Fields, Scripts and can also create your own Apps
to extend ERPNext functionality.</p>
<p>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.</p>
</div>

View File

@@ -1,21 +1,19 @@
journal-entry
sales-invoice
purchase-invoice
payment-request
chart-of-accounts
opening-accounts
sales-invoice
point-of-sale-pos-invoice
purchase-invoice
journal-entry
payment-entry
multi-currency-accounting
advance-payment-entry
payment-request
credit-limit
opening-entry
accounting-reports
accounting-entries
managing-fixed-assets
budgeting
opening-accounts
item-wise-tax
point-of-sale-pos-invoice
multi-currency-accounting
item-wise-taxation
recurring-orders-and-invoices
pricing-rule
tools

View File

@@ -1,4 +1,3 @@
Taxes selected in the Tax and Other Charges in transactions are applied on all the items. If you need different taxes applied on items selected in the same transaction, you should setup you item and tax master as explained in the steps below.
####Step 1: Mention Tax Applicable in the Item master

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