Compare commits

...

1279 Commits

Author SHA1 Message Date
Pratik Vyas
c20072e940 Merge branch 'develop' 2015-01-23 16:16:53 +05:30
Pratik Vyas
e4c2ebfc57 bumped to version 4.20.0 2015-01-23 16:46:53 +06:00
Nabin Hait
587c061550 Merge pull request #2622 from neilLasrado/batch-patch
patch for is_batch_item
2015-01-23 15:45:53 +05:30
Neil Trini Lasrado
40a9f6f8e9 patch fix 2015-01-23 15:32:35 +05:30
Neil Trini Lasrado
f0b0464cce patch for is_batch_item 2015-01-23 15:32:35 +05:30
Nabin Hait
4e803af0e6 Merge pull request #2625 from nabinhait/fix1
Allow nagative batch balance from landed cost voucher
2015-01-23 14:30:31 +05:30
Nabin Hait
4ccd8d3326 Allow nagative batch balance from landed cost voucher 2015-01-23 12:18:14 +05:30
Nabin Hait
9768467d53 Merge pull request #2619 from nabinhait/fix1
POS fix: setting discount amount
2015-01-21 17:53:09 +05:30
Nabin Hait
59de1e23bc POS fix: setting discount amount 2015-01-21 17:50:28 +05:30
Pratik Vyas
f19b1e0c6b Merge branch 'develop' 2015-01-21 17:05:29 +05:30
Pratik Vyas
d33a3a295f bumped to version 4.19.0 2015-01-21 17:35:29 +06:00
Nabin Hait
f749302d25 Merge pull request #2616 from nabinhait/fix1
Fix1
2015-01-21 16:32:28 +05:30
Nabin Hait
9c47efb592 Landed cost voucher: allow negative stock while doing cancellation entry for purchase receipts 2015-01-21 16:22:45 +05:30
Nabin Hait
ea61046e8d Updated Quotation Status 2015-01-21 14:08:06 +05:30
Nabin Hait
3f671ea60f Landed Cost Voucher: Add field and fixed reposting issue 2015-01-21 14:08:06 +05:30
Pratik Vyas
c1a7c3b08b Update .travis.yml 2015-01-21 12:39:26 +05:30
Pratik Vyas
d1225661d2 Translation updates 2015-01-21 12:05:45 +05:30
Rushabh Mehta
302eee9406 Merge pull request #2463 from Steggur/develop
first is translation commit
2015-01-19 17:08:53 +05:30
Nabin Hait
b434464b1c Merge pull request #2604 from nabinhait/fix1
Fixes
2015-01-19 11:10:39 +05:30
Nabin Hait
aabeb38c15 minor fix 2015-01-19 11:07:32 +05:30
Nabin Hait
fe93ea56b6 Minor fixes: escaped characters 2015-01-19 11:07:32 +05:30
Pratik Vyas
b301603740 Merge branch 'develop' 2015-01-17 01:42:05 +05:30
Pratik Vyas
d7ba759844 bumped to version 4.18.1 2015-01-17 02:12:05 +06:00
Nabin Hait
8efe58bd3c Merge pull request #2591 from nabinhait/fix1
Fixes
2015-01-16 12:03:49 +05:30
Nabin Hait
6609938483 Removed validation: target_valuation > source_valuation 2015-01-16 11:59:47 +05:30
Nabin Hait
84662f2db5 minor fix in payment receipt voucher print format 2015-01-16 11:59:47 +05:30
Nabin Hait
da975f5a76 Merge pull request #2581 from nabinhait/fix1
minor fix
2015-01-14 11:49:46 +05:30
Nabin Hait
f34c96bf7a minor fix 2015-01-14 11:49:04 +05:30
Pratik Vyas
0f96f8e68f Merge branch 'develop' 2015-01-14 11:42:45 +05:30
Pratik Vyas
991962b6fd bumped to version 4.18.0 2015-01-14 12:12:45 +06:00
Nabin Hait
c481e27d88 Merge pull request #2565 from alexandre-00/patch-11
Update bom.py
2015-01-14 11:39:08 +05:30
Nabin Hait
56e04e0727 Merge pull request #2576 from nabinhait/fix1
Discount amount in party currency
2015-01-14 11:27:30 +05:30
Nabin Hait
2244ac4d52 Discount amount in party currency 2015-01-12 17:35:37 +05:30
Nabin Hait
024b537b7f Merge pull request #2557 from neilLasrado/spelling-of-approver
Spelling Correction - Leave application #2552
2015-01-12 17:02:10 +05:30
Pratik Vyas
e4ee5c3f1c Update .travis.yml 2015-01-12 12:48:27 +05:30
Pratik Vyas
4b3d99d39a Merge branch 'develop' 2015-01-12 12:14:36 +05:30
Pratik Vyas
47a10f5a39 bumped to version 4.17.0 2015-01-12 12:44:35 +06:00
Nabin Hait
ecb39a5b63 Merge pull request #2571 from nabinhait/fix1
Fixes
2015-01-12 11:04:50 +05:30
Nabin Hait
39c8c9e7b0 Fixes in print format css 2015-01-12 11:04:07 +05:30
Nabin Hait
4e7cc93af9 minor fix in reposting utility 2015-01-12 10:55:48 +05:30
Rushabh Mehta
f8cb1a916e Merge pull request #2570 from dalers/develop
fix web links and clarify install options
2015-01-12 10:47:06 +05:30
Dale Scott
ab2e75e98e Update README.md 2015-01-11 11:04:43 -07:00
Dale Scott
354892b1c6 Update README.md 2015-01-11 11:01:01 -07:00
Dale Scott
abe69afd69 corrections and clarifications
mostly current websites for user guide, forum, ...
2015-01-11 10:38:03 -07:00
Nabin Hait
c72a89aaf8 Merge pull request #2569 from nabinhait/fix1
create material request from production planning tool
2015-01-11 22:04:07 +05:30
Nabin Hait
873d98be2d create material request from production planning tool 2015-01-11 22:01:59 +05:30
Nabin Hait
f1d06b02e7 Merge pull request #2567 from nabinhait/fix1
valuation rate mandatory if item is transacting for the first time
2015-01-10 10:31:34 +05:30
Nabin Hait
675276b802 valuation rate mandatory if item is transacting for the first time 2015-01-10 10:27:28 +05:30
alexandre-00
3ed3a2d176 Update bom.py
removed the attrgetter
2015-01-09 14:42:27 +08:00
Rushabh Mehta
9e95e780da Merge pull request #2560 from neilLasrado/test-fix
opportunity - test records fixed
2015-01-09 12:03:28 +05:30
alexandre-00
de58657537 Update bom.py
Hi guys,

Just a proposal to sort the Materials Required (Exploded) from the BOM.
So the items and sub-assemblies items looks a little bit more organized in the list.

Cheers
Alexandre
2015-01-09 14:20:43 +08:00
Anand Doshi
015fa7a1d1 [fix] escape quote in Accounts Receivable 2015-01-08 18:26:53 +05:30
Neil Trini Lasrado
1ff3a6cdb8 fix 2015-01-07 16:24:52 +05:30
Nabin Hait
7620efc9ad Merge pull request #2561 from nabinhait/fix1
fix reposting gl entries for future vouchers
2015-01-07 15:49:35 +05:30
Nabin Hait
7778b480fd fix reposting gl entries for future vouchers 2015-01-07 15:45:10 +05:30
Neil Trini Lasrado
a17d7cea34 test records fixed 2015-01-07 15:42:59 +05:30
Pratik Vyas
a9cafcb8ae Merge branch 'develop' 2015-01-07 11:37:22 +05:30
Pratik Vyas
bdfd0d1ff9 bumped to version 4.16.0 2015-01-07 12:07:22 +06:00
Nabin Hait
afc8b1a087 Merge pull request #2558 from nabinhait/fix1
message changed
2015-01-07 11:34:42 +05:30
Nabin Hait
6c1773025b fiscal year error message 2015-01-07 11:33:14 +05:30
Neil Trini Lasrado
1b7d66fab6 Update leave_application.js 2015-01-07 11:16:41 +05:30
Nabin Hait
e24365f1f4 message fix 2015-01-06 12:57:23 +05:30
Nabin Hait
fd334bf451 Merge pull request #2551 from nabinhait/fix1
minor fix
2015-01-05 08:20:08 +05:30
Nabin Hait
5515b1ea7f minor fix 2015-01-05 08:18:15 +05:30
Nabin Hait
96d67f5153 Merge pull request #2547 from nabinhait/fix1
minor fix
2015-01-04 17:29:14 +05:30
Nabin Hait
8a00319962 minor fix 2015-01-04 17:27:40 +05:30
Nabin Hait
c6136e4801 Merge pull request #2543 from nabinhait/fix1
FG item and raw material can not be merged
2015-01-02 15:13:17 +05:30
Nabin Hait
0938b5dec6 FG item and raw material can not be merged 2015-01-02 15:12:30 +05:30
Nabin Hait
88f8fcb32e Merge pull request #2542 from nabinhait/fix1
In stock entry, difference account can be non-profit-and-loss account
2015-01-02 14:37:43 +05:30
Nabin Hait
f40ce616a7 In stock entry, difference account can be non-profit-and-loss account 2015-01-02 14:37:01 +05:30
Pratik Vyas
b02788b915 Merge branch 'develop' 2014-12-31 12:41:14 +05:30
Pratik Vyas
b094ee45d7 bumped to version 4.15.4 2014-12-31 13:11:14 +06:00
Nabin Hait
de0c87757a Merge pull request #2539 from nabinhait/fix1
item validation in bom
2014-12-31 12:37:38 +05:30
Nabin Hait
5604f987f2 item validation in bom 2014-12-31 12:37:11 +05:30
Nabin Hait
9d14f0f36a Merge pull request #2538 from nabinhait/fix1
set missing cost center using default
2014-12-30 18:35:14 +05:30
Nabin Hait
a74468b353 set missing cost center using default 2014-12-30 18:33:52 +05:30
Nabin Hait
35f81b24f1 Merge pull request #2537 from nabinhait/fix1
focus on barcode field after adding a row
2014-12-30 17:53:58 +05:30
Nabin Hait
40431cbf89 focus on barcode field after adding a row 2014-12-30 17:53:16 +05:30
Nabin Hait
5529f14aaf Merge pull request #2536 from nabinhait/fix1
Fixes in Stock Analytics
2014-12-30 16:35:57 +05:30
Nabin Hait
54c31b498b Fixes in Stock Analytics 2014-12-30 16:33:07 +05:30
Nabin Hait
899dba9022 Merge pull request #2535 from nabinhait/fix1
always calculate taxes and totals onchange of exchange rate
2014-12-30 15:41:22 +05:30
Nabin Hait
7d8fa8089a always calculate taxes and totals onchange of exchange rate 2014-12-30 15:35:59 +05:30
Pratik Vyas
ac86c5b6d1 Merge branch 'develop' 2014-12-28 16:59:08 +05:30
Pratik Vyas
ecc3f312b9 bumped to version 4.15.3 2014-12-28 17:29:08 +06:00
Nabin Hait
b65b5f43a7 Merge pull request #2530 from nabinhait/fix1
exchange_rate no_copy fix
2014-12-26 11:00:03 +05:30
Nabin Hait
c3270d7504 exchange_rate no_copy fix 2014-12-26 10:58:58 +05:30
Pratik Vyas
ea909ace01 Merge branch 'develop' 2014-12-23 19:11:08 +05:30
Pratik Vyas
f64d11da3c bumped to version 4.15.2 2014-12-23 19:41:08 +06:00
Nabin Hait
95225be93d Merge pull request #2509 from pdvyas/fix-patches
add reload_doc in a few patches
2014-12-23 17:43:52 +05:30
Nabin Hait
e5d169b8d2 Merge pull request #2521 from nabinhait/fix1
fixed negative batch wty message
2014-12-23 11:26:04 +05:30
Nabin Hait
da4e3fb366 fixed negative batch wty message 2014-12-23 10:58:01 +05:30
Nabin Hait
13ce150149 Merge pull request #2520 from nabinhait/fix1
minor fix no-copy
2014-12-22 15:07:28 +05:30
Nabin Hait
a04489a72b minor fix no-copy 2014-12-22 14:58:36 +05:30
Pratik Vyas
35cd88b09b Merge branch 'develop' 2014-12-22 11:17:45 +05:30
Pratik Vyas
ff56566506 bumped to version 4.15.1 2014-12-22 11:47:45 +06:00
Nabin Hait
01ad94bfad Merge pull request #2519 from nabinhait/fix1
Dont reset pricing if ignore pricing rule
2014-12-22 11:16:02 +05:30
Nabin Hait
cfe3c54ca0 Dont reset pricing if ignore pricing rule 2014-12-22 10:43:10 +05:30
Pratik Vyas
2f6a20a93a Merge branch 'develop' 2014-12-19 18:13:55 +05:30
Pratik Vyas
5d1543f241 bumped to version 4.15.0 2014-12-19 18:43:55 +06:00
Nabin Hait
c56650c773 Merge pull request #2516 from nabinhait/fix1
Customer should not copied from lead to opoortunity
2014-12-19 10:52:52 +05:30
Nabin Hait
cb11f27558 Customer should not copied from lead to opoortunity 2014-12-19 10:51:59 +05:30
Anand Doshi
98be98816c Merge pull request #2515 from anandpdoshi/anand-dec-18
[fix] In Setup Wizard, load languages from languages.txt
2014-12-18 17:40:58 +05:30
Anand Doshi
ca2c297f72 [fix] In Setup Wizard, load languages from languages.txt 2014-12-18 17:31:21 +05:30
Pratik Vyas
387e1e21cb add reload_doc in a few patches 2014-12-18 11:36:23 +05:30
Nabin Hait
d6e49150a8 Merge pull request #2505 from nabinhait/fix1
Reapply price list if pricing rule reset as blank
2014-12-17 15:39:28 +05:30
Nabin Hait
49a2729663 Reapply price list if pricing rule reset as blank 2014-12-17 11:24:00 +05:30
Pratik Vyas
06baf20edd Merge branch 'develop' 2014-12-16 15:47:07 +05:30
Pratik Vyas
13553c2bf0 bumped to version 4.14.0 2014-12-16 16:17:06 +06:00
Nabin Hait
f638c1acd5 Merge pull request #2503 from nabinhait/fix1
packing list index
2014-12-16 15:17:27 +05:30
Nabin Hait
e4c659386a packing list index 2014-12-16 15:16:55 +05:30
Anand Doshi
cd7a1661c6 Merge pull request #2498 from anandpdoshi/anand-dec-15
[minor] use frappe.attach_print() in salary slip and recurring document
2014-12-16 12:42:40 +05:30
Nabin Hait
96962e2101 Merge pull request #2501 from nabinhait/fix1
Fecth contact details on change of contact in purchase transactions
2014-12-16 11:57:11 +05:30
Nabin Hait
7eedebc970 Fecth contact details on change of contact in purchase transactions 2014-12-16 11:56:21 +05:30
Nabin Hait
437e34accb Merge pull request #2500 from nabinhait/fix1
no copy property for customer's po no
2014-12-16 11:26:08 +05:30
Nabin Hait
0f2137be18 no copy property for customer's po no 2014-12-16 10:37:55 +05:30
Anand Doshi
f87a622ef0 [minor] use frappe.attach_print() in salary slip and recurring document 2014-12-15 23:14:35 +05:30
Nabin Hait
07722b835c Merge pull request #2495 from nabinhait/fix1
Translation fixes
2014-12-15 15:00:12 +05:30
Nabin Hait
3cd7a45c1b Translation fixes 2014-12-15 14:56:58 +05:30
Nabin Hait
90b5174256 minor fix 2014-12-15 11:48:43 +05:30
Pratik Vyas
bffad26226 Merge branch 'develop' 2014-12-12 16:52:09 +05:30
Pratik Vyas
a578f3e23a bumped to version 4.13.1 2014-12-12 17:22:09 +06:00
Nabin Hait
870dd43268 Merge pull request #2489 from nabinhait/fix1
Pull all customer's po no in delivery note when made from multiple SO
2014-12-12 12:50:41 +05:30
Nabin Hait
ad0bd4ca92 Pull all customer's po no in delivery note when made from multiple sales order 2014-12-12 12:49:45 +05:30
Nabin Hait
eba480e15a Merge pull request #2487 from nabinhait/fix1
Fixed bom patch
2014-12-12 11:29:49 +05:30
Nabin Hait
4b83403a63 Fixed bom patch 2014-12-12 11:28:58 +05:30
Nabin Hait
22c9e42f4d Merge pull request #2482 from neilLasrado/fix-cost
Fixed cost calculation Error
2014-12-11 17:36:49 +05:30
Neil Trini Lasrado
6ddc487fb6 patch fix 2014-12-11 17:33:41 +05:30
Neil Trini Lasrado
3a34cadcb2 Fix - Total Fixed Cost with patch 2014-12-11 17:15:12 +05:30
Nabin Hait
b71d1a4c7f Merge pull request #2486 from nabinhait/fix1
Removed gross profit field from sales invoice
2014-12-11 17:14:26 +05:30
Nabin Hait
bef80bab0d Removed gross profit field from sales invoice 2014-12-11 16:27:18 +05:30
Nabin Hait
190210394c Merge pull request #2484 from nabinhait/fix1
Leave application fix
2014-12-11 00:02:38 +05:30
Nabin Hait
5cafcf66b0 Leave application fix 2014-12-10 23:59:04 +05:30
Nabin Hait
d71e50c9fc Merge pull request #2480 from nabinhait/fix1
Fixes for discount amount
2014-12-10 12:44:56 +05:30
Nabin Hait
35ebe1bf78 Tax amount in POS invoice print format 2014-12-10 12:42:32 +05:30
Nabin Hait
b14cc0417d Display tax amount after discount, if there is any discount amount 2014-12-10 12:28:25 +05:30
Pratik Vyas
399a3097e8 Merge branch 'develop' 2014-12-09 16:40:28 +05:30
Pratik Vyas
c8f5c3cdbe bumped to version 4.13.0 2014-12-09 17:10:28 +06:00
Nabin Hait
e83d506319 Merge pull request #2474 from nabinhait/fix1
Added leave approver name field in leave application
2014-12-09 16:37:40 +05:30
Nabin Hait
690bcd7b66 Added leave approver name field in leave application 2014-12-09 16:36:33 +05:30
Nabin Hait
f18d285eab Merge pull request #2473 from nabinhait/fix1
minor fix
2014-12-09 16:31:03 +05:30
Nabin Hait
7887ccb441 Credit days fix 2014-12-09 14:34:14 +05:30
Nabin Hait
d57b57a21d Minor fix in accounts receivable report 2014-12-09 11:56:13 +05:30
erp
9fc0a8cbf8 first is translation commit 2014-12-05 11:17:44 +00:00
Nabin Hait
5cc0531d27 Merge pull request #2451 from revant/develop
"From time" cannot be later than "To time" and hours cannot be negative
2014-12-02 14:27:00 +05:30
Revant Nandgaonkar
0e5cdc8495 Merge branch 'develop' of https://github.com/revant/erpnext into develop 2014-12-02 14:21:15 +05:30
Revant Nandgaonkar
b80d892eab removed unecessary backslash 2014-12-02 14:19:29 +05:30
Revant Nandgaonkar
185af03fb2 Update time_log.py 2014-12-02 14:18:10 +05:30
Nabin Hait
abcbbc63d8 Merge pull request #2435 from nabinhait/fix1
Fixes in authorization rule based on average discount
2014-12-02 10:36:25 +05:30
Nabin Hait
6871c74ce1 Merge pull request #2444 from ankitjavalkarwork/contactmob
Display mobile no. of contact
2014-12-02 10:35:46 +05:30
Revant Nandgaonkar
d0a44ca85c Changed contact_date to Datetime so appointment or call with time can be scheduled 2014-12-01 23:31:53 +05:30
Revant Nandgaonkar
83db3e3ddb "From time" cannot be later than "To time" and hours cannot be negative 2014-12-01 16:53:29 +05:30
Nabin Hait
cc11045fd3 minor fix 2014-11-28 16:59:32 +05:30
Nabin Hait
1b5afe737f Fixes in authorization rule based on average discount 2014-11-28 16:59:32 +05:30
Rushabh Mehta
3d65d9602e [error-reports] 2014-11-28 14:58:43 +05:30
ankitjavalkarwork
9440d080d4 Print Hide Recurring Order/Invoice based fields 2014-11-27 17:28:53 +05:30
ankitjavalkarwork
9269c86339 Display mobile no of contact 2014-11-27 17:13:36 +05:30
Pratik Vyas
7c82d616c9 Merge branch 'develop' 2014-11-25 11:16:33 +05:30
Pratik Vyas
f227379d2f bumped to version 4.12.0 2014-11-25 11:46:33 +06:00
Nabin Hait
eba88919c1 Merge pull request #2431 from mayur-patel/patch-2
Update leave_application.py : Modified get_holidays function
2014-11-25 10:55:11 +05:30
Rushabh Mehta
3408432b50 Merge pull request #2428 from rmehta/translations-update
[translations] updated via frappe.io/translator
2014-11-25 10:54:36 +05:30
Rushabh Mehta
a0949158b7 [translations] updated via frappe.io/translator 2014-11-25 10:53:12 +05:30
Nabin Hait
ea91d2aaf1 Merge pull request #2429 from ankitjavalkarwork/expclaimname
Add configurable naming series to Expense claim
2014-11-25 10:51:03 +05:30
Rushabh Mehta
de992abf83 Merge pull request #2413 from Delte/patch-1
Update tr.csv
2014-11-25 10:49:51 +05:30
Mayur Patel
5d8635a8dc Update leave_application.py
See issue #2422 for more detail.
2014-11-24 16:57:53 +00:00
ankitjavalkarwork
7e911bae95 Add configurable naming series to Expense claim 2014-11-24 18:26:17 +05:30
Nabin Hait
0676cf6d3f Merge pull request #2430 from nabinhait/fix1
Multiple minor fixes
2014-11-24 18:21:37 +05:30
Nabin Hait
b74ae7aa31 Minor fix for order to invoice mapping 2014-11-24 18:17:01 +05:30
Nabin Hait
0ad7db3bbd Minor fix in salary slip net total calculation 2014-11-24 15:25:13 +05:30
Nabin Hait
db74e316d2 Validate serial no after auto-creation based on naming series 2014-11-24 15:25:13 +05:30
Nabin Hait
1897360e4b Set default language as English in setup wizard 2014-11-24 15:25:13 +05:30
Nabin Hait
e7fb957415 Merge pull request #2427 from rmehta/develop
[fix] client side queries
2014-11-24 15:23:27 +05:30
Rushabh Mehta
2f4567fa3c [minor] [ux] address refresh for lead 2014-11-24 15:18:40 +05:30
Rushabh Mehta
0a7abc188e [minor] [ux] contact template 2014-11-24 15:06:40 +05:30
Rushabh Mehta
5eeef7f065 [refactor] address and contact list in customer, supplier, lead, sales person 2014-11-24 14:16:51 +05:30
Rushabh Mehta
7d36875d6f [refactor] address and contact list in customer, supplier, lead, sales person 2014-11-24 14:16:47 +05:30
Delte
2fa718705a Update tr.csv
Typo & translation fix
2014-11-15 22:39:25 +02:00
Pratik Vyas
b1fdbf2335 Merge branch 'develop' 2014-11-14 15:27:34 +05:30
Pratik Vyas
2277922313 bumped to version 4.11.2 2014-11-14 15:57:34 +06:00
Nabin Hait
3e1029309c Merge pull request #2411 from nabinhait/fix1
minor fix
2014-11-14 15:19:51 +05:30
Nabin Hait
aa5deaa070 minor fix 2014-11-14 15:19:07 +05:30
Nabin Hait
6b5d51ca22 Merge pull request #2402 from jorxzpagta/patch-1
Update supplier.js [Displaying Messages on the Communation History]
2014-11-14 15:05:11 +05:30
Nabin Hait
2c114b5bb5 Merge pull request #2407 from ankitjavalkarwork/packingsliphead
Add letterhead field and mapper in Packing Slip
2014-11-14 14:50:28 +05:30
Nabin Hait
bd38a79e5e Merge pull request #2410 from nabinhait/fix1
Minor fixes
2014-11-14 14:48:02 +05:30
Nabin Hait
ccd9fd3e94 Rounding in totals calculation 2014-11-14 14:27:24 +05:30
Nabin Hait
4215b3afc3 temporary fix in payment tool 2014-11-14 10:51:31 +05:30
ankitjavalkarwork
f60f111afe Add letterhead field and mapper in Packing Slip 2014-11-13 17:28:42 +05:30
jorxzpagta
6fe0a3cee3 Update supplier.js
Display Messages on the Communication History
2014-11-12 17:02:06 +08:00
Nabin Hait
f004077734 Map only pending qty from Material Request to Purchase Order/Stock Entry 2014-11-11 10:51:41 +05:30
Nabin Hait
6c5cfd2148 Merge pull request #2396 from nabinhait/fix1
Reference / Cheque date is after due date
2014-11-10 18:07:52 +05:30
Nabin Hait
6c1011df92 Reference / Cheque date is after due date 2014-11-10 14:57:53 +05:30
Pratik Vyas
1582a0ce78 Merge branch 'develop' 2014-11-10 12:38:45 +05:30
Pratik Vyas
b5b821363d bumped to version 4.11.1 2014-11-10 13:08:45 +06:00
Nabin Hait
399afc87ef Merge pull request #2379 from nathando/develop
Remove get_server_field from leave_application
2014-11-10 12:05:40 +05:30
Nabin Hait
8c842af172 Merge pull request #2393 from nabinhait/fix1
Credit days and payment tool fixes
2014-11-10 11:44:37 +05:30
Nabin Hait
bf836277f9 Payment tool fix: get outstanding sales orders 2014-11-10 11:28:25 +05:30
Nabin Hait
10d1806d81 Credit days validation fixes 2014-11-10 11:11:58 +05:30
Pratik Vyas
bc41ce95fc Merge branch 'develop' 2014-11-06 14:36:51 +05:30
Pratik Vyas
4948d336c4 bumped to version 4.11.0 2014-11-06 15:06:51 +06:00
Nabin Hait
be2527d93d Merge pull request #2386 from nabinhait/fix1
Translation fixed for Croatia
2014-11-06 12:52:59 +05:30
Nabin Hait
7f5bb1c8aa Translation fixed for Croatia 2014-11-06 12:51:27 +05:30
Pratik Vyas
a8d40e4409 Merge branch 'develop' 2014-11-05 14:15:47 +05:30
Pratik Vyas
e9b4686fec bumped to version 4.10.0 2014-11-05 14:45:47 +06:00
Nabin Hait
5086ef2499 Update update_requested_and_ordered_qty.py 2014-11-05 12:33:29 +05:30
Nathan Do
8a55d9a795 Remove get_server_field from leave_application
- Make get_holidays and get_total_leave_days global to module
- Replace get_server_field with using whitelisted function
get_total_leave_days
2014-11-05 12:32:57 +08:00
Nabin Hait
1caca80203 Merge pull request #2378 from nabinhait/fix1
Requested and ordered qty calculation
2014-11-04 18:06:00 +05:30
Nabin Hait
9114c26857 Patch to recalculate requested qty and ordered qty for all items 2014-11-04 15:34:03 +05:30
Nabin Hait
941a965af4 Ordered qty calculation logic 2014-11-04 15:34:03 +05:30
Nabin Hait
4acd431b92 Requested qty calculation logic 2014-11-04 15:34:03 +05:30
Nabin Hait
fad0d566f9 Payment receipt voucher print format fixed 2014-11-04 15:34:03 +05:30
Pratik Vyas
e2d4079363 Merge branch 'develop' 2014-11-03 16:04:30 +05:30
Pratik Vyas
b9ce1f590b bumped to version 4.9.3 2014-11-03 16:34:29 +06:00
Nabin Hait
36463ed790 Merge pull request #2375 from nabinhait/fix1
Check credit limit only if customer debited
2014-11-03 15:55:03 +05:30
Nabin Hait
3c8838816d Check credit limit only if customer debited 2014-11-03 15:49:29 +05:30
Nabin Hait
11e50a8eee Merge pull request #2366 from ankitjavalkarwork/fixprinthideamt
Hide totals in DN, Auto set Bank/Cash acc. in JV
2014-11-03 15:38:45 +05:30
Nabin Hait
9de4c60bd6 Merge pull request #2374 from nabinhait/fix1
minor fix
2014-11-03 15:37:51 +05:30
Nabin Hait
5288bdeabb Minor fix 2014-11-03 15:08:21 +05:30
ankitjavalkarwork
f5804438bb Auto set default bank/cash account on select of Bank/Cash Voucher in JV 2014-11-03 12:23:55 +05:30
ankitjavalkarwork
6e06357dc5 Hide totals on checking print_without_amount field in DN 2014-11-03 11:57:44 +05:30
Nabin Hait
28913b97b0 [fix] Null issue fixed in stock analytics report 2014-10-31 14:46:25 +05:30
Pratik Vyas
c59cd46391 Merge branch 'develop' 2014-10-30 14:22:17 +05:30
Pratik Vyas
dda239fd49 bumped to version 4.9.2 2014-10-30 14:52:17 +06:00
Nabin Hait
b86a6ce26a Merge pull request #2358 from nabinhait/fix1
[fix] Floating point issue fixed in payment reconciliation
2014-10-29 14:26:41 +05:30
Nabin Hait
ee212e7bb5 [fix] Floating point issue fixed in payment reconciliation 2014-10-29 14:26:05 +05:30
Nabin Hait
4952c7b3b5 Merge pull request #2343 from ankitjavalkarwork/fixcustissue
Fix Customer Issue error on click event of Serial No. field
2014-10-27 11:40:18 +05:30
ankitjavalkarwork
4e61536f50 Fix Customer Issue error on click event of Serial No. field 2014-10-27 11:08:05 +05:30
Pratik Vyas
f2886f152b Merge pull request #2348 from pdvyas/fix-pdf-test
Fix PDF test
2014-10-27 10:47:00 +05:30
Pratik Vyas
b5c56f6cea [minor] add port to test site 2014-10-27 09:51:08 +05:30
Pratik Vyas
80e95388f5 Merge branch 'develop' 2014-10-27 09:26:36 +05:30
Pratik Vyas
daed0b655a bumped to version 4.9.1 2014-10-27 09:56:36 +06:00
Nabin Hait
fbb994c731 Merge pull request #2344 from nabinhait/fix1
cost center based on project
2014-10-23 13:30:51 +05:30
Nabin Hait
10b155a486 cost center based on project 2014-10-23 13:18:59 +05:30
Nabin Hait
ce6eda709b Merge pull request #2342 from ankitjavalkarwork/fixtimelogui
Change position of 'To Time' field for better UX
2014-10-22 16:57:52 +05:30
ankitjavalkarwork
14e1d20df3 Change position of 'To Time' field for better UX 2014-10-22 16:55:29 +05:30
Pratik Vyas
da8a02d56e Merge branch 'develop' 2014-10-22 14:19:17 +05:30
Pratik Vyas
16343683d9 bumped to version 4.9.0 2014-10-22 14:49:17 +06:00
Nabin Hait
2bdc017aff Merge pull request #2339 from nabinhait/fix1
Minor fixes
2014-10-22 13:11:21 +05:30
Nabin Hait
16e05c321c Removed stock ageing grid report 2014-10-22 13:10:43 +05:30
Nabin Hait
23d7919865 Stock ageing report fix 2014-10-22 13:06:26 +05:30
Nabin Hait
38265efc39 Minor fix 2014-10-21 20:23:39 +05:30
Rushabh Mehta
2d414706dc [hotfix] translation boo boo 2014-10-21 11:49:40 +05:30
Rushabh Mehta
d85e4b0d46 Merge pull request #2331 from rmehta/translation
[translations] update
2014-10-20 17:12:22 +05:30
Rushabh Mehta
45d03af8f6 [translations] update 2014-10-20 17:11:06 +05:30
Nabin Hait
73a3a2a131 Merge pull request #2327 from nabinhait/stock_reco
Fixes in credit note and quotation
2014-10-20 11:51:01 +05:30
Nabin Hait
73804580d4 validate quotation to lead or customer 2014-10-20 11:18:11 +05:30
Nabin Hait
259f9779db Credit Note: Set total amount and print format fix 2014-10-20 11:18:11 +05:30
Pratik Vyas
14e0e58a7d Merge branch 'develop' 2014-10-17 15:04:05 +05:30
Pratik Vyas
5eb373f7b5 bumped to version 4.8.0 2014-10-17 15:34:05 +06:00
Nabin Hait
4595c30a7b Merge pull request #2322 from nabinhait/stock_reco
Partial payment reconciliation
2014-10-17 15:01:13 +05:30
Nabin Hait
fc2dd44694 Partial payment reconciliation. Fixes #1982 2014-10-17 14:57:20 +05:30
Pratik Vyas
053c54017e [minor] add admin password to travis test site 2014-10-17 14:16:10 +05:30
Pratik Vyas
af473d78f2 Merge branch 'develop' 2014-10-15 15:34:39 +05:30
Pratik Vyas
26d096aa87 bumped to version 4.7.2 2014-10-15 16:04:39 +06:00
Nabin Hait
476c613ba6 Merge pull request #2317 from nabinhait/stock_reco
repost stock utility
2014-10-15 15:33:50 +05:30
Nabin Hait
2348a5f592 repost stock utility 2014-10-15 15:31:33 +05:30
Pratik Vyas
9d8d045c66 Merge branch 'develop' 2014-10-15 14:44:35 +05:30
Pratik Vyas
63914dd55b bumped to version 4.7.1 2014-10-15 15:14:35 +06:00
Nabin Hait
93a8042f08 Merge pull request #2316 from nabinhait/stock_reco
Minor fix
2014-10-15 14:44:06 +05:30
Nabin Hait
b2f32dac1b Minor fix 2014-10-15 14:42:18 +05:30
Pratik Vyas
577a3acaac Merge branch 'develop' 2014-10-15 14:35:47 +05:30
Pratik Vyas
5e46ce8a50 bumped to version 4.7.0 2014-10-15 15:05:47 +06:00
Nabin Hait
3b7342b7b5 Merge pull request #2315 from nabinhait/stock_reco
Strip company in setup wizard
2014-10-15 13:59:07 +05:30
Nabin Hait
531077e504 Strip company in setup wizard 2014-10-15 13:55:37 +05:30
Nabin Hait
147918ed66 Merge pull request #2313 from nabinhait/stock_reco
Fix gl entries for stock transactions
2014-10-15 12:44:59 +05:30
Nabin Hait
9bbfca9226 Fix gl entries for stock transactions 2014-10-15 12:24:38 +05:30
Nabin Hait
f1a07ff105 Allow zero rate while reposting 2014-10-15 12:23:35 +05:30
Nabin Hait
fb6e434315 Guess valuation rate in case of negative stock 2014-10-15 11:34:40 +05:30
Rushabh Mehta
3811d96feb Merge pull request #2308 from devdesco-ceo/patch-1
Update README.md
2014-10-15 10:02:06 +05:30
Viktor Zhuromskyy
1017615d02 Update README.md 2014-10-14 10:12:10 -05:00
Pratik Vyas
056d627f46 Merge branch 'develop' 2014-10-14 17:34:01 +05:30
Pratik Vyas
663bfeacf4 bumped to version 4.6.2 2014-10-14 18:04:01 +06:00
Nabin Hait
e918ebd721 Merge pull request #2307 from nabinhait/stock_reco
Minor fixes
2014-10-14 17:16:32 +05:30
Nabin Hait
0dc18f0102 Minor fixes 2014-10-14 17:15:02 +05:30
Pratik Vyas
8ddc882a66 Merge branch 'develop' 2014-10-14 16:16:29 +05:30
Pratik Vyas
49365d0982 bumped to version 4.6.1 2014-10-14 16:46:29 +06:00
Nabin Hait
50c29c7d0f Merge pull request #2306 from nabinhait/stock_reco
Negative stock in perpetual inventory
2014-10-14 16:10:46 +05:30
Nabin Hait
bf492122f8 minor fix 2014-10-14 16:09:14 +05:30
Nabin Hait
38d0ed9f3a Negative stock allowed for perpetual inventory. Blocked in specific case 2014-10-14 16:08:19 +05:30
Pratik Vyas
248a65b37d Merge branch 'develop' 2014-10-14 12:37:07 +05:30
Pratik Vyas
78f86e9385 bumped to version 4.6.0 2014-10-14 13:07:07 +06:00
Nabin Hait
d9f3e0c275 Merge pull request #2297 from neilLasrado/bom-issue
Fix - BOM calculated wrong cost on update cost
2014-10-14 12:28:16 +05:30
Neil Trini Lasrado
c40451ee2e Patch Fixed 2014-10-14 12:14:39 +05:30
Neil Trini Lasrado
6644406185 Fix - BOM calculated wrong cost on update cost 2014-10-14 12:14:38 +05:30
Nabin Hait
b3a962e121 Merge pull request #2304 from nabinhait/stock_reco
Repost gl entries where mismatch with stock balance
2014-10-14 11:58:41 +05:30
Nabin Hait
8a28ccfa2f Repost gl entries where mismatch with stock balance 2014-10-14 11:41:56 +05:30
Nabin Hait
0a75fa09ef Merge pull request #2300 from nabinhait/stock_reco
Minor fixes
2014-10-13 11:52:00 +05:30
Nabin Hait
17a16eeaf4 Tets case fixed for payment tool 2014-10-13 11:43:14 +05:30
Nabin Hait
3d3f0bcf54 Minor fix in setup wizard 2014-10-13 11:32:41 +05:30
Nabin Hait
bc8b20ae3c Allocate entire advance amount if advance against SO/PO 2014-10-13 10:48:26 +05:30
Nabin Hait
daf344e5fd Precision fixed in batch-wise balance report 2014-10-13 10:48:26 +05:30
Pratik Vyas
7916792f99 Merge pull request #2298 from pdvyas/fix-mariadb
add my_config patch to travis
2014-10-12 19:39:52 +05:30
Pratik Vyas
27e37e68b2 add my_config patch to travis 2014-10-12 19:35:46 +05:30
Nabin Hait
a538f8a24a Merge pull request #2296 from nabinhait/stock_reco
Stock balance report and valuation fixes
2014-10-10 21:23:30 +05:30
Nabin Hait
70ec88b733 fixed test cases 2014-10-10 21:22:46 +05:30
Nabin Hait
4f0e5db216 Stock balance grid report deprecated and moved to server side 2014-10-10 20:54:57 +05:30
Nabin Hait
79ed124939 Update journal_voucher.py 2014-10-10 18:19:03 +05:30
Nabin Hait
c0a3cd603b Merge pull request #2290 from ankitjavalkarwork/accreport
Bug Fixes
2014-10-10 18:11:36 +05:30
Nabin Hait
7c6f990cf9 Minor fix for moving average 2014-10-10 18:03:27 +05:30
Nabin Hait
7820b171d3 Stock balance grid report deprecated and moved to server side 2014-10-10 18:03:07 +05:30
ankitjavalkarwork
0cf4cc283c Add Shipping Addr to Sales Invoice 2014-10-10 16:55:03 +05:30
ankitjavalkarwork
9a4b173b88 Add validation for stopped orders, advance payment in journal voucher 2014-10-10 16:28:41 +05:30
ankitjavalkarwork
6d83454237 Disallow Stopped Orders in Against Voucher table 2014-10-10 13:30:10 +05:30
ankitjavalkarwork
ff231b5e62 Allow advance JV payments in Accounts Receivable/Payable 2014-10-10 13:13:39 +05:30
Nabin Hait
4d74216147 Maintain negative stock balance if balance qty is negative 2014-10-09 19:25:19 +05:30
Nabin Hait
b7e5ad0a31 Merge pull request #2276 from ankitjavalkarwork/sopofield
Rearrange To/From, Recurring Type field for better UX
2014-10-09 11:58:13 +05:30
Pratik Vyas
e435592d64 [minor] Fix default website style patch (reload doc) 2014-10-09 11:22:12 +05:30
Nabin Hait
7ddde8dc3a Merge pull request #2278 from nabinhait/stock_reco
stock reco and repost vouchers
2014-10-08 18:38:54 +05:30
Nabin Hait
fce2881de6 minor fix 2014-10-08 18:38:27 +05:30
Nabin Hait
e96e83d557 stock reco and repost vouchers 2014-10-08 18:06:14 +05:30
ankitjavalkarwork
1b2944e871 Rearrange To/From, Recurring Type field for better UX 2014-10-08 14:24:58 +05:30
Rushabh Mehta
074e73a0dd [translations] updated via translator 2014-10-08 14:16:33 +05:30
Nabin Hait
8923801881 Update stock_entry.py 2014-10-08 13:20:31 +05:30
Nabin Hait
cfafe93391 Merge pull request #2274 from nabinhait/stock_reco
Stock reco
2014-10-08 11:03:03 +05:30
Nabin Hait
6c48ef781b Utility: Repost stock ledger entries and gl entries for all stock transactions 2014-10-08 11:02:18 +05:30
Nabin Hait
adeb976a1b Block negative stock in perpetual inventory 2014-10-08 11:02:18 +05:30
Nabin Hait
bb19b91ef9 stock reco fixes 2014-10-08 11:02:18 +05:30
Nabin Hait
bfa7f171bd Stock reconciliation sl entries 2014-10-08 11:02:18 +05:30
Nabin Hait
b96c014daf Stock Reconciliation logic simplified 2014-10-08 11:02:18 +05:30
Pratik Vyas
e0c83e22d9 Merge branch 'develop' 2014-10-07 17:05:32 +05:30
pdvyas
099ad0f5e1 bumped to version 4.5.2 2014-10-07 17:35:32 +06:00
Nabin Hait
cf9746dd84 Merge pull request #2270 from nabinhait/fix2
Voucher dynamic link in general ledger report
2014-10-07 11:33:40 +05:30
Nabin Hait
b70712dbba Voucher dynamic link in general ledger report 2014-10-07 11:32:54 +05:30
Rushabh Mehta
4c057fe693 Merge pull request #2269 from rmehta/fixes
[fix] packing slip
2014-10-07 11:06:08 +05:30
Nabin Hait
ee8ff51d60 Merge pull request #2261 from ankitjavalkarwork/sopofield
[#2253] Rearrange To/From fields and depend on is_recurring
2014-10-07 10:52:10 +05:30
Rushabh Mehta
9974b16c32 [fix] packing slip 2014-10-07 10:52:05 +05:30
ankitjavalkarwork
9e5f319d80 [#2253] Rearrange To/From fields and depend on is_recurring in SI,SO,PI,PO 2014-10-06 12:58:38 +05:30
Nabin Hait
4f614b4030 Merge pull request #2195 from neilLasrado/manufacture-and-repack
[fix] Issue #2183 - Manufacturing and repack seprated in stock entry
2014-09-30 15:11:05 +05:30
Nabin Hait
3d458e973e Merge pull request #2236 from neilLasrado/upstream/develop
Has Batch No field should be freezed #2023
2014-09-30 14:56:15 +05:30
Neil Trini Lasrado
3a19a71262 patch fixed 2014-09-30 14:48:38 +05:30
Neil Trini Lasrado
29d1a1c593 manufacturing and repack sepreted, test cases fixed, patch fixed 2014-09-30 14:07:56 +05:30
Neil Trini Lasrado
3b90de558f Has Batch No field should be freezed #2023 2014-09-30 12:57:32 +05:30
Nabin Hait
af7e31acb3 Merge pull request #2235 from adityaduggal/develop
Added the dynamic link field in the accounts receivable report.
2014-09-30 10:39:40 +05:30
Aditya Duggal
a2c9d35efb Added the dynamic link field. 2014-09-29 17:44:28 +05:30
Aditya Duggal
4c058f4056 Added the dynamic link and removed the link column 2014-09-29 17:41:19 +05:30
Pratik Vyas
ad67b84d43 Merge branch 'develop' 2014-09-29 15:40:04 +05:30
Pratik Vyas
4e81e4065b bumped to version 4.5.1 2014-09-29 16:10:04 +06:00
Nabin Hait
81332789cb Merge pull request #2232 from nabinhait/hotfix
Fix gl entries for stock transactions
2014-09-29 15:25:02 +05:30
Nabin Hait
82d7c0c9eb Patch: Fix gl entries for stock transactions 2014-09-29 15:07:51 +05:30
Nabin Hait
d60235e239 minor fix in warehouse-wise stock balance report 2014-09-29 11:36:06 +05:30
Nabin Hait
9b50b0a762 Fixes for item list view 2014-09-29 11:36:06 +05:30
Pratik Vyas
21e14c4c98 Merge branch 'develop' 2014-09-26 16:49:59 +05:30
Pratik Vyas
16edacebc7 bumped to version 4.5.0 2014-09-26 17:19:59 +06:00
Nabin Hait
75027b4d54 Merge pull request #2225 from nabinhait/hotfix
GL Entries for future stock voucher and multiple minor fixes
2014-09-26 14:48:56 +05:30
Nabin Hait
b0bd99266d Fix in landed cost voucher 2014-09-26 14:30:02 +05:30
Nabin Hait
b9e04815f8 Repost gl entries for future stock vouchers 2014-09-26 14:24:42 +05:30
Nabin Hait
18ccc27b1b Minor fix in naming naming series 2014-09-26 14:23:00 +05:30
Nabin Hait
95f1fe92e2 Maintenance visit search field issue fixed 2014-09-26 14:23:00 +05:30
Nabin Hait
b783f519ee Fixes in sales/purchase invoice trends report 2014-09-26 14:23:00 +05:30
Nabin Hait
996a1010cb Moved Installation note from tools to documents section 2014-09-26 14:23:00 +05:30
Anand Doshi
32a9dfd983 Merge branch 'sbkolate-develop' into develop 2014-09-22 13:19:24 +05:30
Anand Doshi
1394509343 Fixes for recurring document 2014-09-21 19:45:49 +05:30
Pratik Vyas
0f31c36b2c Merge branch 'develop' 2014-09-19 14:46:07 +05:30
Pratik Vyas
14ac8f71b7 bumped to version 4.4.2 2014-09-19 15:16:07 +06:00
Nabin Hait
6a92d51383 Merge pull request #2212 from nabinhait/hotfix
Fetch and validate advance entries in sales/purchase invoice
2014-09-19 14:41:20 +05:30
Nabin Hait
7c831c3fe5 Get advance in sales/purchase invoice 2014-09-19 14:31:49 +05:30
Nabin Hait
778ff463af Minor fix in authorization control 2014-09-19 11:39:47 +05:30
Nabin Hait
70a31d5402 Gantt view fix for translations 2014-09-19 11:18:10 +05:30
Nabin Hait
48f5fa69f3 Fetch and validate advance entries in sales/purchase invoice 2014-09-18 15:04:11 +05:30
Pratik Vyas
83a2d12cd2 Merge branch 'develop' 2014-09-18 14:19:15 +05:30
Pratik Vyas
e539297e53 bumped to version 4.4.1 2014-09-18 14:49:14 +06:00
Nabin Hait
bbc3d015a3 Update authorization_control.py 2014-09-18 14:09:20 +05:30
Nabin Hait
e4475c635d Merge pull request #2211 from nabinhait/hotfix
Escaped single quote in authorization control queries
2014-09-18 13:01:33 +05:30
Anand Doshi
8370cb3e71 Merge branch 'develop' of https://github.com/sbkolate/erpnext into sbkolate-develop 2014-09-18 12:06:05 +05:30
Nabin Hait
4073880ecf Escaped single quote in authorization control queries 2014-09-18 11:01:26 +05:30
Nabin Hait
763c7a56dc Merge pull request #2209 from nabinhait/hotfix
Minor fix in gross profit report
2014-09-17 14:02:51 +05:30
Nabin Hait
556fbc487d Minor fix in gross profit report 2014-09-17 12:13:44 +05:30
Pratik Vyas
54938d431c Merge branch 'develop' 2014-09-16 15:58:28 +05:30
Pratik Vyas
31c61e7eae bumped to version 4.4.0 2014-09-16 16:28:28 +06:00
Anand Doshi
a23151b138 Merge pull request #2202 from 81552433qqcom/develop
hotfix for project wise report and translation.
2014-09-16 15:23:34 +05:30
Anand Doshi
11b75759d2 Merge pull request #2194 from ankitjavalkarwork/stockbalreport
Update report with Valuation rate, stock values, move to Main report
2014-09-16 15:22:25 +05:30
Rushabh Mehta
a2c562fea4 Update CONTRIBUTING.md 2014-09-16 15:21:43 +05:30
Anand Doshi
8950abc36f Merge pull request #2197 from anandpdoshi/anand-september-15
[minor] removed Suggest
2014-09-16 15:18:57 +05:30
Anand Doshi
27c7226d97 Merge pull request #2201 from nabinhait/hotfix
Columns added in report and fixes in customer's account creation
2014-09-16 15:18:31 +05:30
81552433qqcom
1db294e837 hotfix for project wise report
translation patch for email digest and support ticket.
2014-09-16 16:49:58 +08:00
Nabin Hait
16e943f120 Removed link of item-wise last purchase rate from buying home page 2014-09-16 12:57:31 +05:30
Nabin Hait
9d610214cf Strip party name before checking for account 2014-09-16 12:28:40 +05:30
Nabin Hait
c25681c36c Added item group and brand in sales-person-wise transaction summary report 2014-09-16 12:28:40 +05:30
Nabin Hait
1aea75261d Merge pull request #2200 from nabinhait/hotfix
Minor fix
2014-09-16 11:28:15 +05:30
Nabin Hait
5cd20e3d24 Minor fix 2014-09-16 11:26:53 +05:30
Nabin Hait
9968c7ef70 Merge pull request #2199 from nabinhait/hotfix
Minor fix
2014-09-16 11:25:06 +05:30
Nabin Hait
ca260618d8 Minor fix 2014-09-16 11:24:25 +05:30
Anand Doshi
30c5b41398 [minor] removed Suggest 2014-09-15 16:43:34 +05:30
Sambhaji Kolate
f37d4337a4 fix test for purchase order 2014-09-15 13:37:46 +05:30
Anand Doshi
93c2adb2cd Merge pull request #2193 from anandpdoshi/anand-september-15
Recurring fix, cherry-picked nabin's address template fix
2014-09-15 13:04:12 +05:30
Sambhaji Kolate
525ab0a925 fix build 2014-09-15 12:57:58 +05:30
Anand Doshi
a92c6886cd Merge pull request #2173 from ankitjavalkarwork/fix2043
Add message on cancel in SI if C-Form exists, fix minor error, Add validation in C-Form
2014-09-15 12:56:51 +05:30
Anand Doshi
01d171756b [fix] before_recurring, set due_date, ageing_date as None, fixed account due date validation 2014-09-15 12:50:37 +05:30
Sambhaji Kolate
930e7f5578 fix conflict 2014-09-15 12:43:48 +05:30
Sambhaji Kolate
d14e15d432 fix conflict 2014-09-15 12:31:44 +05:30
Sambhaji Kolate
4d3a18890b fix conflict 2014-09-15 12:20:11 +05:30
Nabin Hait
65bef02607 Fixes in address template 2014-09-15 12:18:28 +05:30
Rushabh Mehta
cb9331ddca Merge pull request #2191 from 81552433qqcom/develop
#2190 hotfix, item page
2014-09-15 10:13:09 +05:30
81552433qqcom
ac0c3fb696 #2190 hotfix, item page 2014-09-15 10:21:36 +08:00
Anand Doshi
a844fb78bb Merge branch '81552433qqcom-master' into develop 2014-09-12 16:23:08 +05:30
81552433qqcom
6d02939256 changed indent. as well use tab instead of space. 2014-09-12 16:22:28 +05:30
81552433qqcom
e3b63f2d9c added __() for options that need label. 2014-09-12 16:07:12 +05:30
81552433qqcom
1c440b3b31 month options doesn't get translated. 2014-09-12 16:07:12 +05:30
81552433qqcom
c5a0ef8399 fix according to the suggestion. 2014-09-12 16:07:12 +05:30
81552433qqcom
951da0ca3d added translations to report py file. 2014-09-12 16:07:12 +05:30
81552433qqcom
351be9ca42 translations. 2014-09-12 16:07:11 +05:30
81552433qqcom
4bab0a2f54 various translation missed __() 2014-09-12 16:07:11 +05:30
Anand Doshi
97478b746d Merge pull request #2185 from anandpdoshi/ankit-payment-tool
Payment Tool
2014-09-12 15:53:03 +05:30
Anand Doshi
61a591944b [minor] ui/ux fixes in Payment Tool 2014-09-12 15:42:16 +05:30
Ankit Javalkar
8e7ca41817 Payment Tool #2106 2014-09-12 15:23:46 +05:30
Anand Doshi
84e08fd534 Merge pull request #2174 from neilLasrado/cost-of-production-cycle-magix
Cost of Production cycle
2014-09-12 14:45:19 +05:30
Anand Doshi
b0e56fa1b5 Merge pull request #2181 from nabinhait/hotfix
Report print format fixed for translated columns
2014-09-12 14:18:52 +05:30
Neil Trini Lasrado
e7c48ed3b0 bom operation inList view fix 2014-09-12 12:08:02 +05:30
Nabin Hait
c432270ca8 Report print format fixed for translated columns 2014-09-12 12:00:47 +05:30
Neil Trini Lasrado
6a7f75c3e3 Cost of Production cycle 2014-09-12 11:25:03 +05:30
Neil Trini Lasrado
e9882e12ba Cost of Production cycle 2014-09-12 11:25:03 +05:30
ankitjavalkarwork
3df10429db Add message on cancel in SI if C-Form exists, Add validation in C-Form, remove update_c_form 2014-09-11 16:58:18 +05:30
Anand Doshi
eee569bb20 Merge pull request #2177 from anandpdoshi/anand-september-11
[fix] transfer_qty in get_stock_and_rate
2014-09-11 16:47:59 +05:30
ankitjavalkarwork
2e07305616 Update report with Valuation rate, stock values, move to Main report 2014-09-11 16:47:19 +05:30
Anand Doshi
2f9c36a588 Merge pull request #2175 from ankitjavalkarwork/fix2153
[minor] Add Permission for additional roles to Customer, Supplier
2014-09-11 16:47:08 +05:30
Anand Doshi
907494c5d4 [fix] transfer_qty in get_stock_and_rate 2014-09-11 16:22:12 +05:30
Sambhaji Kolate
b14401c320 change convert_to_recurring() to take recurring_id dynamicaly 2014-09-11 16:09:05 +05:30
Anand Doshi
4d2520ea53 Merge pull request #2176 from nabinhait/hotfix
Opening entry should not be considered in bank reconciliation statement
2014-09-11 15:21:24 +05:30
Nabin Hait
cece0c7ffe Opening entry should not be considered in bank reconciliation statement 2014-09-11 13:59:00 +05:30
ankitjavalkarwork
5e34383e25 [minor] Add Permission for additional roles to Customer, Supplier 2014-09-10 17:54:42 +05:30
Sambhaji Kolate
b2a3f2d386 some minor changes get fixed for PO/PI 2014-09-10 17:40:48 +05:30
Anand Doshi
8e39ee79b0 Merge pull request #2167 from anandpdoshi/anand-september-9
Set allow_on_submit for 'page_break', 'letter_head', 'select_print_heading', 'print_heading'. Fixes frappe/erpnext#1810
2014-09-10 15:24:52 +05:30
Sambhaji Kolate
6b679c45df Updated purchase_invoice.json and purchase_order.json with some missed out changes 2014-09-10 13:57:45 +05:30
Sambhaji Kolate
e3d2643f2b Changes for Recurring PO/PI 2014-09-10 13:07:59 +05:30
Anand Doshi
fc33d5a75b Set allow_on_submit for 'page_break', 'letter_head', 'select_print_heading', 'print_heading'. Fixes frappe/erpnext#1810 2014-09-09 15:25:43 +05:30
Pratik Vyas
6e566fb154 Merge branch 'develop' 2014-09-09 15:10:47 +05:30
Pratik Vyas
6675ce9036 bumped to version 4.3.0 2014-09-09 15:40:47 +06:00
Pratik Vyas
2cf75fcca2 change version in hooks.py 2014-09-09 15:10:18 +05:30
Anand Doshi
941f698daf Merge pull request #2165 from anandpdoshi/anand-september-9
Fix in web clear cache for Item, cheque printing format
2014-09-09 13:59:39 +05:30
Anand Doshi
48b3d1383f [minor] Cheque Printing Format 2014-09-09 12:59:16 +05:30
Anand Doshi
dc79334f1c [fix] Clear website cache for Item Group on saving Item 2014-09-09 12:35:15 +05:30
Anand Doshi
ab74a502e2 Merge pull request #2162 from nabinhait/hotfix
Get items in PO from material requests based on supplier
2014-09-09 12:07:27 +05:30
Nabin Hait
fa18e7c21f Merge pull request #2140 from nathando/patch-1
get_item_list does not [item qty=0]
2014-09-09 12:06:21 +05:30
Nabin Hait
ff7e9b6b22 Get items in PO from material requests based on supplier 2014-09-09 11:01:55 +05:30
Rushabh Mehta
00e93d1c1d Merge pull request #2159 from anandpdoshi/anand-september-8
[minor] Set in_list_view for Sales and Purchase item tables
2014-09-09 09:21:04 +05:30
Anand Doshi
45c9b1c065 [minor] Set in_list_view for Sales and Purchase item tables 2014-09-08 17:42:17 +05:30
Anand Doshi
dcfcd693c2 Merge pull request #2158 from rmehta/translated
transations-08-sep-2014
2014-09-08 15:30:15 +05:30
RM
7ab4ee1d79 transations-08-sep-2014 2014-09-08 09:28:34 +00:00
Nabin Hait
c017ed251d Merge pull request #2151 from ankitjavalkarwork/fix1999
Allow renaming for Sales Partner Doctype
2014-09-08 14:23:17 +05:30
Nabin Hait
34b94aff73 Merge pull request #2154 from anandpdoshi/anand-september-5
Setup Wizard: set corrected number format in system settings
2014-09-08 14:23:07 +05:30
Anand Doshi
65a5f85af5 Setup Wizard: set corrected number format in system settings 2014-09-05 17:27:25 +05:30
Anand Doshi
52a39a00d5 Merge pull request #2149 from anandpdoshi/anand-september-5
[fix] Validate Expense Approver
2014-09-05 15:24:24 +05:30
ankitjavalkarwork
ce9a9eeecc Allow renaming for Sales Partner Doctype 2014-09-05 14:58:21 +05:30
Nabin Hait
cbd433603d Merge pull request #2150 from nabinhait/hotfix
minor fixes
2014-09-05 14:57:02 +05:30
Nabin Hait
91fb661d12 minor fixes 2014-09-05 14:56:24 +05:30
Anand Doshi
0b74b6d98c [fix] Validate Expense Approver 2014-09-05 14:41:53 +05:30
Anand Doshi
d42326bf43 [hotfix] hooks - recurring order 2014-09-05 11:20:29 +05:30
Anand Doshi
4c93f35c2b Merge pull request #2145 from nabinhait/hotfix
Minor fixes
2014-09-04 15:38:00 +05:30
Nabin Hait
84f0cc6614 Dont show opening entries in Bank reconciliation 2014-09-04 15:21:46 +05:30
Nabin Hait
0f798dda15 Valuation rate for finished goods in repack entries 2014-09-04 15:21:46 +05:30
Nabin Hait
629e51a8e9 Search field fixed in stock entry 2014-09-04 15:21:46 +05:30
Anand Doshi
4211aa41a0 [hotfix] Product Search 'More' button 2014-09-04 15:16:13 +05:30
Anand Doshi
5893e143f4 Merge pull request #2143 from anandpdoshi/anand-septemper-3
[minor] id.csv
2014-09-04 15:00:41 +05:30
Anand Doshi
d91c4d3e00 [translations] German translations from a user 2014-09-03 21:39:05 +05:30
Anand Doshi
3d911eba6c [minor] id.csv 2014-09-03 17:33:33 +05:30
Nabin Hait
0c8e4335f9 Merge pull request #2142 from nabinhait/hotfix
removed test records for landed cost voucher
2014-09-03 14:30:50 +05:30
nathando
247e9ffc96 get_item_list does not [item qty=0]
- By using `if not d.qty:` it totally limits the chance of creating an empty Delivery Note 
- Should be changed to `if d.qty is None` 

Use case for empty DN: 
- Open a Delivery Note and tight to a specific Sales Order first without knowing the real qty at this point.
- Using barcode scanner to receive Sales Order to this DN (multiple times).
2014-09-03 15:03:31 +08:00
Pratik Vyas
3f4c3086df Remove frappe version pinning in requirements.txt 2014-09-03 10:35:13 +05:30
Nabin Hait
a84f3663dd removed test records for landed cost voucher 2014-09-02 23:11:06 +05:30
Nabin Hait
714b3ef7f8 Merge pull request #2139 from nabinhait/hotfix
Repost stock reconciliation and valuation rate in repack entry
2014-09-02 20:06:28 +05:30
Nabin Hait
96bdc5834c Get valuation rate in manufacturing/repack entry 2014-09-02 20:02:25 +05:30
Nabin Hait
3f4885e342 repost stock reconciliation 2014-09-02 20:02:24 +05:30
Nabin Hait
ee2bc92ab2 Merge pull request #2134 from nabinhait/hotfix
Stock reconciliation fixes
2014-09-02 20:01:57 +05:30
Pratik Vyas
144f06e381 Update patches.txt 2014-09-01 18:31:11 +05:30
Nabin Hait
7f3f2a0f0a Fixes in repost_stock utility 2014-09-01 18:16:24 +05:30
Nabin Hait
9e563e7b47 Stock reconciliation when valuation rate column is blank 2014-09-01 18:16:24 +05:30
Nabin Hait
12ce3eefca landed cost voucher added in module page 2014-09-01 18:16:24 +05:30
Anand Doshi
f395b7ce11 [hotfix] item grid rate visibility booboo 2014-09-01 17:26:00 +05:30
Anand Doshi
4228adfaa7 Merge pull request #2109 from ankitjavalkarwork/recurringorder2
Commonified Recurring for Sales Invoice and Sales Order
2014-09-01 16:34:12 +05:30
Anand Doshi
8ad474b910 Merge pull request #2122 from neilLasrado/print-templates-fix
[Cosmetics] Print Templates Layout Improved
2014-09-01 16:33:34 +05:30
ankitjavalkarwork
737d8e4d9f fix minor issue and set default value send as pdf 2014-09-01 16:22:56 +05:30
ankitjavalkarwork
aaac7c17b8 Fix minor errors, fix patch, call in hooks, move from account_controller to recurring_document 2014-09-01 16:22:56 +05:30
ankitjavalkarwork
28a975dd32 Add patch for field name change in SI, rename email template 2014-09-01 16:22:56 +05:30
ankitjavalkarwork
e60822b094 Add tests for Recurring Document, Sales Inv, Sales Order, fix minor errors 2014-09-01 16:20:59 +05:30
ankitjavalkarwork
ac085e0f59 Add manage_recurring_documents and path to hooks, fix minor issues 2014-09-01 16:20:59 +05:30
ankitjavalkarwork
e8331d40f3 Commonify Recurring Sales Order/Invoice 2014-09-01 16:20:59 +05:30
Rushabh Mehta
21b8d30c80 Merge pull request #2131 from anandpdoshi/anand-september-1
Hide Rate, Amount in Item Grid template based on permlevel
2014-09-01 12:52:45 +05:30
Anand Doshi
24989b90ba Hide Rate, Amount in Item Grid template based on permlevel 2014-09-01 12:38:09 +05:30
Nabin Hait
4f1bccb53d Merge pull request #2129 from anandpdoshi/anand-september-1
[patch] Set company's country
2014-09-01 11:11:19 +05:30
Anand Doshi
98eacdb785 [patch] Set company's country 2014-09-01 10:23:47 +05:30
Neil Trini Lasrado
8331ec7482 [cosmetics] Cheque Print format 2 2014-08-29 20:27:45 +05:30
Neil Trini Lasrado
d43752fc4f [cosmetics] Cheque Print format 1 2014-08-29 16:43:48 +05:30
Neil Trini Lasrado
bd03c8b28a Merge branch 'develop' of https://github.com/frappe/erpnext into print-templates-fix 2014-08-29 16:42:44 +05:30
Anand Doshi
d490933fce Merge pull request #2125 from anandpdoshi/anand-august-29
[fix] Maintenance Schedule, Incoming Rate
2014-08-29 16:38:03 +05:30
Neil Trini Lasrado
f65817d4c2 [cosmetics] payment receipt Print format 1 2014-08-29 16:31:57 +05:30
Anand Doshi
40a8ae2907 [fix] get incoming rate 2014-08-29 16:28:31 +05:30
Anand Doshi
12b98027ee [fix] Maintenance Scheduler periodicity validation 2014-08-29 16:11:11 +05:30
Neil Trini Lasrado
45a0ea9628 Merge branch 'develop' of https://github.com/frappe/erpnext into print-templates-fix 2014-08-29 15:48:42 +05:30
Anand Doshi
98ff85dea1 Merge pull request #2108 from neilLasrado/fix-issue-448
[Fix] Issue #448
2014-08-29 15:46:13 +05:30
Anand Doshi
0015157cba Merge pull request #2120 from nabinhait/hotfix
Fixes in BOM and maintenance schedule
2014-08-29 15:43:00 +05:30
Anand Doshi
f513531d3a Merge pull request #2114 from neilLasrado/credit-note-feature
[print-template] Credit Note Issue #31
2014-08-29 15:32:42 +05:30
Neil Trini Lasrado
4e16e9ed89 Refactored Credit Note Print Format 2014-08-29 13:20:58 +05:30
Anand Doshi
9f0ea97d85 [fix] get future vouchers query
[print-template] Credit Note Issue #31 2
2014-08-29 12:50:28 +05:30
Neil Trini Lasrado
7a435bb4f1 [print-template] Credit Note Issue #31 1 2014-08-29 12:50:28 +05:30
Neil Trini Lasrado
014346acba [print-template] Credit Note 2014-08-29 12:50:28 +05:30
Anand Doshi
c90773cc85 Merge pull request #2115 from anandpdoshi/user-permission-doctypes
HR permissions, translations
2014-08-29 11:55:51 +05:30
Nabin Hait
0514e07ef4 minor fix 2014-08-29 11:50:59 +05:30
Nabin Hait
14b8af2e65 Rounding issue fixed for bom quantity 2014-08-29 11:50:58 +05:30
Nabin Hait
818bacae49 Minor fix in maintenance schedule 2014-08-29 11:50:58 +05:30
Anand Doshi
6ba2e3deef Merge pull request #2118 from anandpdoshi/anand-august-28
[fix] default quotation list filter
2014-08-29 11:25:21 +05:30
Anand Doshi
bb370f3b6a HR - Leave Approver and Expense Approver fields changed to Link Fields, better default permissions 2014-08-29 11:19:10 +05:30
Anand Doshi
f680626f53 [minor] send translations in response 2014-08-29 11:19:10 +05:30
Neil Trini Lasrado
83ca3e5563 [Cosmetics] Print Templates Layout Improved 2014-08-28 14:48:16 +05:30
Anand Doshi
37cb544839 [fix] default quotation list filter 2014-08-28 11:27:18 +05:30
Nabin Hait
ec8964dde5 Merge pull request #2117 from anandpdoshi/anand-august-27
[fix] get future vouchers query
2014-08-28 10:43:35 +05:30
Anand Doshi
913c51b1f8 [fix] get future vouchers query 2014-08-27 22:09:15 +05:30
Neil Trini Lasrado
cd1efb94ed Merge branch 'develop' of https://github.com/frappe/erpnext into fix-issue-448 2014-08-27 18:49:03 +05:30
Neil Trini Lasrado
d6d71e8078 [fix] issue 448 final 1 2014-08-27 18:48:57 +05:30
Pratik Vyas
4cb67339c5 Merge pull request #2112 from anandpdoshi/anand-august-27
Enqueue Newsletter sending in Longjob Queue
2014-08-27 15:14:26 +05:30
Neil Trini Lasrado
4b71fe6fc1 Merge branch 'develop' of https://github.com/frappe/erpnext into fix-issue-448 2014-08-27 12:31:31 +05:30
Anand Doshi
46256cddd7 Enqueue Newsletter sending in Longjob Queue 2014-08-27 12:23:52 +05:30
Neil Trini Lasrado
ad24069cdc [fix] issue 448 final 2014-08-26 16:30:39 +05:30
Nabin Hait
3b1733bc04 minor fix in sales invoice test records 2014-08-26 16:30:39 +05:30
Anand Doshi
43f087c99d [hotfix] Supplier read permission for Purchase User
[Fix] Issue #448

[Fix] Issue #448 2
2014-08-26 16:30:39 +05:30
Nabin Hait
54ca95bc6e Merge pull request #2110 from nabinhait/hotfix
minor fix in sales invoice test records
2014-08-26 16:21:32 +05:30
Nabin Hait
e3f2323e14 minor fix in sales invoice test records 2014-08-26 16:20:38 +05:30
Anand Doshi
c147667486 [hotfix] Supplier read permission for Purchase User 2014-08-26 14:26:07 +05:30
Anand Doshi
5ed2c06eb5 Merge pull request #2089 from neilLasrado/item_group
Item group
2014-08-26 12:56:54 +05:30
Neil Trini Lasrado
9d1e8b61fe [Fix] Issue #980 final 2014-08-25 19:04:30 +05:30
Anand Doshi
e0ffe7a575 [hotfix] Product Search 2014-08-25 18:38:08 +05:30
Neil Trini Lasrado
d676491b6e Merge https://github.com/frappe/erpnext into item_group 2014-08-25 16:18:31 +05:30
Anand Doshi
580f447bbd Merge pull request #2100 from rmehta/aug-22
[cleanup] remove allow_attach
2014-08-25 16:07:50 +05:30
Rushabh Mehta
52f04da5f5 [style] default website 2014-08-25 15:17:20 +05:30
Nabin Hait
06927a20b2 Update repost_stock.py 2014-08-25 14:08:54 +05:30
Neil Trini Lasrado
caba531e89 [fix] issue#980 2014-08-25 13:22:15 +05:30
Rushabh Mehta
7a6ab91080 remove set_title_left 2014-08-25 13:04:22 +05:30
Rushabh Mehta
e8dd4160d4 [cleanup] remove allow_attach 2014-08-25 13:04:21 +05:30
Anand Doshi
bb6b58c271 Merge pull request #2074 from neilLasrado/purchase-invoice-fix
[fix] frappe/erpnext#1510
2014-08-25 12:51:16 +05:30
Anand Doshi
def374370f Merge pull request #2083 from geo-poland/basic-polish-language-support
Basic Polish language support
2014-08-25 12:48:33 +05:30
Nabin Hait
b748115609 Merge pull request #2101 from nabinhait/hotfix
Required raw materials qty in PP tool
2014-08-23 20:05:42 +05:30
Nabin Hait
a592a914b8 PP Tool: get query for sales order 2014-08-22 16:25:04 +05:30
Nabin Hait
1ae48f4988 Required raw materials qty in PP tool 2014-08-22 16:20:07 +05:30
Nabin Hait
bb29d15d5a Merge pull request #2099 from nabinhait/hotfix
Minor fixes
2014-08-22 15:26:38 +05:30
Nabin Hait
40e3d0c780 General ledger: debit/credit value rounding upto 3 decimals 2014-08-22 14:37:55 +05:30
Nabin Hait
00fc600e8b PP Tool: Raise material request based on projected qty in selected warehouse 2014-08-22 14:06:22 +05:30
Nabin Hait
f4ad37d208 Reset receiver list always on create receiver list button 2014-08-22 12:42:57 +05:30
Nabin Hait
79f91109cd Update pricing_rule.py 2014-08-21 19:21:25 +05:30
Nabin Hait
d67cbdf725 Merge pull request #2097 from nabinhait/hotfix
Escaped item group value in pricing rule condition
2014-08-21 19:19:34 +05:30
Nabin Hait
16aba71da0 Escaped item group value in pricing rule condition 2014-08-21 19:02:02 +05:30
Nabin Hait
9426522159 Merge pull request #2096 from nabinhait/hotfix
Fixex in payment reconciliation
2014-08-21 18:07:39 +05:30
Nabin Hait
8058832a48 Fixex in payment reconciliation 2014-08-21 18:06:35 +05:30
Nabin Hait
fa3f22c448 Merge pull request #2093 from nabinhait/hotfix
Packing list visibility and update status on communication
2014-08-21 17:34:58 +05:30
Nabin Hait
cabf9c5bee Minor fix in status updater 2014-08-21 16:44:32 +05:30
Nabin Hait
4417529952 Packing list visibility issue 2014-08-21 16:44:32 +05:30
Anand Doshi
bb3f192b07 Merge pull request #2091 from nabinhait/hotfix
Minor fixes
2014-08-21 12:42:40 +05:30
Nabin Hait
f71011aff0 Project query fixed 2014-08-21 11:34:31 +05:30
Nabin Hait
df5ab4e228 Minor fix in maintenance schedule 2014-08-21 11:32:39 +05:30
Neil Trini Lasrado
b02b59b8c8 Merge branch 'develop' of https://github.com/frappe/erpnext into purchase-invoice-fix 2014-08-20 14:57:24 +05:30
Rushabh Mehta
f29449ba07 Merge pull request #2086 from rmehta/route-redesign
Route redesign
2014-08-20 14:49:27 +05:30
Neil Trini Lasrado
bf4ceb981f Merge https://github.com/frappe/erpnext into purchase-invoice-fix 2014-08-20 14:39:22 +05:30
Neil Trini Lasrado
84e5a4a2c2 [fix-remarks-changed-issue#110] 2014-08-20 13:44:56 +05:30
Rushabh Mehta
ebd30beee4 [route] redesigned 2014-08-20 11:44:30 +05:30
Rushabh Mehta
cb067aa579 [route] refactor, wip 2014-08-20 11:44:30 +05:30
Rushabh Mehta
74bc2baa1d remove website route, wip 2014-08-20 11:43:58 +05:30
Tytus
f546ab3130 Add csv file with initial translations. 2014-08-19 15:53:08 +02:00
Tytus
35142cb206 Add Polish language to setup wizard. 2014-08-19 15:51:36 +02:00
Nabin Hait
13313b5cb6 Merge pull request #2082 from nabinhait/hotfix
Bank reconciliation statement: show amounts which has cleared in the ban...
2014-08-19 17:42:26 +05:30
Nabin Hait
432431f2e6 fix for translation 2014-08-19 16:49:44 +05:30
Anand Doshi
dd952146d1 Merge pull request #2081 from anandpdoshi/anand-august-19
[fix] Error Reports
2014-08-19 16:37:50 +05:30
Nabin Hait
237f3765e5 Bank reconciliation statement: show amounts which has cleared in the bank but not registered in the system 2014-08-19 16:29:31 +05:30
Anand Doshi
cca6460e65 [fix] Error Reports 2014-08-19 16:06:09 +05:30
Rushabh Mehta
354acf6fc9 Merge pull request #2076 from anandpdoshi/anand-august-19
[fix] Error Reports
2014-08-19 14:07:03 +05:30
Anand Doshi
7ce0609800 Merge pull request #2077 from nabinhait/hotfix
Precision issue in tax calculation
2014-08-19 13:43:23 +05:30
Nabin Hait
0a35effe49 Precision issue in tax calculation 2014-08-19 13:22:19 +05:30
Neil Trini Lasrado
95b395505f [new fix issue No #1510] 2014-08-19 13:12:33 +05:30
Neil Trini Lasrado
67e14a48b8 [fix issue No #1510] 2014-08-19 12:35:14 +05:30
Neil Trini Lasrado
2026148dbe [fix issue No #1510] 2014-08-19 12:22:45 +05:30
Anand Doshi
78b6366325 [fix] Error Reports 2014-08-19 12:20:48 +05:30
Neil Trini Lasrado
9c3535307f [fix] frappe/erpnext#1510 2014-08-19 10:41:34 +05:30
Rushabh Mehta
5e893ef8fd Merge pull request #2073 from anandpdoshi/anand-august-18
[fix] Leave Application Calendar - Fixes #2065
2014-08-18 22:11:28 +05:30
Anand Doshi
f72de95a38 [fix] SMS Center 2014-08-18 19:51:47 +05:30
Anand Doshi
6ab831b387 Allow Default Warehouse for Item, even if not a Stock Item 2014-08-18 19:04:19 +05:30
Anand Doshi
e4c434ab6f [fix] Leave Application Calendar 2014-08-18 17:04:04 +05:30
Pratik Vyas
1f3310e0d1 Merge pull request #2072 from nabinhait/hotfix
Multiple small fixes
2014-08-18 16:49:06 +05:30
Nabin Hait
c41a9480b8 Credit limit fixes 2014-08-18 15:40:36 +05:30
Nabin Hait
6394f5b1a9 minot fix in pro order 2014-08-18 15:40:36 +05:30
Nabin Hait
448c9b71c1 minot fix in material request 2014-08-18 15:40:36 +05:30
Nabin Hait
32a3a86a00 General ledger report: invalid account 2014-08-18 15:40:36 +05:30
Nabin Hait
dcce0c86ed Minimum ordered qty validation 2014-08-18 15:40:36 +05:30
Anand Doshi
f4b3d30312 Merge pull request #2071 from anandpdoshi/anand-august-18
[minor] Removed 'PIN: ' from default Address Template
2014-08-18 14:53:26 +05:30
Anand Doshi
62aa8fa4e7 [minor] Removed 'PIN: ' from default Address Template 2014-08-18 12:53:37 +05:30
Rushabh Mehta
e8a52d810f Merge pull request #2067 from dalwadani/develop
Improve Arabic translation
2014-08-18 09:54:12 +05:30
Dhaifallah Alwadani
5e27a759b7 Improve Arabic translation 2014-08-16 18:11:48 +01:00
Pratik Vyas
c0d31ce648 Merge pull request #2062 from nabinhait/hotfix
Hotfix
2014-08-15 11:06:44 +05:30
Anand Doshi
eb39435481 [hotfix] Allow on submit for Projected Qty 2014-08-14 18:08:19 +05:30
Nabin Hait
54498452b6 Stock entry minor fix 2014-08-14 15:49:44 +05:30
Nabin Hait
821aad5281 Sales/purchase return: fixes for qty validation 2014-08-14 15:15:14 +05:30
Nabin Hait
5145b1445b Fixes in production planning tool 2014-08-14 15:15:14 +05:30
Nabin Hait
e368091627 Fixes in Payment Reconciliation 2014-08-14 15:15:14 +05:30
Anand Doshi
d5a08ea449 Merge pull request #2055 from rmehta/aug-11
Timeline and Folds
2014-08-14 12:00:03 +05:30
Rushabh Mehta
c31a1eec5b [ux] fixes to timeline 2014-08-14 11:47:31 +05:30
Rushabh Mehta
0d0f5f6c25 [ux] fixes to timeline 2014-08-14 11:43:46 +05:30
Rushabh Mehta
ab8bde0149 [ux] added folds, show actual / projected qty in pos 2014-08-14 11:43:46 +05:30
Anand Doshi
cf8bb668b3 Merge pull request #2051 from anandpdoshi/anand-august-12
[logic] Email Digest - use transaction/posting date
2014-08-12 19:51:22 +05:30
Anand Doshi
f0075b9ce2 [fix] Opportunity communication listing 2014-08-12 15:20:39 +05:30
Anand Doshi
67d249eea9 [logic] Email Digest - use transaction/posting date 2014-08-12 12:45:23 +05:30
Anand Doshi
c7105a1a79 Merge branch 'nabinhait-landed_cost' into develop 2014-08-11 18:04:08 +05:30
Anand Doshi
f957cbd8ef [test] Purchase Receipt - update rejected serial no 2014-08-11 18:03:43 +05:30
Nabin Hait
5c0db8d05e Landed Cost voucher test case for serialized items 2014-08-11 16:28:29 +05:30
Nabin Hait
200e8d971f Landed Cost voucher test case for serialized items 2014-08-11 16:12:32 +05:30
Nabin Hait
a97e700371 Add rejected serial nos in Purchase Receipt if auto-created based on series 2014-08-11 16:12:32 +05:30
Nabin Hait
4e6c52dd24 Test case fixes 2014-08-11 16:12:32 +05:30
Nabin Hait
2b776e8c3a Landed cost voucher minor fixes 2014-08-11 16:12:32 +05:30
Nabin Hait
f3e1181ad9 Landed cost voucher fixes 2014-08-11 16:12:32 +05:30
nabinhait
9cbcf96aeb no copy property for landed cost voucher amount field 2014-08-11 16:12:32 +05:30
nabinhait
8ca3189f07 pr and pi gl entries 2014-08-11 16:12:31 +05:30
nabinhait
98e7dcfe2c landed cost voucher minor fix 2014-08-11 16:12:31 +05:30
nabinhait
cfd1b10980 Purchase receipt gl entries if there is warehouse without account 2014-08-11 16:12:31 +05:30
nabinhait
f807cda375 PR and PI gl entries fixes for landed cost 2014-08-11 16:12:31 +05:30
nabinhait
11594c7927 purchase receipt gl entries 2014-08-11 16:12:31 +05:30
nabinhait
509aa52efc minor fix 2014-08-11 16:12:31 +05:30
nabinhait
e2c3f7ab14 Added help in landed cost voucher 2014-08-11 16:12:31 +05:30
nabinhait
fe39442c48 Removed old landed cost wizard 2014-08-11 16:12:31 +05:30
nabinhait
b21b6598f1 Test case for landed cost voucher 2014-08-11 16:12:31 +05:30
nabinhait
5e1b0014c2 GL entries for sub-contracting and rejected qty 2014-08-11 16:12:31 +05:30
nabinhait
cc0692d714 landed cost fix 2014-08-11 16:12:31 +05:30
nabinhait
87f2401c1e Landed Cost on_submit and gl entries for PR 2014-08-11 16:12:31 +05:30
nabinhait
f6ea21c8ae landed cost voucher design changed #1921 2014-08-11 16:12:30 +05:30
nabinhait
4436157da1 Landed cost redesign initial commit #1921 2014-08-11 16:12:30 +05:30
Anand Doshi
b00a2422e4 [hotfix] Allow on Submit - Actual / Projected Qty for Packed Item 2014-08-11 15:54:20 +05:30
Anand Doshi
475b118fba Merge pull request #2050 from anandpdoshi/anand-august-11
Feed, Form Grid
2014-08-11 13:44:01 +05:30
Anand Doshi
42335fb2cb [minor] Allow on Submit - Actual / Projected Qty 2014-08-11 13:28:29 +05:30
Anand Doshi
15ec1e1860 Merge pull request #2049 from nabinhait/hotfix
Fixes in Order trends report
2014-08-11 12:48:16 +05:30
Anand Doshi
96964a4e03 [minor] Visible Columns' Label should show ellipsis on overflow 2014-08-11 12:28:32 +05:30
Anand Doshi
e4aaa3d18f [minor] Truncate comment in Feed to 240 chars 2014-08-11 12:27:47 +05:30
Nabin Hait
a6b597a0bd Fixes in Order trends report 2014-08-11 11:54:37 +05:30
Anand Doshi
52d1ea83a0 [hotfix] Stock Entry List 2014-08-11 09:16:59 +05:30
Anand Doshi
5d64f5abd4 [hotfix] Sales Order list 2014-08-09 14:54:52 +05:30
Anand Doshi
3e103ebffe [minor] ERPNext uses MariaDB 2014-08-08 17:36:25 +05:30
Rushabh Mehta
992bc448a2 Merge pull request #2045 from rmehta/fixes-aug-8
[fix] [pos] pos view only for draft docs
2014-08-08 17:30:12 +05:30
Rushabh Mehta
23607f91cd [fix] [pos] pos view only for draft docs 2014-08-08 17:29:16 +05:30
Anand Doshi
3a97739f83 Merge pull request #2042 from rmehta/pos-module
added icon for pos
2014-08-08 16:56:45 +05:30
Rushabh Mehta
e0ee6fe8cd Merge pull request #2044 from nabinhait/hotfix
PO-PI mapping: divisional loss issue fixed
2014-08-08 16:44:15 +05:30
Rushabh Mehta
a3f76fc14d Update sales_invoice.js 2014-08-08 16:43:21 +05:30
Nabin Hait
c85abbfeca PO-PI mapping: divisional loss issue fixed 2014-08-08 16:07:02 +05:30
Rushabh Mehta
139ec2a64f Update note_list.html 2014-08-08 15:47:56 +05:30
Rushabh Mehta
72e1719220 added icon for pos 2014-08-08 15:43:26 +05:30
Pratik Vyas
3de7757ba4 Update update_project_milestones.py 2014-08-08 14:49:53 +05:30
Anand Doshi
7c3fad63b1 Merge pull request #2040 from anandpdoshi/anand-august-8
[patch] Add currency Turkish Lira
2014-08-08 14:17:39 +05:30
Anand Doshi
6b8145a813 [patch] Add currency Turkish Lira 2014-08-08 14:05:01 +05:30
Nabin Hait
688a7a7329 Merge pull request #2039 from anandpdoshi/anand-august-8
[fix] Show Employee Name in Employee Birthday report
2014-08-08 13:21:36 +05:30
Anand Doshi
26201a5828 [fix] Show Employee Name in Employee Birthday report 2014-08-08 12:49:11 +05:30
Anand Doshi
6cd59537b6 Merge pull request #2037 from nabinhait/hotfix
Fixes in 'Received Items to be Billed' report
2014-08-08 12:45:56 +05:30
Anand Doshi
854f9895e4 Merge branch 'rmehta-microtemplate-fixes' into develop 2014-08-08 11:56:52 +05:30
Anand Doshi
4cc94df752 [tests] Fixed Test Records 2014-08-08 11:56:32 +05:30
Anand Doshi
03eadb74ab Fixes to microtemplate feature 2014-08-08 11:56:32 +05:30
Rushabh Mehta
7a4e739d6c templating for hr 2014-08-08 11:56:32 +05:30
Rushabh Mehta
a660464cec added for support 2014-08-08 11:56:32 +05:30
Rushabh Mehta
c9bd3f5d4a added templates for projects 2014-08-08 11:56:32 +05:30
Rushabh Mehta
873141c1a5 more updates to lists and started sane filters 2014-08-08 11:56:32 +05:30
Rushabh Mehta
8544447b19 added more listview templates 2014-08-08 11:56:32 +05:30
Rushabh Mehta
18eb4f5015 added listviews for sales, purchase 2014-08-08 11:56:31 +05:30
Rushabh Mehta
67af99794d start custom list rendering for Sales Order 2014-08-08 11:56:31 +05:30
Rushabh Mehta
b5e768906a built item grids for sales, purchase, stock 2014-08-08 11:56:31 +05:30
Anand Doshi
c13727adba Merge branch 'rmehta-primary-action-fixes' into develop 2014-08-08 11:55:37 +05:30
Anand Doshi
69ccf9695c [minor] primary action 2014-08-08 11:51:24 +05:30
Rushabh Mehta
995185d02d [ux] fixed primary action 2014-08-08 11:51:23 +05:30
Nabin Hait
f4de6e21fa Fixes in 'Received Items to be Billed' report 2014-08-08 11:23:59 +05:30
Nabin Hait
a6db05e18d Fixes in 'Received Items to be Billed' report 2014-08-08 11:02:06 +05:30
Nabin Hait
d91cefb23d Update fix_account_master_type.py 2014-08-07 19:22:02 +05:30
Anand Doshi
e7f7416190 Merge pull request #2035 from nabinhait/hotfix
Account master type patch and Stock RBNB Diff
2014-08-07 18:15:25 +05:30
Nabin Hait
67cd3fb89c Fixes in making credit note from Sales Return 2014-08-07 15:34:53 +05:30
Nabin Hait
849b7b172a minor fix 2014-08-07 15:13:52 +05:30
Nabin Hait
9a0c46fda7 Get Stock Rreceived But Not Billed Difference Amount 2014-08-07 15:10:05 +05:30
Nabin Hait
05b56d0d08 Fix account's master type 2014-08-07 15:03:41 +05:30
Anand Doshi
43ffa64849 Merge pull request #2030 from nabinhait/hotfix
Hotfix
2014-08-06 17:39:33 +05:30
Nabin Hait
7881df2138 minor fix 2014-08-06 17:29:07 +05:30
Nabin Hait
fd90571d49 fiscal year validation in financial statement 2014-08-06 17:25:23 +05:30
Nabin Hait
9f7e00bb3a Send salary slip mail after submit via Salary Manager 2014-08-06 17:25:23 +05:30
Nabin Hait
45b7d17ee8 Employee can be reselected but not changed in salary structure 2014-08-06 17:25:23 +05:30
Rushabh Mehta
859a995bd6 Merge pull request #2025 from anandpdoshi/anand-august-5
[test] Block Delivery Note if it is linked to a cancelled Sales Order
2014-08-05 14:44:38 +05:30
Anand Doshi
959bd6e9e7 [test] Block Delivery Note if it is linked to a cancelled Sales Order 2014-08-05 14:25:40 +05:30
Anand Doshi
9c47cae5c7 Merge pull request #2024 from anandpdoshi/anand-august-5
Print Fixes
2014-08-05 14:13:17 +05:30
Anand Doshi
f16fefafe3 [print] [fix] empty item grid issue 2014-08-05 13:57:29 +05:30
Anand Doshi
8d16e9fd6d [print] convert newlines to <br> based on fieldtype for Text/Small Text 2014-08-05 11:39:51 +05:30
Anand Doshi
2b8344e75c [print] [fix] when item grid is empty 2014-08-05 11:30:37 +05:30
Rushabh Mehta
a8755af0fa Merge pull request #2022 from nabinhait/hotfix
Fixes for customer / supplier renaming
2014-08-05 10:42:44 +05:30
Rushabh Mehta
ca70eaa388 Merge pull request #2019 from anandpdoshi/anand-august-1
Account Issues
2014-08-05 10:36:08 +05:30
Pratik Vyas
1271bc4457 [hotfix] [patch] remove missing patch 2014-08-05 06:54:11 +05:30
Nabin Hait
4d18b3f96d Fixes for standard print formats 2014-08-04 17:01:01 +05:30
Nabin Hait
1279f1d430 Fixes for customer / supplier renaming 2014-08-04 13:05:59 +05:30
Anand Doshi
e88b7fbcc4 Journal Voucher Detail: show Account Balance as Dr or Cr. Fixes #675 2014-08-01 16:56:32 +05:30
Anand Doshi
8c838061f9 [minor] Check account read permission for get_balance_on 2014-08-01 16:13:44 +05:30
Anand Doshi
6c608e04bc Fixes #699 - Cost Center mandatory 2014-08-01 16:04:35 +05:30
Anand Doshi
6e4efa7edd Merge pull request #2013 from anandpdoshi/anand-july-31
Fixes and Translations
2014-08-01 11:12:19 +05:30
Anand Doshi
a66ef778ec [translations] Added Turkish, Vietnamese. Updated rest of the translations. [frappe/erpnext#2012] 2014-08-01 00:06:42 +05:30
Anand Doshi
1b90207360 [minor] [fix] Serial No Servic Contract Expiry 2014-07-31 18:57:51 +05:30
Anand Doshi
3f28ac3205 Merge pull request #2010 from anandpdoshi/anand-july-31
[print] Labels and Total Taxes and Charges
2014-07-31 16:31:57 +05:30
Anand Doshi
29817d6d8b [print] Moved Total Taxes and Charges to the right column 2014-07-31 16:05:19 +05:30
Anand Doshi
92980e6882 Merge pull request #2009 from anandpdoshi/anand-july-31
Labels: Use Date instead of Posting Date
2014-07-31 15:07:11 +05:30
Anand Doshi
b4ad175b13 Merge pull request #2008 from pdvyas/print-format-patch-fix
[patch] remove reloading of removed print formats
2014-07-31 14:53:45 +05:30
Pratik Vyas
b91079676d [patch] remove reloading of removed print formats 2014-07-31 14:31:58 +05:30
Anand Doshi
fbe37c9158 Labels: Use Date instead of Posting Date 2014-07-31 14:31:25 +05:30
Pratik Vyas
1483e9d8d2 Merge pull request #2007 from nabinhait/hotfix
Activity: fix for timeline-wise display
2014-07-31 12:45:43 +05:30
nabinhait
8efd74b9b1 Activity: fix for timeline-wise display 2014-07-31 12:12:05 +05:30
Anand Doshi
c2371af779 Merge pull request #2001 from nabinhait/hotfix
Validation: Account must belong to the same company
2014-07-31 11:55:56 +05:30
nabinhait
8dbd295c9b bom operations on_delete_row function 2014-07-31 11:40:41 +05:30
nabinhait
d6ff58daa1 Minor fix in customer issue 2014-07-31 11:40:41 +05:30
nabinhait
4859b48c43 message fix 2014-07-31 11:40:41 +05:30
nabinhait
c34329284b Post gl entries only if there are atleast 2 distinct account head 2014-07-31 11:40:41 +05:30
nabinhait
0ad677045a Test record fixed for warehouse 2014-07-31 11:40:40 +05:30
nabinhait
c1f65dd863 Validation: Account must belong to the same company 2014-07-31 11:40:40 +05:30
Anand Doshi
b9fed3f046 Merge pull request #2004 from anandpdoshi/anand-july-30
[fixes] Leave Application and Toggle Rounded Totals
2014-07-30 17:40:01 +05:30
Anand Doshi
35cc320e21 [fixes] Leave Application and Toggle Rounded Totals 2014-07-30 17:00:26 +05:30
Pratik Vyas
5a5b405a18 Update .travis.yml 2014-07-30 16:49:05 +05:30
Pratik Vyas
cd4d6a228b Update .travis.yml 2014-07-30 16:42:39 +05:30
Anand Doshi
6c5e1c9701 Merge pull request #2003 from anandpdoshi/anand-july-30
Changed fieldtype of 'contact_email', 'contact_mobile' to Small Text
2014-07-30 14:10:16 +05:30
Anand Doshi
627f13ea26 Changed fieldtype of 'contact_email', 'contact_mobile' to Small Text 2014-07-30 13:09:01 +05:30
Anand Doshi
20fbfa2a44 [travis] 2014-07-30 11:50:05 +05:30
Anand Doshi
3f790eae55 [travis] 2014-07-29 23:42:30 +05:30
Anand Doshi
ddbf14adba Merge pull request #2002 from anandpdoshi/anand-july-29
[print] Hide Rate, Amount if Print Without Amount in Delivery Note
2014-07-29 23:38:24 +05:30
Anand Doshi
22608ad206 [travis] 2014-07-29 23:20:42 +05:30
Anand Doshi
60ee2ea8af [hotfix] Stock Entry search fields 2014-07-29 23:16:24 +05:30
Anand Doshi
bc708ee4c2 [print] Disable rounded total 2014-07-29 22:24:31 +05:30
Anand Doshi
0e93352c8d [print] Hide Rate, Amount if Print Without Amount in Delivery Note 2014-07-29 22:03:40 +05:30
Anand Doshi
a12312553b Merge pull request #1997 from nabinhait/hotfix
Fixes
2014-07-29 15:48:04 +05:30
nabinhait
78777e141a minor fix 2014-07-29 15:19:41 +05:30
Anand Doshi
9d9192d496 Merge pull request #2000 from anandpdoshi/anand-july-29
[print] Improvements to Item grid
2014-07-29 15:13:22 +05:30
Anand Doshi
ad1638e6b6 [print] Improvements to Item grid 2014-07-29 14:38:48 +05:30
nabinhait
0bab81aef9 minor fix in chart of accounts help message 2014-07-29 12:59:47 +05:30
nabinhait
92a1e06665 message fix 2014-07-29 12:46:56 +05:30
nabinhait
079611936f Delete Payment-to-invoice-matching-tool through patch 2014-07-29 12:12:09 +05:30
nabinhait
d4b92a1d20 Set ignore pricing rule while mapping SI to DN 2014-07-29 11:35:41 +05:30
nabinhait
7555d619f2 Message for frozen stock entries 2014-07-29 11:35:41 +05:30
Anand Doshi
bd748bd115 [hotfix] [patch] Delete old print formats 2014-07-29 08:51:41 +05:30
Anand Doshi
85eefadada [fix] [print] Print Hide Item Code 2014-07-28 21:17:20 +05:30
Anand Doshi
07d3261467 [hotfix] don't override default print format if specified in POS Sales Invoice 2014-07-28 19:55:13 +05:30
Anand Doshi
11586eda4c [minor] [fix] taxes print 2014-07-28 17:38:08 +05:30
Anand Doshi
423361946d Merge pull request #1996 from nabinhait/hotfix
Fixes
2014-07-28 16:56:11 +05:30
nabinhait
0a35277c96 Stock reconciliation only for valuation 2014-07-28 16:41:34 +05:30
nabinhait
16317748dd Issue fixes related to length of the report result 2014-07-28 16:41:34 +05:30
nabinhait
3d48a4ef65 Sales / purchase return: Get party details fix 2014-07-28 16:41:33 +05:30
nabinhait
b739264243 Don't run company trigger on amendment 2014-07-28 16:41:33 +05:30
nabinhait
957971eb1d Column added 'Reqd by Date' in po_items_to_be_billed report 2014-07-28 16:41:33 +05:30
Anand Doshi
e3c161f0ea Merge pull request #1995 from anandpdoshi/anand-july-28
[minor] apply pricing rule / price list only if item_code
2014-07-28 16:05:42 +05:30
Anand Doshi
39edcbc93b [minor] apply pricing rule / price list only if item_code 2014-07-28 16:00:19 +05:30
Anand Doshi
beb3e35153 Merge pull request #1989 from dalwadani/develop
Improve Arabic Translation
2014-07-28 15:46:22 +05:30
Anand Doshi
0416e59267 Merge pull request #1994 from anandpdoshi/anand-july-28
[minor] Show company name in General Ledger print
2014-07-28 15:44:07 +05:30
Anand Doshi
57f8dabf59 [minor] Show company name in General Ledger print 2014-07-28 15:28:44 +05:30
Anand Doshi
9ea4154b81 Merge pull request #1993 from anandpdoshi/anand-july-28
[minor] Fixed address listing
2014-07-28 14:21:29 +05:30
Anand Doshi
9c018fe984 [minor] Fixed address listing 2014-07-28 12:59:52 +05:30
Dhaifallah Alwadani
faeca7cf11 Improve Arabic Translation 2014-07-26 05:43:03 +03:00
Nabin Hait
f8b318aef1 Merge pull request #1987 from anandpdoshi/anand-july-25
[fix] Feed listing based on permissions
2014-07-25 15:08:30 +05:30
Anand Doshi
93e2defc96 [fix] Feed listing based on permissions 2014-07-25 14:57:37 +05:30
Anand Doshi
1c735365d0 Merge pull request #1986 from anandpdoshi/rmehta-print-formats
Print Formats (by Rushabh)
2014-07-25 13:58:18 +05:30
Anand Doshi
161f63d393 [travis] Install wkhtmltopdf 2014-07-25 13:36:47 +05:30
Anand Doshi
8f49cf7c03 [minor] fixed testcase 2014-07-25 13:02:29 +05:30
Anand Doshi
62b1cbf003 [impact] Limit available functions in jinja environment 2014-07-25 13:02:29 +05:30
Anand Doshi
a5437cdac1 Fixes for print 2014-07-25 13:02:28 +05:30
Anand Doshi
16deabef82 Format Qty 2014-07-25 13:02:28 +05:30
ankitjavalkarwork
82ec488b99 Payment Reconciliation Feature/Tool - Patch 2014-07-25 13:02:28 +05:30
Rushabh Mehta
781ddc3a25 added patch to remove old print formats 2014-07-25 13:02:28 +05:30
Rushabh Mehta
85ff3bcd04 updated pos invoice 2014-07-25 13:01:53 +05:30
Rushabh Mehta
5b51cc86a9 many fixes to print 2014-07-25 13:01:53 +05:30
Rushabh Mehta
d82352eacc item grid, added other printable fields in description 2014-07-25 13:01:53 +05:30
Rushabh Mehta
f84c240d1c cleanup for print format 2014-07-25 13:01:52 +05:30
Rushabh Mehta
28804bfb62 started sales order print format (new style) 2014-07-25 13:01:52 +05:30
Nabin Hait
5cf3a6bcd2 Merge pull request #1975 from anandpdoshi/anand-july-22
Trial Balance and Newsletter sending via Worker
2014-07-25 11:21:13 +05:30
Anand Doshi
329a8ef9a1 Merge pull request #1985 from ankitjavalkarwork/payrec
Remove Payment To Invoice Matching Tool
2014-07-24 18:57:46 +05:30
Anand Doshi
9e89dcf855 Merge pull request #1984 from nabinhait/hotfix
Fix for company in chart of accounts
2014-07-24 18:57:31 +05:30
ankitjavalkarwork
344dd3793a Merge branch 'develop' of https://github.com/frappe/erpnext into payrec 2014-07-24 15:15:12 +05:30
ankitjavalkarwork
d93f4c99e1 Remove Payment To Invoice Matching Tool 2014-07-24 15:14:36 +05:30
nabinhait
ffd57a0565 Fix for company in chart of accounts 2014-07-24 10:40:18 +05:30
Rushabh Mehta
92c043423e updated bench 2014-07-23 15:57:01 +05:30
Anand Doshi
d1a2ce2750 [minor] is_ajax check in newsletter 2014-07-23 12:51:17 +05:30
Rushabh Mehta
3c78ab5841 [email digest] [fix] [hot] only open to-do items 2014-07-23 10:19:31 +05:30
Anand Doshi
de85a3af15 Newsletter: Bulk Send via worker 2014-07-22 19:49:16 +05:30
Anand Doshi
cb86d597b7 Report: Trial Balance 2014-07-22 19:49:16 +05:30
Nabin Hait
9df4196597 Merge pull request #1970 from ankitjavalkarwork/payrec
Added Payment Reconciliation to list accounts.py
2014-07-22 18:24:58 +05:30
ankitjavalkarwork
87633d6be6 Payment Reconciliation Feature/Tool - Patch 2014-07-22 18:14:30 +05:30
Anand Doshi
33a94a74df Merge pull request #1968 from nabinhait/hotfix
Fixes
2014-07-22 17:39:07 +05:30
ankitjavalkarwork
b5ae643b6e Payment Reconciliation Feature/Tool - minor change 2014-07-22 15:26:04 +05:30
ankitjavalkarwork
b0cffac79d Payment Reconciliation Feature/Tool - add in module list 2014-07-22 15:02:59 +05:30
nabinhait
b5f9b5de45 PP Tool: data for required raw materials 2014-07-22 11:38:15 +05:30
nabinhait
c772b3d86a Purchase invoice: Copy project name from first row on addition of row 2014-07-22 11:38:14 +05:30
nabinhait
7d7123de37 Merge branch 'ankitjavalkarwork-wip_payrec' into develop 2014-07-21 19:23:20 +05:30
nabinhait
7f1e4a29c5 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2014-07-21 19:23:07 +05:30
nabinhait
97ab902895 payment reconciliation fixes 2014-07-21 19:22:02 +05:30
Anand Doshi
6e15f675a5 Merge pull request #1966 from anandpdoshi/anand-july-21
Stock Entry Warehouse prefill, Item autosuggest by description
2014-07-21 18:25:16 +05:30
Anand Doshi
67ecce695d [fix] Show against account in General Ledger Print Format 2014-07-21 18:13:05 +05:30
Anand Doshi
ac11d6ff97 Merge pull request #1964 from frappe/new-production-order-fix
[minor] fix server error for new production order if sales order is invalid
2014-07-21 18:05:06 +05:30
Anand Doshi
4c5d7617fb [minor] Update if missing, source and target warehouse in stock entry detail table, when they are specified in the form 2014-07-21 18:02:22 +05:30
Anand Doshi
7fcb3c9865 [minor] Item query - search by description 2014-07-21 17:51:32 +05:30
Pratik Vyas
994d9075b4 Change TRAVIS_BRANCH to develop 2014-07-21 17:36:50 +05:30
Pratik Vyas
649d18c4f7 [minor] fix server error for new production order if sales order is invalid 2014-07-21 17:17:59 +05:30
Nabin Hait
cbf0cb7de7 Merge pull request #1955 from anandpdoshi/financial-statements
Balance Sheet and Profit and Loss Statement
2014-07-21 16:44:46 +05:30
Anand Doshi
5f0459c321 Fixes to Financial Statements 2014-07-21 16:13:06 +05:30
nabinhait
2d355c7478 Merge branch 'wip_payrec' of github.com:ankitjavalkarwork/erpnext into ankitjavalkarwork-wip_payrec 2014-07-21 15:33:50 +05:30
ankitjavalkarwork
4dfe19e613 Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec 2014-07-21 14:23:52 +05:30
Rushabh Mehta
1c6313679b Update material_request.js 2014-07-21 13:08:49 +05:30
Anand Doshi
f457bce0e7 Changed localize_date to formatdate 2014-07-21 12:03:04 +05:30
Anand Doshi
6cc5babd2e Use include directive to embed common print format 2014-07-21 11:43:19 +05:30
Anand Doshi
db4ba39824 Better handling of ignore zero values 2014-07-21 11:43:19 +05:30
Anand Doshi
825d014616 Commonfied code for Financial Statements and added Profit and Loss Statement 2014-07-21 11:43:18 +05:30
Anand Doshi
fa576a22e3 Balance Sheet 2014-07-21 11:43:18 +05:30
Anand Doshi
059f1e09a8 Balance Sheet - first cut 2014-07-21 11:43:18 +05:30
Anand Doshi
7a7675c7ef Merge pull request #1957 from nabinhait/hotfix
Hotfix
2014-07-19 18:17:52 +05:30
nabinhait
b1e7bf16ba Translate while creating India specific accounts 2014-07-19 17:56:43 +05:30
nabinhait
711e8bec3d Fixes overflow tolerance 2014-07-19 17:00:15 +05:30
nabinhait
b1c5738a67 Fixes overflow tolerance 2014-07-19 16:53:45 +05:30
ankitjavalkarwork
5283e5a7d8 Add Payment Reconciliation Feature/Tool - JS changes1 2014-07-18 15:54:29 +05:30
Anand Doshi
1a2516d4be Merge pull request #1953 from anandpdoshi/anand-july-18
Minor fix in reorder item
2014-07-18 10:32:14 +05:30
Anand Doshi
d141cf7293 Minor fix in reorder item 2014-07-18 10:31:34 +05:30
Anand Doshi
3c45c37428 Merge pull request #1952 from nabinhait/hotfix
Country mandatory in company master
2014-07-18 10:22:13 +05:30
nabinhait
d4e080be29 Country mandatory in company master 2014-07-17 19:32:12 +05:30
ankitjavalkarwork
84fd33ea7a Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec 2014-07-17 19:11:07 +05:30
ankitjavalkarwork
87e30f68b9 Add Payment Reconciliation Feature/Tool - Complete 2014-07-17 19:10:45 +05:30
Anand Doshi
e8332be285 Merge pull request #1949 from anandpdoshi/anand-july-17
Fix in Stock Entry test case
2014-07-17 12:37:42 +05:30
Anand Doshi
e5df7a7f01 Merge pull request #1935 from nabinhait/hotfix
Default letter head in general ledger and bank reco statement print
2014-07-17 12:31:34 +05:30
Anand Doshi
fa0db761da Fix in Stock Entry test case 2014-07-17 12:30:55 +05:30
nabinhait
5f2f955224 From date and to date in general ledger print format 2014-07-17 12:29:56 +05:30
nabinhait
e26204e61d From date and to date in general ledger print format 2014-07-17 12:22:58 +05:30
nabinhait
fa1cd5faff Fixed root type of liability accounts 2014-07-17 11:52:50 +05:30
nabinhait
d16081c4d9 Batch no get query fix 2014-07-17 11:08:19 +05:30
nabinhait
143400d444 Batch no get query fix 2014-07-17 11:00:13 +05:30
nabinhait
96cb130263 Default letter head in general ledger and bank reco statement print 2014-07-17 10:56:07 +05:30
Nabin Hait
0a4c824a06 Merge pull request #1946 from anandpdoshi/anand-july-16
Fixes in load defaults of transaction.js
2014-07-16 20:04:37 +05:30
Anand Doshi
b8189d7d23 Auto Re-order Item for default warehouse only, if Warehouse wise re-order not specified 2014-07-16 19:24:53 +05:30
Anand Doshi
4b5e89a067 Fixes in Stock Entry test cases 2014-07-16 19:23:58 +05:30
Anand Doshi
f214bfcfc3 Fixes in load defaults of transaction.js 2014-07-16 17:53:02 +05:30
Rushabh Mehta
2e21e25613 Merge pull request #1945 from anandpdoshi/anand-july-16
Fixes in Stock Entry and test cases
2014-07-16 17:04:18 +05:30
Anand Doshi
d93fa2f78b Fixes in Stock Entry and test cases 2014-07-16 16:08:15 +05:30
Anand Doshi
75936cdde5 Merge pull request #1942 from anandpdoshi/anand-july-16
Fixes in Setup Wizard and Support Ticket
2014-07-16 13:17:50 +05:30
Anand Doshi
e73ed2afae Setup Wizard: fixed attachment issue #1940 2014-07-16 11:48:51 +05:30
Anand Doshi
c70d2d23a8 Support Ticket: set resolution_date as None if missing 2014-07-16 11:48:51 +05:30
ankitjavalkarwork
540a1eb6d9 Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec 2014-07-15 18:02:08 +05:30
ankitjavalkarwork
d934cd105b Add Payment Reconciliation Feature/Tool - invoice entries table population 2014-07-15 18:01:36 +05:30
ankitjavalkarwork
ec05d7f8a1 Add Payment Reconciliation Feature/Tool - javascript validation 2014-07-14 18:28:10 +05:30
ankitjavalkarwork
345753ed19 Add Payment Reconciliation Feature/Tool - fetch unreconciled entries 2014-07-14 16:38:27 +05:30
Anand Doshi
c58e6c0dff Merge pull request #1932 from nabinhait/hotfix
Fixes
2014-07-14 14:28:05 +05:30
Anand Doshi
1829bd84d3 hotfix: website_image 2014-07-14 14:26:42 +05:30
nabinhait
7700c62fa8 Minor fix 2014-07-14 14:21:21 +05:30
Anand Doshi
8efbf5ef33 Merge pull request #1933 from anandpdoshi/anand-july-14
Fixed Address and Contact report name
2014-07-14 14:16:26 +05:30
Anand Doshi
e8c5cb8c9a Fixed Address and Contact report name 2014-07-14 13:10:24 +05:30
nabinhait
d5fd535909 Minor fix, if no default company 2014-07-14 12:39:50 +05:30
nabinhait
b0a8d000b1 Utility: reset serial no status and warehouse 2014-07-14 11:56:03 +05:30
nabinhait
5c38488590 Utility: reset serial no status and warehouse 2014-07-14 11:44:42 +05:30
nabinhait
614fb750b7 set qty as per stock uom in entire purchase cycle 2014-07-14 10:48:12 +05:30
nabinhait
e6cee7b41f Expense account can be liability account for stock reconciliation 2014-07-14 10:48:11 +05:30
ankitjavalkarwork
0e57b971ad Add Payment Reconciliation Feature/Tool - minor changes 2014-07-11 16:08:55 +05:30
ankitjavalkarwork
90b79fcd1f Add Payment Reconciliation Feature/Tool - minor changes 2014-07-11 15:23:26 +05:30
webnotes
9d31705f75 Merge https://github.com/frappe/erpnext into wip_payrec 2014-07-11 11:21:51 +05:30
webnotes
059922cef1 Add Payment Reconciliation Feature/Tool 2014-07-11 11:20:44 +05:30
Rushabh Mehta
8e4a9ba831 Merge pull request #1927 from anandpdoshi/anand-july-10
Bank Reconciliation Statement Print Format
2014-07-10 21:59:05 +05:30
Anand Doshi
9b7b9b2e93 Bank Reconciliation Statement Print Format 2014-07-10 18:45:03 +05:30
Rushabh Mehta
e0d7a6869c Merge pull request #1926 from anandpdoshi/anand-july-10
Production Planning Tool - Fixed bom get query
2014-07-10 17:37:34 +05:30
Anand Doshi
28c4bee0b1 Production Planning Tool - Fixed bom get query 2014-07-10 16:43:31 +05:30
Rushabh Mehta
052b5a68ed Merge pull request #1925 from nabinhait/hotfix
Overflow validation fixed
2014-07-10 15:46:08 +05:30
nabinhait
ee8b6f28b8 minor fix 2014-07-10 15:27:27 +05:30
nabinhait
d5fb5d91e9 overflow validation fixed 2014-07-10 15:27:27 +05:30
Anand Doshi
16658c14fe Merge pull request #1924 from anandpdoshi/anand-july-10
Print Hide other charges calculation
2014-07-10 13:09:39 +05:30
Anand Doshi
a96cf5b96b Print Hide other charges calculation 2014-07-10 12:16:39 +05:30
Anand Doshi
287fe0559e Merge pull request #1920 from anandpdoshi/anand-july-9
Fixes in queries
2014-07-09 13:39:51 +05:30
Anand Doshi
9006bba11e Merge pull request #1919 from nabinhait/hotfix
Github issue fixes
2014-07-09 13:39:38 +05:30
Anand Doshi
48d3b54e02 Fixes in queries 2014-07-09 13:15:03 +05:30
Anand Doshi
0c3bb75fd9 Added error_report_email in hooks 2014-07-09 12:59:56 +05:30
nabinhait
7e848b1924 Title mandatory in Note. Fixes #1913 2014-07-09 12:54:56 +05:30
nabinhait
8e4fcca216 Get query fixes in address in contact listing. Fixes #1911 2014-07-09 12:50:50 +05:30
nabinhait
fcfa42d992 Minor fixes #1917 2014-07-09 11:31:11 +05:30
nabinhait
5e0de79c0d Account validated in general ledger report. Fixed #1912 2014-07-09 11:10:40 +05:30
Anand Doshi
8adb211216 Fixed patch: erpnext/patches/v4_1/fix_delivery_and_billing_status.py 2014-07-09 11:09:53 +05:30
nabinhait
5eea6f1b6d Account validated in general ledger report. Fixed #1912 2014-07-09 11:08:59 +05:30
Rushabh Mehta
3f606b6c64 Update project.py 2014-07-09 09:27:02 +05:30
Rushabh Mehta
f31221d0d3 Changed raise Exception to frappe.throw 2014-07-09 09:13:00 +05:30
nabinhait
5220b462fd Merge branch 'anandpdoshi-reapply-price-list' into develop 2014-07-08 16:03:53 +05:30
nabinhait
89b5e3e2ea Set discount zero while fetching price list rate 2014-07-08 16:00:25 +05:30
nabinhait
ff2cc1626e Merge branch 'reapply-price-list' of github.com:anandpdoshi/erpnext into anandpdoshi-reapply-price-list 2014-07-08 15:30:25 +05:30
Anand Doshi
cf6d31cefc Sales Order: Fixed test case 2014-07-07 18:46:02 +05:30
Anand Doshi
46d64849b4 Merge pull request #1902 from nabinhait/hotfix
Run trigger of company field on onload function, even if company exists
2014-07-07 18:08:51 +05:30
nabinhait
6c40079139 Update delivery and billing status in SO 2014-07-07 18:02:53 +05:30
nabinhait
2c0c66e756 Update delivery and billing status in SO 2014-07-07 17:56:25 +05:30
nabinhait
bc408d8d0b Run trigger of company field on onload function, even if company exists 2014-07-07 17:56:24 +05:30
Anand Doshi
06cf2c7b51 Merge pull request #1903 from anandpdoshi/anand-july-7
Translations: Indonesian, Japanese and Russian
2014-07-07 17:44:04 +05:30
Anand Doshi
37f15ea664 Translations: Indonesian, Japanese and Russian 2014-07-07 17:26:51 +05:30
Anand Doshi
0da9060a80 Merge pull request #1900 from anandpdoshi/anand-july-7
Fix in Purchase Order and Re-order Item
2014-07-07 16:12:50 +05:30
Anand Doshi
e729516af7 Minor fix 2014-07-07 15:54:11 +05:30
Anand Doshi
4f0a42846c Catch FiscalYearError in Re-order Item 2014-07-07 15:21:18 +05:30
Anand Doshi
484b092720 BugFix in Purchase Order: Validate minimum order qty using Qty in Stock UOM 2014-07-07 14:03:26 +05:30
Rushabh Mehta
ada6e5a5c4 Merge pull request #1899 from anandpdoshi/anand-july-7
BugFix: Maintenance Visit against Customer Issue
2014-07-07 13:57:59 +05:30
Anand Doshi
2cf256c6d0 Merge pull request #1898 from rmehta/pdf-etc
sales order status bugfix, add leading / in website_image and removed se...
2014-07-07 13:09:22 +05:30
Rushabh Mehta
58692fe4d1 sales order status bugfix, add leading / in website_image and removed send_print_in_body_and_attachment 2014-07-07 12:29:43 +05:30
Anand Doshi
3a389788bf BugFix: Maintenance Visit against Customer Issue
+ Map Item details from Customer Issue into Maintenance Visit Purpose Table
+ Map Prev DocType and Prev DocName
+ Changed prevdoc_doctype and prevdoc_docname into Dynamic Link
2014-07-07 12:24:19 +05:30
Rushabh Mehta
47f26b0df4 Merge pull request #1896 from anandpdoshi/anand-july-7
BugFix: selling_controller.py
2014-07-07 11:50:54 +05:30
Anand Doshi
80a988c04f BugFix: selling_controller.py 2014-07-07 11:35:54 +05:30
Anand Doshi
51f722d20f Trigger Apply Price List on change of Currency Conversion Rate or Price List Currency Conversion Rate 2014-07-04 15:44:49 +05:30
Anand Doshi
dffec8fb85 Reapply Price List on Change 2014-07-04 15:44:48 +05:30
Anand Doshi
f9cae65df5 Merge pull request #1884 from nabinhait/hotfix
Hotfix
2014-07-04 15:31:15 +05:30
Rushabh Mehta
bcad536a90 Merge pull request #1883 from anandpdoshi/anand-july-3
Issues originating due to sql_mode='STRICT_ALL_TABLES'
2014-07-03 15:18:06 +05:30
Anand Doshi
d2f44006bd Issues originating due to sql_mode='STRICT_ALL_TABLES'
Fixes frappe/frappe-bench#18
2014-07-03 14:32:21 +05:30
nabinhait
23cce731ab Fixes in action, not defined if called from outside document class 2014-07-03 12:25:06 +05:30
Prakash Hodage
c01f4582de Description removed for default cost center 2014-07-03 10:50:35 +05:30
Rushabh Mehta
0e085e15bb Merge pull request #1881 from anandpdoshi/anand-wip
Fixes to end_of_life conditions
2014-07-02 18:16:54 +05:30
Anand Doshi
e673a664ac Fixes to end_of_life conditions 2014-07-02 18:15:01 +05:30
Anand Doshi
57f76e936a Merge pull request #1880 from rmehta/fixes-july-2
formatting fix in support ticket autoreply
2014-07-02 18:13:55 +05:30
Rushabh Mehta
501b2cc617 duplicate name fix for customer 2014-07-02 18:01:30 +05:30
Anand Doshi
843cdbe690 Merge pull request #1879 from anandpdoshi/anand-wip
Fixed Employee Birthday Report
2014-07-02 17:44:05 +05:30
Anand Doshi
df7f1c17ac Fixed Employee Birthday Report 2014-07-02 17:35:00 +05:30
Anand Doshi
1601742092 Merge pull request #1878 from anandpdoshi/anand-wip
Automatic Outstanding Writeoff
2014-07-02 17:17:29 +05:30
Rushabh Mehta
6084a3e63a formatting fix in support ticket autoreply 2014-07-02 17:13:08 +05:30
Anand Doshi
adfada707d Automatic Outstanding Writeoff 2014-07-02 17:10:46 +05:30
Anand Doshi
e8533d15b3 Hotfix: Get Balance query 2014-07-01 19:46:22 +05:30
Anand Doshi
67721444b9 Merge pull request #1875 from rmehta/develop
status_updater.py
2014-07-01 18:50:25 +05:30
Rushabh Mehta
5f42276dbd added patch for fixing sales order delivered qty 2014-07-01 18:42:59 +05:30
Rushabh Mehta
c53efc0d6c fix status_updater - update delivery status in Sales Order from Sales Invoice 2014-07-01 18:42:30 +05:30
Rushabh Mehta
ddd2648c1e fix travis, build website before tests 2014-07-01 18:42:30 +05:30
Rushabh Mehta
079e640b6b Merge pull request #1876 from anandpdoshi/anand-wip
Fix JV Remarks
2014-07-01 18:35:13 +05:30
Anand Doshi
bc71f737b8 Fix JV Remarks 2014-07-01 18:12:26 +05:30
Anand Doshi
c33ae0c7df Minor fix: commonified message. 2014-07-01 16:27:24 +05:30
Rushabh Mehta
e9f43251ab Update journal_voucher.py 2014-07-01 15:19:15 +05:30
Rushabh Mehta
bc920dd2a5 Merge pull request #1868 from anandpdoshi/anand-wip
Fix comments
2014-07-01 12:34:17 +05:30
Anand Doshi
9398932c47 Merge pull request #1869 from nabinhait/v4-hotfix
Minor fix in authorization rule
2014-06-30 18:47:42 +05:30
Anand Doshi
da8adea0a9 Fixed customer test 2014-06-30 17:28:52 +05:30
Nabin Hait
669e789bc3 Minor fix in authorization rule 2014-06-30 17:15:52 +05:30
Anand Doshi
02cb347ac7 Fix comments after naming series records rename 2014-06-30 17:05:51 +05:30
Anand Doshi
0e72a87613 Improved test_rename: check if comments are also moved on rename 2014-06-30 17:05:51 +05:30
Anand Doshi
8ac4643fd7 Merge pull request #1867 from nabinhait/v4-hotfix
Multiple fixes
2014-06-30 13:20:49 +05:30
Rushabh Mehta
578a6db659 Merge pull request #1866 from anandpdoshi/anand-wip
Fixed get_sender for Sales and Jobs
2014-06-30 12:33:10 +05:30
Anand Doshi
4aa2380de2 Fixed get_sender for Sales and Jobs 2014-06-30 12:19:22 +05:30
Anand Doshi
2adf73cca1 Fixed requirements.txt 2014-06-30 12:18:08 +05:30
Anand Doshi
27b0d16422 Bumped to v4.1.0 2014-06-30 12:09:41 +05:30
Anand Doshi
c459fe21f8 Merge pull request #1865 from frappe/wip-4.1
Wip 4.1
2014-06-30 12:00:55 +05:30
Nabin Hait
6c7cd70202 Pricing rule condition if item group missing 2014-06-30 11:50:17 +05:30
Nabin Hait
606c601fc0 Make debit/credit note from sales/purchase return 2014-06-30 11:50:17 +05:30
Nabin Hait
7c9652997b Item website specification from item group 2014-06-30 11:50:17 +05:30
Nabin Hait
4e4a83bcef Fixes in maintenance schedule 2014-06-30 11:50:17 +05:30
Anand Doshi
7cac2884ae Merge pull request #1862 from anandpdoshi/anand-wip-4.1
Fixes in Website Route system and other misc fixes
2014-06-30 11:30:30 +05:30
Anand Doshi
11ada53ed5 Fixes related to Website Route system and other misc fixes 2014-06-28 12:13:11 +05:30
Anand Doshi
5ba7ab0fed Outgoing Mail Footer patch 2014-06-27 21:00:51 +05:30
Anand Doshi
ebcb654649 Minor: General Ledger Report - print format improvements 2014-06-27 20:53:13 +05:30
Nabin Hait
a46af033b9 Merge pull request #1860 from nabinhait/v4-hotfix
item  query fixed in stock entry
2014-06-27 13:04:58 +05:30
Nabin Hait
a0a18d963d item query fixed in stock entry 2014-06-27 13:04:22 +05:30
Anand Doshi
4105f324f7 Merge pull request #1858 from nabinhait/v4-hotfix
with_doc issue fixes
2014-06-26 16:16:35 +05:30
Nabin Hait
b7e91ee95e with_doc issue fixes 2014-06-26 15:54:45 +05:30
Anand Doshi
f1af06c00d Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-26 15:05:42 +05:30
Anand Doshi
779111d781 Merge pull request #1856 from nabinhait/v4-hotfix
V4 hotfix
2014-06-26 15:03:59 +05:30
Nabin Hait
3e6586f58d minor fix 2014-06-26 14:56:47 +05:30
Nabin Hait
cf2632fe59 Fetch warehouse from pos settings 2014-06-26 13:05:10 +05:30
Anand Doshi
322f3caec6 Merge pull request #1854 from anandpdoshi/anand-wip-4.1
Changed System Signature to Footer
2014-06-26 12:59:08 +05:30
Anand Doshi
56198f40ac Changed System Signature to Footer 2014-06-26 12:47:45 +05:30
Nabin Hait
4a1c897b2d Select field options in serial no 2014-06-26 12:35:14 +05:30
Rushabh Mehta
2b62accee0 Merge pull request #1853 from anandpdoshi/anand-wip
Material Request: fixed series issue in insert_purchase_request
2014-06-26 12:31:17 +05:30
Rushabh Mehta
16e543e734 Merge pull request #1852 from anandpdoshi/anand-wip-4.1
Fixes frappe/erpnext#1849
2014-06-26 12:30:29 +05:30
Anand Doshi
1030af7b48 Material Request: fixed series issue in insert_purchase_request 2014-06-26 12:07:55 +05:30
Anand Doshi
7f41ff26fa Fixes frappe/erpnext#1849 2014-06-26 12:02:55 +05:30
Rushabh Mehta
994f0c3d49 Merge pull request #1851 from nabinhait/v4-hotfix
Show Frozen field in account to all if Frozen Account Modifier is not sp...
2014-06-26 10:59:27 +05:30
Nabin Hait
500e1bc9b5 Show Frozen field in account to all if Frozen Account Modifier is not specified in Accounts Settings 2014-06-26 10:53:32 +05:30
Nabin Hait
23152f68f2 Merge pull request #1845 from nabinhait/v4-hotfix
V4 hotfix
2014-06-25 19:16:05 +05:30
Nabin Hait
00778c9a1e Validate expense account for perpetual inventory 2014-06-25 19:12:24 +05:30
Nabin Hait
33a21ffbdc Minor fixes in recurring invoice 2014-06-25 18:35:36 +05:30
Anand Doshi
5263b1a9c1 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-25 17:06:51 +05:30
Anand Doshi
3fc1088d73 Merge branch 'rmehta-wip-4.1' into wip-4.1 2014-06-25 17:04:37 +05:30
Anand Doshi
d12be12f72 Fixed gantt chart query for Task 2014-06-25 16:57:51 +05:30
Anand Doshi
fda8858fc3 Warehouse query filtered by company 2014-06-25 16:57:50 +05:30
Nabin Hait
29de86253f minor fixes 2014-06-25 16:57:50 +05:30
Nabin Hait
c7c89a5927 Cost center-wise net profit in financial analytics report 2014-06-25 16:57:50 +05:30
Nabin Hait
48f1142523 Fixed address deletion issue 2014-06-25 16:57:50 +05:30
Nabin Hait
9c2459658a Fixes for recurring invoice 2014-06-25 16:57:50 +05:30
Anand Doshi
ca37ff8b08 Fix in pricing rule patch 2014-06-25 16:57:50 +05:30
Nabin Hait
e6440a75b5 Allowed renaming for project 2014-06-25 16:57:50 +05:30
Nabin Hait
2b400dc2ad stock entry incoming rate based on precision 2014-06-25 16:57:49 +05:30
Nabin Hait
860b2e2bbb Fixes in pricing rule 2014-06-25 16:57:49 +05:30
Nabin Hait
f27fa5cbf3 Fixes in pricing rule 2014-06-25 16:57:49 +05:30
Nabin Hait
98bec6f96b Fixes in pricing rule 2014-06-25 16:57:49 +05:30
Nabin Hait
379d86f9a3 sms sending issue fixed 2014-06-25 16:57:49 +05:30
Anand Doshi
8b2dfcff29 Naming Series Property Setter Patch 2014-06-25 16:57:49 +05:30
Nabin Hait
b569930b2a Made warehouse and selling pricing list non-mandatory in pos setting 2014-06-25 16:57:48 +05:30
Nabin Hait
061c9744af Set status button in serial no 2014-06-25 16:57:48 +05:30
Nabin Hait
43616619ec Set status button in serial no 2014-06-25 16:57:48 +05:30
Nabin Hait
838aeb149f minor fix in sales invoice 2014-06-25 16:57:48 +05:30
Rushabh Mehta
37f809a1f4 fix end of life query for item 2014-06-25 16:57:48 +05:30
Rushabh Mehta
32303daf63 fixes to bom.js 2014-06-25 16:57:48 +05:30
Anand Doshi
d709f4dfdd Naming Series property type as Text 2014-06-25 16:57:47 +05:30
Nabin Hait
80142af9b8 Minor fixes 2014-06-25 16:57:47 +05:30
Nabin Hait
1b1b3a8fd6 validate pricing rule discount with item max discount 2014-06-25 16:57:47 +05:30
Nabin Hait
afffd656f6 Reload pricing rule in patch 2014-06-25 16:57:47 +05:30
Nabin Hait
4f6e31eb08 validate pricing rule discount with item max discount 2014-06-25 16:57:47 +05:30
Nabin Hait
9daca108b3 Pricing Rule fixes and improvements. Fixes #1795 2014-06-25 16:57:47 +05:30
Anand Doshi
de5e397fd4 Inventory Accounting: Cost Center only required for Expense Account 2014-06-25 16:57:46 +05:30
Anand Doshi
f5ec92c79a Validate Select field values 2014-06-25 16:57:46 +05:30
Anand Doshi
f654fea736 Fixed feed type options 2014-06-25 16:57:08 +05:30
Anand Doshi
daa56ca50f Fixed number format in currency 2014-06-25 16:57:08 +05:30
Anand Doshi
c20de7b264 Minor fix in Journal Voucher 2014-06-25 16:57:07 +05:30
Nabin Hait
c5e813f9f4 Overwrite from POS Settings if value exists 2014-06-25 16:57:07 +05:30
Nabin Hait
3b7dd0396f Get party details fixes 2014-06-25 16:57:07 +05:30
Nabin Hait
c226292d8e Stocvk entry incoming rate for sales return 2014-06-25 16:57:07 +05:30
Nabin Hait
216e5bb208 Incoming rate for sales return 2014-06-25 16:57:07 +05:30
Nabin Hait
afdc0a5f59 Valuation rate and amount for fg item 2014-06-25 16:57:07 +05:30
Anand Doshi
5a9e00ce71 Fixed Employee Leave Balance Report 2014-06-25 16:57:07 +05:30
Anand Doshi
ca3d60c160 Fixed Sales Order -> Delivery Note mapping of address fields 2014-06-25 16:57:06 +05:30
Anand Doshi
222b7b660e Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-25 16:57:06 +05:30
Anand Doshi
a469954ef3 Revert "Stock Entry: get fg item incoming rate if bom is mentioned"
This reverts commit 297939325a.
2014-06-25 16:57:06 +05:30
Anand Doshi
be1d11f98d Travis: Install frappe of targetted branch
For example:
If pull request is for wip-4.1 branch of erpnext, install frappe with branch as wip-4.1
2014-06-25 16:57:05 +05:30
Anand Doshi
457515fc08 Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-25 16:57:05 +05:30
Anand Doshi
e3ac8dd5a8 Don't set default for warehouse when creating serial no 2014-06-25 16:57:05 +05:30
Anand Doshi
14920b447c Fixed Currency Exchange error 2014-06-25 16:57:04 +05:30
Nabin Hait
0c6177dd9a Patch: update users report view settings for rename fields 2014-06-25 16:57:04 +05:30
Nabin Hait
cea571fc31 Fixes in fetching valuation rate in stock entry 2014-06-25 16:57:03 +05:30
Nabin Hait
d5a4c871f2 Field renamed in sms center 2014-06-25 16:57:02 +05:30
Nabin Hait
7c6c2e0ccf Do not make packing list after submission 2014-06-25 16:57:02 +05:30
Rushabh Mehta
476d1fb334 Update sms_center.json
changed total words to total characters
2014-06-25 16:57:01 +05:30
Rushabh Mehta
7ca3be57df Merge pull request #1844 from anandpdoshi/anand-wip
Serial No Validation in Stock Entry, Warehouse query fix
2014-06-25 16:05:17 +05:30
Anand Doshi
d1419edfd0 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-25 15:25:48 +05:30
Anand Doshi
a740f750c7 Stock Entry: Serial No Mandatory when purpose in Material Transfer, Sales Return, Purchase Return 2014-06-25 13:31:02 +05:30
Anand Doshi
610a405c85 Fix in warehouse query 2014-06-25 13:30:26 +05:30
Rushabh Mehta
aa1edfb6ae Merge pull request #1842 from anandpdoshi/anand-wip
Warehouse query filtered by Company, Fixed Gantt Chart query for task
2014-06-25 10:18:35 +05:30
Anand Doshi
4864c9e96a Fixed gantt chart query for Task 2014-06-24 18:53:17 +05:30
Anand Doshi
faefeaa644 Warehouse query filtered by company 2014-06-24 18:53:04 +05:30
Anand Doshi
e0a7ff77df Merge pull request #1838 from nabinhait/v4-hotfix
Multiple fixes
2014-06-24 17:37:39 +05:30
Nabin Hait
60c48fee16 minor fixes 2014-06-24 17:34:52 +05:30
Anand Doshi
1ef3dbabfc Merge pull request #1837 from anandpdoshi/anand-wip
Fix in pricing rule patch
2014-06-24 17:11:29 +05:30
Nabin Hait
0b15755441 Cost center-wise net profit in financial analytics report 2014-06-24 17:02:45 +05:30
Nabin Hait
e9b95bbfe8 Fixed address deletion issue 2014-06-24 16:35:00 +05:30
Nabin Hait
d0bf91d639 Fixes for recurring invoice 2014-06-24 16:19:16 +05:30
Anand Doshi
a1be6021c4 Fix in pricing rule patch 2014-06-24 15:26:40 +05:30
Nabin Hait
21efc93e54 Allowed renaming for project 2014-06-24 12:44:49 +05:30
Nabin Hait
fdf38dab6f stock entry incoming rate based on precision 2014-06-24 12:42:36 +05:30
Rushabh Mehta
5dfacf2615 Merge pull request #1834 from nabinhait/v4-hotfix
Multiple fixes
2014-06-24 12:09:12 +05:30
Nabin Hait
613d784cfb Fixes in pricing rule 2014-06-24 12:07:56 +05:30
Nabin Hait
efd426650d Fixes in pricing rule 2014-06-24 11:11:08 +05:30
Nabin Hait
f62b75c731 Fixes in pricing rule 2014-06-24 11:00:13 +05:30
Nabin Hait
65efd0a9a1 sms sending issue fixed 2014-06-23 18:21:37 +05:30
Anand Doshi
f08881a2b7 Merge pull request #1831 from anandpdoshi/anand-wip
Naming Series Property Setter Patch
2014-06-23 18:15:01 +05:30
Anand Doshi
83da92fdcc Naming Series Property Setter Patch 2014-06-23 18:04:07 +05:30
Nabin Hait
16fa6472b3 Made warehouse and selling pricing list non-mandatory in pos setting 2014-06-23 16:42:36 +05:30
Anand Doshi
6781f62c70 Merge pull request #1828 from rmehta/develop
item query fix
2014-06-23 15:53:38 +05:30
Anand Doshi
a445c39901 Merge pull request #1829 from nabinhait/v4-hotfix
V4 hotfix
2014-06-23 15:52:54 +05:30
Nabin Hait
da490e3f53 Set status button in serial no 2014-06-23 15:51:03 +05:30
Nabin Hait
ccd2e2496c Merge pull request #1827 from anandpdoshi/anand-wip
Naming Series property type as Text
2014-06-23 15:44:29 +05:30
Nabin Hait
36da171a3d Set status button in serial no 2014-06-23 15:36:31 +05:30
Nabin Hait
e84f8b23aa minor fix in sales invoice 2014-06-23 15:36:30 +05:30
Rushabh Mehta
864d1ea87f fix end of life query for item 2014-06-23 12:20:39 +05:30
Rushabh Mehta
58ff651c6d fixes to bom.js 2014-06-23 12:20:39 +05:30
Anand Doshi
c027563b13 Merge pull request #1826 from nabinhait/v4-hotfix
V4 hotfix
2014-06-20 20:44:17 +05:30
Anand Doshi
f0a1735ac8 Naming Series property type as Text 2014-06-20 20:19:51 +05:30
Nabin Hait
56f6d01757 Minor fixes 2014-06-20 19:37:53 +05:30
Nabin Hait
3c946b2a72 validate pricing rule discount with item max discount 2014-06-20 19:07:44 +05:30
Nabin Hait
1d37698d4c Reload pricing rule in patch 2014-06-20 16:30:44 +05:30
Nabin Hait
be50c289f8 validate pricing rule discount with item max discount 2014-06-20 16:19:55 +05:30
Nabin Hait
444f956e7b Pricing Rule fixes and improvements. Fixes #1795 2014-06-20 16:00:45 +05:30
Rushabh Mehta
b35d84156f Merge pull request #1822 from anandpdoshi/anand-wip
Inventory Accounting: Cost Center only required for Expense Account
2014-06-20 11:24:45 +05:30
Anand Doshi
496123a646 Inventory Accounting: Cost Center only required for Expense Account 2014-06-19 19:25:19 +05:30
Anand Doshi
861747ec26 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-19 17:44:33 +05:30
Anand Doshi
7bbaf0298e Merge pull request #1821 from nabinhait/v4-hotfix
Overwrite from POS Settings if value exists
2014-06-19 16:48:53 +05:30
Rushabh Mehta
a2f5a7f3cd Merge pull request #1820 from anandpdoshi/anand-wip
Validate Select Fields
2014-06-19 16:32:50 +05:30
Anand Doshi
a5cfc59d81 Validate Select field values 2014-06-19 16:05:08 +05:30
Anand Doshi
da342c7855 Fixed feed type options 2014-06-18 21:09:19 +05:30
Anand Doshi
aecddefbc8 Fixed number format in currency 2014-06-18 20:55:39 +05:30
Anand Doshi
fd05f458e1 Minor fix in Journal Voucher 2014-06-18 20:55:18 +05:30
Nabin Hait
faf176d78c Overwrite from POS Settings if value exists 2014-06-18 19:52:24 +05:30
Rushabh Mehta
151125e537 fixed for travis 2014-06-18 17:33:01 +05:30
Anand Doshi
64a0eb42ed Merge pull request #1816 from nabinhait/v4-hotfix
Stock Entry incoming rate
2014-06-18 17:32:04 +05:30
Nabin Hait
ba6cc2864a Merge pull request #1817 from anandpdoshi/anand-wip
Fixed Employee Leave Balance Report
2014-06-18 17:18:26 +05:30
Nabin Hait
4d7c4fc0f4 Get party details fixes 2014-06-18 16:40:59 +05:30
Nabin Hait
e7c2f74a07 Stocvk entry incoming rate for sales return 2014-06-18 16:40:59 +05:30
Nabin Hait
a7da6e1480 Incoming rate for sales return 2014-06-18 16:40:59 +05:30
Nabin Hait
ae0d753cad Valuation rate and amount for fg item 2014-06-18 16:40:59 +05:30
Anand Doshi
31c977b906 Fixed Employee Leave Balance Report 2014-06-18 16:26:45 +05:30
Nabin Hait
87179346d4 Merge pull request #1814 from anandpdoshi/anand-wip
Don't set warehouse when creating serial no, fixed currency exchange error message
2014-06-18 16:00:53 +05:30
Anand Doshi
d768afb80b Fixed Sales Order -> Delivery Note mapping of address fields 2014-06-18 15:23:25 +05:30
Anand Doshi
de12a0941f Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-18 14:05:29 +05:30
Anand Doshi
987a28fc6a Revert "Stock Entry: get fg item incoming rate if bom is mentioned"
This reverts commit 297939325a.
2014-06-18 14:05:08 +05:30
Anand Doshi
c5dbf0f8ad Travis: Install frappe of targetted branch
For example:
If pull request is for wip-4.1 branch of erpnext, install frappe with branch as wip-4.1
2014-06-18 13:35:37 +05:30
Anand Doshi
297939325a Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-18 13:10:10 +05:30
Anand Doshi
2f800521cb Don't set default for warehouse when creating serial no 2014-06-18 12:48:46 +05:30
Anand Doshi
72a178a37e Fixed Currency Exchange error 2014-06-18 12:14:17 +05:30
Anand Doshi
8c7b4549ed Merge pull request #1812 from nabinhait/v4-hotfix
Multiple fixes
2014-06-18 10:59:05 +05:30
Nabin Hait
91090042d1 Patch: update users report view settings for rename fields 2014-06-18 10:29:53 +05:30
Nabin Hait
0693937c1e Fixes in fetching valuation rate in stock entry 2014-06-18 10:20:01 +05:30
Nabin Hait
ac1a4ed576 Field renamed in sms center 2014-06-18 10:20:01 +05:30
Nabin Hait
b73d3f925d Do not make packing list after submission 2014-06-18 10:18:50 +05:30
Rushabh Mehta
69641ddc36 Update sms_center.json
changed total words to total characters
2014-06-18 09:04:09 +05:30
Rushabh Mehta
36881807ed Merge branch 'wip-4.2' into wip-4.1 2014-06-17 17:36:22 +05:30
Rushabh Mehta
1a18b427a8 make font size smaller for erpnext powered 2014-06-17 16:54:55 +05:30
Rushabh Mehta
69ce97b80a added print format for general ledger 2014-06-17 16:54:55 +05:30
Rushabh Mehta
9f887b436c fixes new routing, for frappe/frappe#600 2014-06-17 16:53:44 +05:30
Anand Doshi
5780163fb7 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-17 14:58:18 +05:30
Anand Doshi
1c5fb9495e Merge pull request #1806 from nabinhait/v4-hotfix
Fixes
2014-06-17 14:54:44 +05:30
Rushabh Mehta
5df521bad5 updated generators for wip-4.2 2014-06-17 14:21:26 +05:30
Nabin Hait
be75d0265b Merge pull request #1805 from anandpdoshi/anand-wip
Sales Invoice List: show percent paid as 100% if grand total is 0
2014-06-17 14:12:26 +05:30
Anand Doshi
b20de6a3ec Sales Invoice List: show percent paid as 100% if grand total is 0 2014-06-17 13:58:06 +05:30
Nabin Hait
4ee8704b99 Fixes in financial analytics 2014-06-17 13:52:03 +05:30
Nabin Hait
d2e8a0a96a Delivery note update after submission 2014-06-17 12:55:52 +05:30
Anand Doshi
ff367c7b31 Merge pull request #1798 from nabinhait/v4-hotfix
Account common get_query
2014-06-16 16:04:32 +05:30
Nabin Hait
98d9d797fd Tax category validation ignored in material request 2014-06-16 15:54:05 +05:30
Nabin Hait
a6fc3f6337 Ignore pricing rule for material request 2014-06-16 15:34:52 +05:30
Nabin Hait
539f352318 Delivery note to packing slip mapping 2014-06-16 15:03:36 +05:30
Nabin Hait
e1b2b3e995 Account common get_query 2014-06-16 15:03:36 +05:30
Rushabh Mehta
3b7bcf0f4f make font size smaller for erpnext powered 2014-06-16 14:21:37 +05:30
Rushabh Mehta
03ae32d937 added print format for general ledger 2014-06-16 14:21:37 +05:30
Anand Doshi
ccf370f813 Fixed item query 2014-06-16 13:50:11 +05:30
Anand Doshi
0521814dea Fixed item query 2014-06-16 13:25:20 +05:30
Anand Doshi
e35841a2ea Reload Shopping Cart Settings in create price list patch 2014-06-16 12:59:54 +05:30
Anand Doshi
3474c273a5 Ignore mandatory in employee patch 2014-06-16 12:14:21 +05:30
Anand Doshi
3dc722b096 Create price list only if setup complete 2014-06-13 15:30:38 +05:30
Rushabh Mehta
5002a6467d Merge pull request #1793 from anandpdoshi/anand-wip
Create price list if missing
2014-06-13 13:20:46 +05:30
Anand Doshi
c1bfb63d96 Create price list if missing 2014-06-13 12:41:08 +05:30
Anand Doshi
27e295a4cb Merge pull request #1789 from nabinhait/v4-hotfix
V4 hotfix
2014-06-12 15:39:58 +05:30
Rushabh Mehta
99703a95c2 Merge pull request #1790 from anandpdoshi/wip-anand
Fixes split email settings, removed clear custom buttons, pos view switch
2014-06-12 15:25:03 +05:30
Nabin Hait
f2202fc014 minor fix 2014-06-12 15:20:47 +05:30
Anand Doshi
3761ff3522 Fix in patch: split email settings 2014-06-12 15:00:52 +05:30
Anand Doshi
205438669a Removed clear_custom_buttons, pos view switch fix 2014-06-12 15:00:51 +05:30
Nabin Hait
e7f2d3179d update other_charges in custom print formats 2014-06-12 14:58:09 +05:30
Anand Doshi
277f4a1bfe Removed clear_custom_buttons, pos view switch fix 2014-06-12 12:59:23 +05:30
Nabin Hait
46dc3b1442 validations added in stock entry 2014-06-12 12:48:28 +05:30
Nabin Hait
2128c98c35 available qty validation. Fixes #1045 2014-06-12 12:42:22 +05:30
Nabin Hait
e98b326ba3 Stock Entry: Always set valuation rate automatically if source warehouse provided or sales return. Fixes #932 2014-06-12 12:25:23 +05:30
Rushabh Mehta
7bcd31bddb Merge pull request #1785 from rmehta/develop
minor fix for outgoing communication email
2014-06-12 10:32:21 +05:30
Rushabh Mehta
6def968c3c minor fix for outgoing communication email 2014-06-12 10:31:43 +05:30
Nabin Hait
f2ee3cec19 Merge pull request #1784 from nabinhait/v4-hotfix
Minor fixes in salary manager. Fixes #1754
2014-06-12 10:19:27 +05:30
Nabin Hait
589a298096 Minor fixes in salary manager. Fixes #1754 2014-06-11 13:00:31 +05:30
Rushabh Mehta
94c17bdf85 Update CONTRIBUTING.md 2014-06-11 10:45:57 +05:30
Anand Doshi
fdfea0c17b Fixed Recurring Sales Invoice 2014-06-10 17:54:04 +05:30
Anand Doshi
862fe60368 Minor fix in newsletter 2014-06-10 17:15:50 +05:30
Nabin Hait
6a3e97a9f8 Merge pull request #1781 from anandpdoshi/hotfix
Reload sales taxes and charges in patch
2014-06-10 16:37:59 +05:30
Anand Doshi
7656377f3f Show website route for generator via set_intro, fix in Support Email Settings 2014-06-10 15:48:37 +05:30
Anand Doshi
82029be6f9 Reload sales taxes and charges in patch 2014-06-10 14:52:49 +05:30
Anand Doshi
339f75eb53 Merge pull request #1780 from nabinhait/v4-hotfix
minor fix in global defaults
2014-06-10 14:36:29 +05:30
Nabin Hait
7425634692 minor fix in global defaults 2014-06-10 14:12:28 +05:30
Anand Doshi
38d5407ea1 Merge pull request #1779 from nabinhait/v4-hotfix
Fixes
2014-06-10 11:40:26 +05:30
Nabin Hait
6febfca5a6 changed insert after for india related custom fields 2014-06-10 11:21:38 +05:30
Nabin Hait
7cba72a0b7 Pricing Rule: price / discount percentage can not be negative 2014-06-10 11:09:21 +05:30
Anand Doshi
fb6c003c97 Merge pull request #1778 from nabinhait/v4-hotfix
update custom print formats for renamed fields
2014-06-10 10:43:51 +05:30
Nabin Hait
91016ba989 update custom print formats for renamed fields 2014-06-10 10:41:37 +05:30
Nabin Hait
2aaf1de7fe Merge pull request #1777 from anandpdoshi/hotfix
Default Letterhead, Item wise Price List Rate
2014-06-09 18:52:28 +05:30
Anand Doshi
b527e54809 Fixed report: Item wise Price List Rate 2014-06-09 18:08:46 +05:30
Anand Doshi
c01db5fe9c Save default letterhead 2014-06-09 18:01:14 +05:30
Anand Doshi
534ebde638 Merge pull request #1775 from nabinhait/v4-hotfix
create custom fields for india specific fields
2014-06-09 16:23:21 +05:30
Nabin Hait
d532d2f64f create custom fields for india specific fields 2014-06-09 16:00:49 +05:30
Nabin Hait
7bcd69e157 Merge pull request #1774 from anandpdoshi/hotfix
Also save Global Defaults in System Settings patch
2014-06-09 15:52:03 +05:30
Anand Doshi
af63d053b1 Also save Global Defaults in System Settings patch 2014-06-09 15:51:12 +05:30
Nabin Hait
d9ff118b40 Merge pull request #1771 from anandpdoshi/hotfix
Fix in HR patch
2014-06-09 15:33:14 +05:30
Anand Doshi
be3f914acd Fixed add address template 2014-06-09 15:18:45 +05:30
Anand Doshi
edb9efd9a6 Fixed manifest and website 2014-06-09 15:11:18 +05:30
Anand Doshi
cdfa9a371d Export perm for GL Entry and Stock Ledger Entry 2014-06-09 15:11:17 +05:30
Anand Doshi
390efdc884 Fix in HR patch 2014-06-09 15:04:00 +05:30
Anand Doshi
ac276a27b7 Merge pull request #1772 from nabinhait/v4-hotfix
Update tax amount after discount in existing documents
2014-06-09 14:04:15 +05:30
Nabin Hait
b63e99eb43 Update tax amount after discount in existing documents 2014-06-09 12:49:09 +05:30
Anand Doshi
00976cfe47 Merge pull request #1768 from anandpdoshi/hotfix
Fixed HR patch
2014-06-06 22:11:39 +05:30
Anand Doshi
6f561aa846 Fixed HR patch 2014-06-06 22:10:18 +05:30
Anand Doshi
276386c94a Merge pull request #1765 from anandpdoshi/hotfix
Fixed Purchase Receipt qty trigger
2014-06-06 20:39:52 +05:30
Anand Doshi
0aa125304d Fixed Reset Permissions patch 2014-06-06 20:39:21 +05:30
Anand Doshi
482d29dc53 Fixed Purchase Receipt qty trigger 2014-06-06 20:34:08 +05:30
Anand Doshi
cd0aed993a Fixed Address Template Patch 2014-06-06 17:37:31 +05:30
Anand Doshi
f56656f6b4 Merge pull request #1763 from anandpdoshi/hotfix
Fixed address template and changed case
2014-06-06 17:20:57 +05:30
Anand Doshi
fc601659f5 Fixed Address Template 2014-06-06 17:07:50 +05:30
Anand Doshi
4a069a1e7f Changed case in modules.txt 2014-06-06 16:28:03 +05:30
Anand Doshi
04badf7e6e Hotfix: module name case for HR 2014-06-06 15:29:55 +05:30
Rushabh Mehta
0b31a163a3 Merge pull request #1761 from anandpdoshi/hotfix
Improved FIscal Year Error Messages, Reset Permissions for some DocTypes
2014-06-06 15:20:07 +05:30
Anand Doshi
171c00cfd6 Reload permissions for master and setting documents 2014-06-06 15:13:20 +05:30
Anand Doshi
b5cefa92fa Improved Fiscal Year validation messages 2014-06-06 15:10:00 +05:30
Anand Doshi
8cead48342 Merge pull request #1756 from rmehta/develop
removed sms control and related cleanup, fixes frappe/erpnext#462
2014-06-06 14:52:22 +05:30
Rushabh Mehta
1989e4fca0 Merge pull request #1755 from nabinhait/v4-hotfix
Fixes in trends report
2014-06-06 12:49:34 +05:30
Rushabh Mehta
880b3ef6c0 added qty updating option multi-item selector 2014-06-06 11:45:30 +05:30
Anand Doshi
2ec93590e4 Minor fix in address template 2014-06-06 11:45:30 +05:30
Anand Doshi
5fe69fb556 Fixes 2014-06-06 11:45:29 +05:30
Anand Doshi
290ed09dc6 Update new_address_template.py 2014-06-06 11:45:29 +05:30
Anand Doshi
65018daebc Minor fix in address template 2014-06-05 18:33:26 +05:30
Rushabh Mehta
0739937fa2 bug: added empty class for sms settings 2014-06-05 18:15:00 +05:30
Anand Doshi
ede8ea52b0 Fixes 2014-06-05 18:06:20 +05:30
Rushabh Mehta
ba83e9cfbe removed sms control and related cleanup, fixes frappe/erpnext#462 2014-06-05 17:56:42 +05:30
Nabin Hait
977331806b Set missing values only in unsubmitted documents 2014-06-05 17:55:00 +05:30
Nabin Hait
86207afe15 Set missing values only in unsubmitted documents 2014-06-05 17:55:00 +05:30
Nabin Hait
704a453b7a Set missing values only in unsubmitted documents 2014-06-05 17:55:00 +05:30
Nabin Hait
b7438894f6 Fixes in trends report 2014-06-05 17:55:00 +05:30
Anand Doshi
4022586015 Update new_address_template.py 2014-06-05 17:34:59 +05:30
Anand Doshi
26fcef69c7 Merge pull request #1753 from rmehta/develop
Address Template
2014-06-05 16:28:10 +05:30
Rushabh Mehta
5036706f81 removed address_title from address and removed test 2014-06-05 16:16:13 +05:30
Rushabh Mehta
c02fbd22fa removed address_title from address and removed test 2014-06-05 16:16:13 +05:30
Rushabh Mehta
33020a63b8 patch for address template fixes #1749 2014-06-05 16:16:13 +05:30
Rushabh Mehta
eaa2e55d20 patch for address template fixes #1749 2014-06-05 16:16:13 +05:30
Rushabh Mehta
c22e11d483 added address template: 2014-06-05 16:01:55 +05:30
Rushabh Mehta
41471c3b44 fixed description in salary manager 2014-06-05 16:01:55 +05:30
Anand Doshi
17e7538937 Merge pull request #1746 from nabinhait/v4-hotfix
Multiple issues
2014-06-05 15:27:57 +05:30
Nabin Hait
c8be8ba42c function renamed 2014-06-05 15:18:10 +05:30
Nabin Hait
4d4df03f88 Added total debit / credit row in trial balance. Fixes #1313 2014-06-04 19:00:57 +05:30
Nabin Hait
deb6e06336 minor fix 2014-06-04 19:00:56 +05:30
Nabin Hait
c3d1d6a946 cleanup raw materials supplied table for sub-contraction. Fixes #1743 2014-06-04 19:00:56 +05:30
Nabin Hait
1055139c83 get accounts for opening entry 2014-06-04 19:00:56 +05:30
Nabin Hait
19d1e499c3 Removed Purchase in transit report #1435 2014-06-04 19:00:56 +05:30
Nabin Hait
b161eea793 Account balance must be debit / credit, validate if balance already in credit / debit. Fixes #1442 2014-06-04 18:57:53 +05:30
Anand Doshi
8fbe4b9c3b Merge pull request #1747 from anandpdoshi/apply_user_permissions
Apply user permissions
2014-06-04 18:38:25 +05:30
Anand Doshi
85479bcbc0 Fixes for apply user permissions and momentjs 2014-06-04 18:15:43 +05:30
Anand Doshi
ec8240e890 Apply User Permissions optional in Script and Query Reports 2014-06-04 17:48:58 +05:30
Anand Doshi
221dec8cac transaction.js: calculate only if one entry in table 2014-06-04 17:48:57 +05:30
Anand Doshi
9a0f6f5bb4 Enable Scheduler in System Settings when Setup Wizard is completed 2014-06-04 17:48:57 +05:30
Anand Doshi
38dedf402b Fixes in patches for migration 2014-06-04 17:48:56 +05:30
Anand Doshi
c280d0655c Set Employee Name if missing 2014-06-04 17:48:56 +05:30
Anand Doshi
cdc1b640d9 Fixes in user permissions patches 2014-06-04 17:48:56 +05:30
Anand Doshi
37993dd713 Romanian and Korean Translations 2014-06-04 17:48:55 +05:30
Anand Doshi
cd25301607 Translations 2014-06-04 17:48:55 +05:30
Anand Doshi
4985691617 Role and User Permissions 2014-06-04 17:48:54 +05:30
Anand Doshi
69eec9e344 Role and User Permissions 2014-06-04 17:48:54 +05:30
Anand Doshi
a8ce570635 Permission relogication continued 2014-06-04 17:48:53 +05:30
Anand Doshi
fab0904af7 Started permission relogication 2014-06-04 17:48:52 +05:30
Anand Doshi
ffc28faa51 Merge pull request #1744 from rmehta/develop
added multiple item select and allow non purchase items in Material Requ...
2014-06-04 17:47:58 +05:30
Rushabh Mehta
b6843f2087 added multiple item select and allow non purchase items in Material Request of type transfer 2014-06-04 13:10:41 +05:30
Anand Doshi
3f6606acdb Merge pull request #1702 from pdvyas/put-version-in-file
keep version in separate file
2014-06-04 12:28:37 +05:30
Anand Doshi
7a3885863c Merge pull request #1740 from nabinhait/v4-hotfix
fixes
2014-06-04 11:56:42 +05:30
Nabin Hait
67d8b91690 Fixes in bank reconciliation statement 2014-06-04 11:18:25 +05:30
Nabin Hait
ce6977ffe6 Minor fixes in fetching item details 2014-06-03 23:02:02 +05:30
Nabin Hait
bc7efa6da6 Parent account mandatory for all non-root accounts 2014-06-03 23:02:02 +05:30
Anand Doshi
9198444a3b Merge pull request #1737 from nabinhait/v4-hotfix
Grid report translations and closing balance in trial balance
2014-06-03 14:40:26 +05:30
Nabin Hait
b15764ef2c Translation issue fixed in analytics/grid report 2014-06-03 13:02:39 +05:30
Nabin Hait
abb62c76d8 Removed allocated to field from serach fields in support ticket 2014-06-03 10:50:55 +05:30
Nabin Hait
51b7f322cc Closing balance fixes in trial balance. Fixes #1730 2014-06-02 18:47:46 +05:30
Anand Doshi
be99b1240c Merge pull request #1722 from nabinhait/v4-hotfix
multiple fixes
2014-06-02 11:09:32 +05:30
Anand Doshi
315e3b563b Merge pull request #1725 from rmehta/develop
Fix for awesome bar
2014-06-02 11:07:26 +05:30
Rushabh Mehta
430d132ee0 awesomebar: add tree links 2014-05-31 10:36:42 +05:30
Rushabh Mehta
cc37cc83cd removed section_style 2014-05-31 10:36:41 +05:30
Nabin Hait
0984f227a8 minor fixes related to path 2014-05-30 19:10:12 +05:30
Nabin Hait
548cf96c44 Minor fixes in sales return 2014-05-30 19:09:59 +05:30
Nabin Hait
0be378af6a Purchase ordered qty can not be less than minimum order qty. fixes #1529 2014-05-30 15:53:20 +05:30
Nabin Hait
fb988ba834 Salary Slip: pull details from salary struture. fixes #1719 2014-05-30 15:53:20 +05:30
Nabin Hait
e6ddd28067 Don't execute reorder_item, if initial setup not completed. fixes #1668 2014-05-30 15:53:20 +05:30
Nabin Hait
0acd3159db Merge pull request #1718 from nabinhait/v4-hotfix
Remove blank lines from uploaded file of attendance
2014-05-30 14:33:59 +05:30
Nabin Hait
1897e75894 Remove blank lines from uploaded file of attendance #1714 2014-05-30 14:31:10 +05:30
Anand Doshi
852e7cdb41 Merge pull request #1691 from nabinhait/v4-hotfix
build_filter_conditions and pricing rules
2014-05-30 11:51:36 +05:30
Nabin Hait
c1367d9d10 minor fixes 2014-05-30 11:43:00 +05:30
Nabin Hait
cb9bdf43f6 over billing validation fixed 2014-05-30 11:22:16 +05:30
Nabin Hait
6b1a8e0a40 minor fixes 2014-05-30 11:22:16 +05:30
Nabin Hait
7f32cbeb06 Total valuation for manufactured or repacked item(s) can not be less than total valuation of raw materials #1688 2014-05-30 11:22:15 +05:30
Nabin Hait
c7253b3a37 Get valuation rate for fg item base don issued item cost + operation cost. #1688 2014-05-30 11:22:15 +05:30
Nabin Hait
7f03e24c55 Valuation rate of raw materials in BOM. #1688 2014-05-30 11:22:15 +05:30
Nabin Hait
66cecf4824 uom trigger issue in stock entry fixes #1712 2014-05-30 11:22:15 +05:30
Nabin Hait
f3552ca737 packing slip fixes #1711 2014-05-30 11:22:15 +05:30
Nabin Hait
3dc6a80198 deleted delivery note packing list wise print format 2014-05-30 11:22:14 +05:30
Nabin Hait
e71159d6ea Standard Rate field removed from item. Fixes #1688 2014-05-30 11:22:14 +05:30
Nabin Hait
732a7e81a0 Incoming rate in stock ledger and valuation rate in stock balance report. Fixes #1706 2014-05-30 11:22:14 +05:30
Nabin Hait
c3cbe2a30c minor fixes in sales invoice validation 2014-05-30 11:22:13 +05:30
Nabin Hait
9bc9b8795b Fixes in stock reconciliation 2014-05-30 11:22:13 +05:30
Nabin Hait
d0605443fb removed print statement 2014-05-30 11:22:13 +05:30
Nabin Hait
47a8670d37 pricing rule testcase fixes 2014-05-30 11:22:12 +05:30
Nabin Hait
e7546e2305 SMS Settings added in setup and selling module page. Fixes #1693 2014-05-30 11:22:12 +05:30
Nabin Hait
ccb9826afd pricing list tets case fixes 2014-05-30 11:22:12 +05:30
Nabin Hait
8de61559b0 Minor fixes in sales / purchase analytics. Fixes #1701 2014-05-30 11:22:11 +05:30
Nabin Hait
ea4aa04cc4 Search query for account cleanup 2014-05-30 11:22:11 +05:30
Nabin Hait
a3dd72a759 Pricing Rule 2014-05-30 11:22:10 +05:30
Nabin Hait
62ec60188b use build_filter_conditions from db_query. Fixes #1679 2014-05-30 11:22:10 +05:30
Anand Doshi
10cb4799bc Merge pull request #1700 from rmehta/develop
Various UI Bug Fixes
2014-05-30 11:12:21 +05:30
Pratik Vyas
8e0438bad4 keep version in separate file 2014-05-28 16:58:55 +05:30
Pratik Vyas
76e48b5c3f hotfix: update_account_root_type.py patch 2014-05-28 15:22:34 +05:30
Rushabh Mehta
1bf9df7c85 removed about 2014-05-28 13:15:32 +05:30
Anand Doshi
32063bb472 Removed designation 'Director' owing to problems with Greek translation 2014-05-27 22:40:53 +05:30
Rushabh Mehta
f944e819e9 fixes #1581 and added icons to grid reports 2014-05-27 15:22:04 +05:30
Nabin Hait
9c1ae09994 Merge pull request #1689 from rmehta/develop
fix to pos invoice
2014-05-26 16:22:03 +05:30
Rushabh Mehta
d82e85d099 fix to pos invoice 2014-05-26 16:01:01 +05:30
Nabin Hait
c1d0851a56 Merge pull request #1687 from nabinhait/v4-hotfix
Update status based on communication. Fixes #1682
2014-05-26 15:07:31 +05:30
Nabin Hait
08dd6af446 Update status based on communication. Fixes #1682 2014-05-26 15:06:42 +05:30
Nabin Hait
ff8f32ca80 Merge pull request #1686 from rmehta/develop
Fixes
2014-05-26 13:36:28 +05:30
Rushabh Mehta
a7c46e4d83 removed debug in query (packing_slip.py) 2014-05-26 13:35:47 +05:30
Rushabh Mehta
b15d760406 fix to packing slip (validation) 2014-05-26 13:05:19 +05:30
Rushabh Mehta
9f399f139b Merge branch 'develop' of github.com:frappe/erpnext into develop 2014-05-26 11:40:46 +05:30
Rushabh Mehta
3b0f026522 fix to sales parter 2014-05-24 12:04:13 +05:30
Anand Doshi
8db94e7407 Merge pull request #1680 from anandpdoshi/hotfix
Updated Translations
2014-05-23 10:43:16 +05:30
Anand Doshi
8d321446ad Updated translations 2014-05-23 10:29:37 +05:30
Anand Doshi
c783c2636f Updated translations 2014-05-23 09:22:12 +05:30
Anand Doshi
5468740042 Fixed setup wizard errors for chinese simplified 2014-05-23 09:21:55 +05:30
Anand Doshi
69e4b16817 Setup Wizard: clear cache on language change 2014-05-22 22:52:36 +05:30
Pratik Vyas
e35a1025c9 hotfix: communication email bug 2014-05-22 18:37:55 +05:30
Rushabh Mehta
0f5601dad4 Merge pull request #1677 from rmehta/develop
Added title_field and added ignore_permission while creating Event from Lead
2014-05-22 11:23:03 +05:30
Pratik Vyas
a5f35e2b3c Merge pull request #1678 from anandpdoshi/hotfix
Fixed global_defaults_to_system_settings
2014-05-22 11:15:21 +05:30
Anand Doshi
c57d7dea8b Fixed global_defaults_to_system_settings 2014-05-22 11:05:46 +05:30
Rushabh Mehta
a39cae9c2e added title field to support ticket, lead and employee 2014-05-21 17:34:22 +05:30
Anand Doshi
53142f125b Merge pull request #1675 from nabinhait/v4-hotfix
Create serial no based on series only if item is serialized
2014-05-21 16:08:14 +05:30
Nabin Hait
edf87a258f Create serial no based on series only if item is serialized 2014-05-21 15:38:56 +05:30
Anand Doshi
18144da755 Merge pull request #1674 from anandpdoshi/hotfix
Hook: setup_wizard_success
2014-05-21 15:25:11 +05:30
Anand Doshi
d6007e7d9c Hook: setup_wizard_success 2014-05-21 15:22:15 +05:30
Rushabh Mehta
92ce693e6f added ignore_permission in Lead for creating Event 2014-05-21 14:59:56 +05:30
Anand Doshi
d2802cab6c Merge pull request #1672 from nabinhait/v4-hotfix
Account root type and email digest for income / expense
2014-05-21 12:50:08 +05:30
Nabin Hait
177fb132b9 description added in setup wizard 2014-05-21 12:39:37 +05:30
Nabin Hait
d811303d7b minor fix 2014-05-21 12:36:43 +05:30
Nabin Hait
27b12ef1b6 update account root type patch 2014-05-21 11:53:59 +05:30
Nabin Hait
4efc5d74d4 Setup Wizard: company abbr length validation on onchange trigger 2014-05-21 11:53:59 +05:30
Nabin Hait
b5c552faf3 minor fix 2014-05-21 11:53:59 +05:30
Nabin Hait
dec02340e8 reload account doc in root type patch 2014-05-21 11:53:59 +05:30
Nabin Hait
3f80ef0648 reload account doc in root type patch 2014-05-21 11:53:59 +05:30
Nabin Hait
44ae408b36 Income/expense info in email digest 2014-05-21 11:53:58 +05:30
Nabin Hait
0e6554edc1 Root Type field added in account and patch for existing accoutns 2014-05-21 11:53:58 +05:30
Pratik Vyas
c8c5d37bcf Release 4.0.2 2014-05-20 16:42:10 +05:30
Pratik Vyas
5873e50c50 Release 4.0.2 2014-05-20 16:42:01 +05:30
Pratik Vyas
4f1371945d hotfix: frappe version in requirements.txt 2014-05-20 16:39:29 +05:30
781 changed files with 60440 additions and 24073 deletions

View File

@@ -14,8 +14,18 @@ install:
- sudo apt-get update
- sudo apt-get purge -y mysql-common
- sudo apt-get install mariadb-server mariadb-common libmariadbclient-dev
- CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@develop &&
- pip install --editable .
- ./ci/fix-mariadb.sh
- sudo apt-get install xfonts-75dpi xfonts-base -y
- wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-precise-amd64.deb
- sudo dpkg -i wkhtmltox-0.12.2.1_linux-precise-amd64.deb
- CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@develop
- CFLAGS=-O0 pip install --editable .
before_script:
- mysql -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root
script:
- cd ./test_sites/
@@ -23,9 +33,6 @@ script:
- frappe --reinstall
- frappe --install_app erpnext --verbose
- frappe -b
- frappe --build_website
- frappe --serve_test &
- frappe --verbose --run_tests --app erpnext
before_script:
- mysql -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root

View File

@@ -1,16 +1,23 @@
# Contributing to ERPNext
# Contributing to Frappe / ERPNext
### Update 16-Sep-14
Please send pull requests to branch v5.0
## Reporting issues
We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems. Please read the following guidelines before opening any issue.
1. **Search for existing issues.** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. The issue may have already been resolved with a fix available.
1. **Search for existing issues:** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. The issue may have already been resolved with a fix available.
1. **Report each issue separately:** Don't club multiple, unreleated issues in one note.
1. **Mention the version number:** Please mention the application, browser and platform version numbers.
### Issues
1. **Share as much information as possible.** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
1. Consider adding screenshots annotated with what goes wrong.
1. If you are reporting an issue from the browser, Open the Javascript Console and paste us any error messages you see.
1. **Share as much information as possible:** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
1. **Include Screenshots if possible:** Consider adding screenshots annotated with what goes wrong.
1. **Find and post the trace for bugs:** If you are reporting an issue from the browser, Open the Javascript Console and paste us any error messages you see.
### Feature Requests
@@ -37,14 +44,10 @@ that function to accommodate your use case.
DocTypes are easy to create but hard to maintain. If you find that there is a another DocType with a similar functionality, then please try and extend that functionality. For example, by adding a "type" field to classify the new type of record.
#### Don't Send Trivial Requests
Don't send pull requests for fixing a simple typo in a code comment.
#### Tabs or spaces?
Tabs!
### Copyright
Please see README.md
Please see README.md

View File

@@ -16,4 +16,5 @@ recursive-include erpnext *.md
recursive-include erpnext *.png
recursive-include erpnext *.py
recursive-include erpnext *.svg
recursive-include erpnext/public *
recursive-exclude * *.pyc

View File

@@ -1,34 +1,31 @@
# ERPNext - Open Source ERP for small, medium sized businesses [![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext)
# ERPNext - Open source ERP for small and medium-size business [![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext)
[https://erpnext.com](https://erpnext.com)
Includes Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Built on Python / MySQL.
Includes: Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Requires MariaDB.
ERPNext is built on [frappe](https://github.com/frappe/frappe)
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & Javascript.
- [User Guide](http://erpnext.org/user-guide.html)
- [User Guide](https://erpnext.com/user-guide)
- [Getting Help](http://erpnext.org/getting-help.html)
- [Developer Forum](http://groups.google.com/group/erpnext-developer-forum)
- [User Forum](http://groups.google.com/group/erpnext-user-forum)
- [Discussion Forum](https://discuss.frappe.io/)
---
### Development install
### Full Install
Use the bench, https://github.com/frappe/frappe-bench.
The Easy Way install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench
### Admin Login
New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).
1. go to "/login"
1. Administrator user name: "Administrator"
1. Administrator passowrd "admin"
### Virtual Image
### Download and Install
##### Virtual Image:
You can download a virtual image to run ERPNext in a virtual machine on your local system.
- [ERPNext Download](http://erpnext.com/download)
System and user credentials are listed on the download page.
---
## License

11
ci/fix-mariadb.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837
includedir=`mysql_config --variable=pkgincludedir`
thiscwd=`pwd`
_THIS_DB_VERSION=`mysql -V 2>&1 | tr -d "\n" | cut -d" " -f6 | awk '{ print $1}' | cut -d"-" -f1 | awk '{ print $1}' | sed "s/[\,']//g"`
if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e "$includedir-$_THIS_DB_VERSION-fixed.log" ] ; then
cd $includedir
sudo patch -p1 < $thiscwd/ci/my_config.h.patch &> /dev/null
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
fi

22
ci/my_config.h.patch Normal file
View File

@@ -0,0 +1,22 @@
diff -burp a/my_config.h b/my_config.h
--- a/my_config.h 2014-10-09 19:32:46.000000000 -0400
+++ b/my_config.h 2014-10-09 19:35:12.000000000 -0400
@@ -641,17 +641,4 @@
#define SIZEOF_TIME_T 8
/* #undef TIME_T_UNSIGNED */
-/*
- stat structure (from <sys/stat.h>) is conditionally defined
- to have different layout and size depending on the defined macros.
- The correct macro is defined in my_config.h, which means it MUST be
- included first (or at least before <features.h> - so, practically,
- before including any system headers).
-
- __GLIBC__ is defined in <features.h>
-*/
-#ifdef __GLIBC__
-#error <my_config.h> MUST be included first!
-#endif
-
#endif

View File

@@ -1 +1 @@
__version__ = '4.0.1'
from erpnext.__version__ import __version__

1
erpnext/__version__.py Normal file
View File

@@ -0,0 +1 @@
__version__ = '4.20.0'

View File

@@ -49,28 +49,25 @@ cur_frm.cscript.master_type = function(doc, cdt, cdn) {
}
cur_frm.add_fetch('parent_account', 'report_type', 'report_type');
cur_frm.add_fetch('parent_account', 'root_type', 'root_type');
cur_frm.cscript.account_type = function(doc, cdt, cdn) {
if(doc.group_or_ledger=='Ledger') {
cur_frm.toggle_display(['tax_rate'], doc.account_type == 'Tax');
cur_frm.toggle_display('master_type', cstr(doc.account_type)=='');
cur_frm.toggle_display('master_name', doc.account_type=='Warehouse' ||
in_list(['Customer', 'Supplier'], doc.master_type));
}
}
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.appframe.add_button(__('Chart of Accounts'),
cur_frm.add_custom_button(__('Chart of Accounts'),
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
cur_frm.appframe.add_button(__('View Ledger'), function() {
cur_frm.add_custom_button(__('View Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
@@ -79,6 +76,9 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
};
frappe.set_route("query-report", "General Ledger");
}, "icon-table");
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
}
}

View File

@@ -1,322 +1,332 @@
{
"allow_copy": 1,
"allow_import": 1,
"allow_rename": 1,
"creation": "2013-01-30 12:49:46",
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"allow_copy": 1,
"allow_import": 1,
"allow_rename": 1,
"creation": "2013-01-30 12:49:46",
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "properties",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Account Details",
"oldfieldtype": "Section Break",
"fieldname": "properties",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Account Details",
"oldfieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"in_list_view": 0,
"permlevel": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"in_list_view": 0,
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "account_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Account Name",
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"fieldname": "account_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Account Name",
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"search_index": 1
},
},
{
"default": "Ledger",
"fieldname": "group_or_ledger",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Group or Ledger",
"oldfieldname": "group_or_ledger",
"oldfieldtype": "Select",
"options": "\nLedger\nGroup",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"default": "Ledger",
"fieldname": "group_or_ledger",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Group or Ledger",
"oldfieldname": "group_or_ledger",
"oldfieldtype": "Select",
"options": "\nLedger\nGroup",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "parent_account",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Parent Account",
"oldfieldname": "parent_account",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"fieldname": "parent_account",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Parent Account",
"oldfieldname": "parent_account",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "report_type",
"fieldtype": "Select",
"label": "Report Type",
"options": "\nBalance Sheet\nProfit and Loss",
"permlevel": 0
},
{
"description": "Setting Account Type helps in selecting this Account in transactions.",
"fieldname": "account_type",
"fieldtype": "Select",
"in_filter": 1,
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment",
"permlevel": 0,
"description": "Setting Account Type helps in selecting this Account in transactions.",
"fieldname": "account_type",
"fieldtype": "Select",
"in_filter": 1,
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock",
"permlevel": 0,
"search_index": 0
},
},
{
"description": "Rate at which this tax is applied",
"fieldname": "tax_rate",
"fieldtype": "Float",
"hidden": 0,
"label": "Rate",
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"description": "Rate at which this tax is applied",
"fieldname": "tax_rate",
"fieldtype": "Float",
"hidden": 0,
"label": "Rate",
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"reqd": 0
},
},
{
"description": "If the account is frozen, entries are allowed to restricted users.",
"fieldname": "freeze_account",
"fieldtype": "Select",
"label": "Frozen",
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
"options": "No\nYes",
"description": "If the account is frozen, entries are allowed to restricted users.",
"fieldname": "freeze_account",
"fieldtype": "Select",
"label": "Frozen",
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
"options": "No\nYes",
"permlevel": 0
},
},
{
"fieldname": "credit_days",
"fieldtype": "Int",
"hidden": 1,
"label": "Credit Days",
"oldfieldname": "credit_days",
"oldfieldtype": "Int",
"permlevel": 0,
"fieldname": "credit_days",
"fieldtype": "Int",
"hidden": 1,
"label": "Credit Days",
"oldfieldname": "credit_days",
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 1
},
},
{
"fieldname": "credit_limit",
"fieldtype": "Currency",
"hidden": 1,
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "credit_limit",
"fieldtype": "Currency",
"hidden": 1,
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1
},
},
{
"description": "If this Account represents a Customer, Supplier or Employee, set it here.",
"fieldname": "master_type",
"fieldtype": "Select",
"label": "Master Type",
"oldfieldname": "master_type",
"oldfieldtype": "Select",
"options": "\nSupplier\nCustomer\nEmployee",
"description": "If this Account represents a Customer, Supplier or Employee, set it here.",
"fieldname": "master_type",
"fieldtype": "Select",
"label": "Master Type",
"oldfieldname": "master_type",
"oldfieldtype": "Select",
"options": "\nSupplier\nCustomer\nEmployee",
"permlevel": 0
},
},
{
"fieldname": "master_name",
"fieldtype": "Link",
"label": "Master Name",
"oldfieldname": "master_name",
"oldfieldtype": "Link",
"options": "[Select]",
"fieldname": "master_name",
"fieldtype": "Link",
"label": "Master Name",
"oldfieldname": "master_name",
"oldfieldtype": "Link",
"options": "[Select]",
"permlevel": 0
},
},
{
"fieldname": "balance_must_be",
"fieldtype": "Select",
"label": "Balance must be",
"options": "\nDebit\nCredit",
"fieldname": "balance_must_be",
"fieldtype": "Select",
"label": "Balance must be",
"options": "\nDebit\nCredit",
"permlevel": 0
},
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Lft",
"permlevel": 0,
"print_hide": 1,
"fieldname": "root_type",
"fieldtype": "Select",
"label": "Root Type",
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Rgt",
"permlevel": 0,
"print_hide": 1,
"fieldname": "report_type",
"fieldtype": "Select",
"label": "Report Type",
"options": "\nBalance Sheet\nProfit and Loss",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "old_parent",
"fieldtype": "Data",
"hidden": 1,
"label": "Old Parent",
"permlevel": 0,
"print_hide": 1,
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Lft",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Rgt",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "old_parent",
"fieldtype": "Data",
"hidden": 1,
"label": "Old Parent",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
}
],
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-05-12 17:03:19.733139",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
"owner": "Administrator",
],
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-06-19 18:27:58.109303",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"restrict": 1,
"role": "Accounts Manager",
"submit": 0,
"amend": 0,
"apply_user_permissions": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 1,
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"write": 0
}
],
],
"search_fields": "group_or_ledger"
}
}

View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import flt, cstr, cint, getdate, add_days, formatdate
from frappe.utils import flt, cstr, cint, getdate
from frappe import msgprint, throw, _
from frappe.model.document import Document
@@ -11,11 +11,11 @@ class Account(Document):
nsm_parent_field = 'parent_account'
def onload(self):
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings", "frozen_accounts_modifier")
if frozen_accounts_modifier in frappe.user.get_roles():
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings",
"frozen_accounts_modifier")
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.user.get_roles():
self.get("__onload").can_freeze_account = True
def autoname(self):
self.name = self.account_name.strip() + ' - ' + \
frappe.db.get_value("Company", self.company, "abbr")
@@ -30,6 +30,7 @@ class Account(Document):
self.validate_mandatory()
self.validate_warehouse_account()
self.validate_frozen_accounts_modifier()
self.validate_balance_must_be_debit_or_credit()
def validate_master_name(self):
if self.master_type in ('Customer', 'Supplier') or self.account_type == "Warehouse":
@@ -39,19 +40,24 @@ class Account(Document):
throw(_("Invalid Master Name"))
def validate_parent(self):
"""Fetch Parent Details and validation for account not to be created under ledger"""
"""Fetch Parent Details and validate parent account"""
if self.parent_account:
par = frappe.db.get_value("Account", self.parent_account,
["name", "group_or_ledger", "report_type"], as_dict=1)
["name", "group_or_ledger", "report_type", "root_type", "company"], as_dict=1)
if not par:
throw(_("Parent account does not exist"))
elif par["name"] == self.name:
throw(_("You can not assign itself as parent account"))
elif par["group_or_ledger"] != 'Group':
throw(_("Parent account can not be a ledger"))
throw(_("Account {0}: Parent account {1} does not exist").format(self.name, self.parent_account))
elif par.name == self.name:
throw(_("Account {0}: You can not assign itself as parent account").format(self.name))
elif par.group_or_ledger != 'Group':
throw(_("Account {0}: Parent account {1} can not be a ledger").format(self.name, self.parent_account))
elif par.company != self.company:
throw(_("Account {0}: Parent account {1} does not belong to company: {2}")
.format(self.name, self.parent_account, self.company))
if par["report_type"]:
self.report_type = par["report_type"]
if par.report_type:
self.report_type = par.report_type
if par.root_type:
self.root_type = par.root_type
def validate_root_details(self):
#does not exists parent
@@ -67,6 +73,16 @@ class Account(Document):
frozen_accounts_modifier not in frappe.user.get_roles():
throw(_("You are not authorized to set Frozen value"))
def validate_balance_must_be_debit_or_credit(self):
from erpnext.accounts.utils import get_balance_on
if not self.get("__islocal") and self.balance_must_be:
account_balance = get_balance_on(self.name)
if account_balance > 0 and self.balance_must_be == "Credit":
frappe.throw(_("Account balance already in Debit, you are not allowed to set 'Balance Must Be' as 'Credit'"))
elif account_balance < 0 and self.balance_must_be == "Debit":
frappe.throw(_("Account balance already in Credit, you are not allowed to set 'Balance Must Be' as 'Debit'"))
def convert_group_to_ledger(self):
if self.check_if_child_exists():
throw(_("Account with child nodes cannot be converted to ledger"))
@@ -99,6 +115,9 @@ class Account(Document):
if not self.report_type:
throw(_("Report Type is mandatory"))
if not self.root_type:
throw(_("Root Type is mandatory"))
def validate_warehouse_account(self):
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
return
@@ -146,28 +165,18 @@ class Account(Document):
# If outstanding greater than credit limit and not authorized person raise exception
if credit_limit > 0 and flt(total_outstanding) > credit_limit \
and not self.get_authorized_user():
throw(_("{0} Credit limit {0} crossed").format(_(credit_limit_from), credit_limit))
throw(_("{0} Credit limit {1} crossed").format(_(credit_limit_from), credit_limit))
def validate_due_date(self, posting_date, due_date):
credit_days = (self.credit_days or frappe.db.get_value("Company", self.company, "credit_days"))
if credit_days is None:
return
posting_date, due_date = getdate(posting_date), getdate(due_date)
diff = (due_date - posting_date).days
if diff < 0:
frappe.throw(_("Due Date cannot be before Posting Date"))
elif diff > credit_days:
is_credit_controller = frappe.db.get_value("Accounts Settings", None,
"credit_controller") in frappe.user.get_roles()
if is_credit_controller:
msgprint(_("Note: Due Date exceeds the allowed credit days by {0} day(s)").format(
diff - credit_days))
else:
max_due_date = formatdate(add_days(posting_date, credit_days))
frappe.throw(_("Due Date cannot be after {0}").format(max_due_date))
elif credit_days is not None and diff > credit_days:
msgprint(_("Note: Due Date exceeds the allowed credit days by {0} day(s)").format(diff - credit_days))
def validate_trash(self):
"""checks gl entries and if child exists"""
@@ -194,10 +203,10 @@ class Account(Document):
throw(_("Account {0} does not exist").format(new))
val = list(frappe.db.get_value("Account", new_account,
["group_or_ledger", "report_type", "company"]))
["group_or_ledger", "root_type", "company"]))
if val != [self.group_or_ledger, self.report_type, self.company]:
throw(_("""Merging is only possible if following properties are same in both records. Group or Ledger, Report Type, Company"""))
if val != [self.group_or_ledger, self.root_type, self.company]:
throw(_("""Merging is only possible if following properties are same in both records. Group or Ledger, Root Type, Company"""))
return new_account

View File

@@ -14,6 +14,7 @@ def _make_test_records(verbose):
["_Test Account Stock Expenses", "Direct Expenses", "Group", None],
["_Test Account Shipping Charges", "_Test Account Stock Expenses", "Ledger", "Chargeable"],
["_Test Account Customs Duty", "_Test Account Stock Expenses", "Ledger", "Tax"],
["_Test Account Insurance Charges", "_Test Account Stock Expenses", "Ledger", "Chargeable"],
["_Test Account Tax Assets", "Current Assets", "Group", None],

View File

@@ -85,7 +85,7 @@
"icon": "icon-check",
"idx": 1,
"issingle": 1,
"modified": "2014-05-06 16:26:08.984595",
"modified": "2014-05-27 03:37:21.783216",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation",
@@ -93,6 +93,7 @@
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"permlevel": 0,

View File

@@ -24,7 +24,8 @@ class BankReconciliation(Document):
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t2.parent = t1.name and t2.account = %s
and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1 %s""" %
and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1
and ifnull(t1.is_opening, 'No') = 'No' %s""" %
('%s', '%s', '%s', condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
self.set('entries', [])

View File

@@ -1,5 +1,5 @@
{
"allow_attach": 1,
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-03-07 11:55:06",
"docstatus": 0,
@@ -126,7 +126,7 @@
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"options": "C-Form",
@@ -139,13 +139,14 @@
"idx": 1,
"is_submittable": 1,
"max_attachments": 3,
"modified": "2014-05-09 02:18:00.162685",
"modified": "2014-09-05 12:58:43.333698",
"modified_by": "Administrator",
"module": "Accounts",
"name": "C-Form",
"owner": "Administrator",
"permissions": [
{
"apply_user_permissions": 1,
"create": 1,
"email": 1,
"permlevel": 0,

View File

@@ -17,15 +17,19 @@ class CForm(Document):
inv = frappe.db.sql("""select c_form_applicable, c_form_no from
`tabSales Invoice` where name = %s and docstatus = 1""", d.invoice_no)
if inv[0][0] != 'Yes':
if inv and inv[0][0] != 'Yes':
frappe.throw("C-form is not applicable for Invoice: %s" % d.invoice_no)
elif inv[0][1] and inv[0][1] != self.name:
elif inv and inv[0][1] and inv[0][1] != self.name:
frappe.throw("""Invoice %s is tagged in another C-form: %s.
If you want to change C-form no for this invoice,
please remove invoice no from the previous c-form and then try again""" %
(d.invoice_no, inv[0][1]))
elif not inv:
frappe.throw("Row %s: Invoice %s is invalid, it might be cancelled / does not exist. \
Please enter a valid Invoice" % d.idx, d.invoice_no)
def on_update(self):
""" Update C-Form No on invoices"""
self.set_total_invoiced_amount()
@@ -55,22 +59,12 @@ class CForm(Document):
def get_invoice_details(self, invoice_no):
""" Pull details from invoices for referrence """
inv = frappe.db.get_value("Sales Invoice", invoice_no,
["posting_date", "territory", "net_total", "grand_total"], as_dict=True)
return {
'invoice_date' : inv.posting_date,
'territory' : inv.territory,
'net_total' : inv.net_total,
'grand_total' : inv.grand_total
}
def get_invoice_nos(doctype, txt, searchfield, start, page_len, filters):
from erpnext.utilities import build_filter_conditions
conditions, filter_values = build_filter_conditions(filters)
return frappe.db.sql("""select name from `tabSales Invoice` where docstatus = 1
and c_form_applicable = 'Yes' and ifnull(c_form_no, '') = '' %s
and %s like %s order by name limit %s, %s""" %
(conditions, searchfield, "%s", "%s", "%s"),
tuple(filter_values + ["%%%s%%" % txt, start, page_len]))
if invoice_no:
inv = frappe.db.get_value("Sales Invoice", invoice_no,
["posting_date", "territory", "net_total", "grand_total"], as_dict=True)
return {
'invoice_date' : inv.posting_date,
'territory' : inv.territory,
'net_total' : inv.net_total,
'grand_total' : inv.grand_total
}

View File

@@ -9,7 +9,7 @@ from __future__ import unicode_literals
import os, json
import ast
from xml.etree import ElementTree as ET
from frappe.utils.datautils import read_csv_content
from frappe.utils.csvutils import read_csv_content
from frappe.utils import cstr
import frappe

View File

@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe, os, json
def import_charts():
print "Importing Chart of Accounts"
frappe.db.sql("""delete from `tabChart of Accounts`""")
charts_dir = os.path.join(os.path.dirname(__file__), "charts")
for fname in os.listdir(charts_dir):
@@ -19,8 +20,8 @@ def import_charts():
"source_file": fname,
"country": country
}).insert()
print doc.name.encode("utf-8")
else:
print "No chart for: " + chart.get("name").encode("utf-8")
frappe.db.commit()
#print doc.name.encode("utf-8")
#else:
#print "No chart for: " + chart.get("name").encode("utf-8")
frappe.db.commit()

View File

@@ -64,10 +64,12 @@ cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet',
"btn-default")
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet',
"btn-default")
}
}

View File

@@ -31,7 +31,7 @@
{
"fieldname": "parent_cost_center",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Parent Cost Center",
"oldfieldname": "parent_cost_center",
@@ -131,7 +131,7 @@
"fieldname": "old_parent",
"fieldtype": "Link",
"hidden": 1,
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "old_parent",
"no_copy": 1,
"oldfieldname": "old_parent",
@@ -144,8 +144,8 @@
],
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-05-07 06:37:48.038993",
"in_create": 0,
"modified": "2014-08-26 12:16:11.163750",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -153,7 +153,6 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -167,7 +166,7 @@
},
{
"amend": 0,
"cancel": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
@@ -180,16 +179,19 @@
"write": 0
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "Sales User"
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "Purchase User"
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "Material User"

View File

@@ -15,5 +15,12 @@
"doctype": "Cost Center",
"group_or_ledger": "Ledger",
"parent_cost_center": "_Test Company - _TC"
},
{
"company": "_Test Company",
"cost_center_name": "_Test Cost Center 2",
"doctype": "Cost Center",
"group_or_ledger": "Ledger",
"parent_cost_center": "_Test Company - _TC"
}
]

View File

@@ -14,7 +14,8 @@ $.extend(cur_frm.cscript, {
this.frm.toggle_enable('year_end_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
this.frm.add_custom_button(__("Set as Default"), this.frm.cscript.set_as_default);
this.frm.add_custom_button(__("Set as Default"),
this.frm.cscript.set_as_default, "icon-star");
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
} else {
this.frm.set_intro("");

View File

@@ -1,7 +1,7 @@
{
"allow_import": 1,
"autoname": "field:year",
"creation": "2013-01-22 16:50:25.000000",
"creation": "2013-01-22 16:50:25",
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"docstatus": 0,
"doctype": "DocType",
@@ -11,6 +11,7 @@
"description": "For e.g. 2012, 2012-13",
"fieldname": "year",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Year Name",
"oldfieldname": "year",
"oldfieldtype": "Data",
@@ -20,6 +21,7 @@
{
"fieldname": "year_start_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Year Start Date",
"no_copy": 1,
"oldfieldname": "year_start_date",
@@ -30,6 +32,7 @@
{
"fieldname": "year_end_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Year End Date",
"no_copy": 1,
"permlevel": 0,
@@ -40,6 +43,7 @@
"description": "Entries are not allowed against this Fiscal Year if the year is closed.",
"fieldname": "is_fiscal_year_closed",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Year Closed",
"no_copy": 1,
"oldfieldname": "is_fiscal_year_closed",
@@ -51,14 +55,13 @@
],
"icon": "icon-calendar",
"idx": 1,
"modified": "2014-01-20 17:48:46.000000",
"modified": "2014-07-14 05:30:56.843180",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -71,6 +74,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -78,5 +82,7 @@
"read": 1,
"role": "All"
}
]
],
"sort_field": "name",
"sort_order": "DESC"
}

View File

@@ -25,15 +25,15 @@ class FiscalYear(Document):
if year_start_end_dates:
if getdate(self.year_start_date) != year_start_end_dates[0][0] or getdate(self.year_end_date) != year_start_end_dates[0][1]:
frappe.throw(_("Cannot change Year Start Date and Year End Date once the Fiscal Year is saved."))
frappe.throw(_("Cannot change Fiscal Year Start Date and Fiscal Year End Date once the Fiscal Year is saved."))
def on_update(self):
# validate year start date and year end date
if getdate(self.year_start_date) > getdate(self.year_end_date):
frappe.throw(_("Year Start Date should not be greater than Year End Date"))
frappe.throw(_("Fiscal Year Start Date should not be greater than Fiscal Year End Date"))
if (getdate(self.year_end_date) - getdate(self.year_start_date)).days > 366:
frappe.throw(_("Year Start Date and Year End Date are not within Fiscal Year."))
frappe.throw(_("Fiscal Year Start Date and Fiscal Year End Date cannot be more than a year apart."))
year_start_end_dates = frappe.db.sql("""select name, year_start_date, year_end_date
from `tabFiscal Year` where name!=%s""", (self.name))
@@ -41,4 +41,4 @@ class FiscalYear(Document):
for fiscal_year, ysd, yed in year_start_end_dates:
if (getdate(self.year_start_date) == ysd and getdate(self.year_end_date) == yed) \
and (not frappe.flags.in_test):
frappe.throw(_("Year Start Date and Year End Date are already set in Fiscal Year {0}").format(fiscal_year))
frappe.throw(_("Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0}").format(fiscal_year))

View File

@@ -86,44 +86,47 @@
"oldfieldtype": "Text",
"permlevel": 0
},
{
"fieldname": "against_voucher",
"fieldtype": "Data",
"in_filter": 1,
"label": "Against Voucher",
"oldfieldname": "against_voucher",
"oldfieldtype": "Data",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "against_voucher_type",
"fieldtype": "Data",
"fieldtype": "Link",
"in_filter": 0,
"label": "Against Voucher Type",
"oldfieldname": "against_voucher_type",
"oldfieldtype": "Data",
"options": "DocType",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "against_voucher",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"label": "Against Voucher",
"oldfieldname": "against_voucher",
"oldfieldtype": "Data",
"options": "against_voucher_type",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "voucher_type",
"fieldtype": "Select",
"fieldtype": "Link",
"in_filter": 1,
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "Journal Voucher\nSales Invoice\nPurchase Invoice",
"options": "DocType",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "voucher_no",
"fieldtype": "Data",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"label": "Voucher No",
"oldfieldname": "voucher_no",
"oldfieldtype": "Data",
"options": "voucher_type",
"permlevel": 0,
"search_index": 1
},
@@ -186,7 +189,7 @@
"icon": "icon-list",
"idx": 1,
"in_create": 1,
"modified": "2014-05-09 02:16:29.981405",
"modified": "2014-06-23 08:07:30.678730",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",
@@ -194,9 +197,10 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"apply_user_permissions": 1,
"create": 0,
"email": 1,
"export": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -207,9 +211,9 @@
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"email": 1,
"export": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -217,17 +221,6 @@
"role": "Accounts Manager",
"submit": 0,
"write": 0
},
{
"create": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"submit": 0,
"write": 0
}
],
"search_fields": "voucher_no,account,posting_date,against_voucher",

View File

@@ -25,7 +25,8 @@ class GLEntry(Document):
validate_balance_type(self.account, adv_adj)
# Update outstanding amt on against voucher
if self.against_voucher and update_outstanding == 'Yes':
if self.against_voucher_type in ['Journal Voucher', 'Sales Invoice', 'Purchase Invoice'] \
and self.against_voucher and update_outstanding == 'Yes':
update_outstanding_amt(self.account, self.against_voucher_type,
self.against_voucher)
@@ -123,6 +124,10 @@ def update_outstanding_amt(account, against_voucher_type, against_voucher, on_ca
from `tabGL Entry` where voucher_type = 'Journal Voucher' and voucher_no = %s
and account = %s and ifnull(against_voucher, '') = ''""",
(against_voucher, account))[0][0])
if not against_voucher_amount:
frappe.throw(_("Against Journal Voucher {0} is already adjusted against some other voucher")
.format(against_voucher))
bal = against_voucher_amount + bal
if against_voucher_amount < 0:
bal = -bal

View File

@@ -7,6 +7,11 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
onload: function() {
this.load_defaults();
this.setup_queries();
this.setup_balance_formatter();
},
onload_post_render: function() {
cur_frm.get_field("entries").grid.set_multiple_add("account");
},
load_defaults: function() {
@@ -62,6 +67,18 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
});
},
setup_balance_formatter: function() {
var df = frappe.meta.get_docfield("Journal Voucher Detail", "balance", this.frm.doc.name);
df.formatter = function(value, df, options, doc) {
var currency = frappe.meta.get_field_currency(df, doc);
var dr_or_cr = value ? ('<label>' + (value > 0.0 ? __("Dr") : __("Cr")) + '</label>') : "";
return "<div style='text-align: right'>"
+ ((value==null || value==="") ? "" : format_currency(Math.abs(value), currency))
+ " " + dr_or_cr
+ "</div>";
}
},
against_voucher: function(doc, cdt, cdn) {
var d = frappe.get_doc(cdt, cdn);
if (d.against_voucher && !flt(d.debit)) {
@@ -104,7 +121,6 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
}
});
}
});
cur_frm.script_manager.make(erpnext.accounts.JournalVoucher);
@@ -197,10 +213,11 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
return;
var update_jv_details = function(doc, r) {
$.each(r.message, function(i, d) {
var jvdetail = frappe.model.add_child(doc, "Journal Voucher Detail", "entries");
jvdetail.account = d.account;
jvdetail.balance = d.balance;
var jvdetail = frappe.model.add_child(doc, "Journal Voucher Detail", "entries");
$.each(r, function(i, d) {
var row = frappe.model.add_child(doc, "Journal Voucher Detail", "entries");
row.account = d.account;
row.balance = d.balance;
});
refresh_field("entries");
}
@@ -215,7 +232,7 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
},
callback: function(r) {
if(r.message) {
update_jv_details(doc, r);
update_jv_details(doc, [r.message]);
}
}
})
@@ -229,7 +246,7 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
callback: function(r) {
frappe.model.clear_table(doc, "entries");
if(r.message) {
update_jv_details(doc, r);
update_jv_details(doc, r.message);
}
cur_frm.set_value("is_opening", "Yes")
}

View File

@@ -123,12 +123,6 @@
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "column_break99",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "difference",
"fieldtype": "Currency",
@@ -150,10 +144,8 @@
"read_only": 0
},
{
"fieldname": "reference",
"fieldtype": "Section Break",
"label": "Reference",
"options": "icon-pushpin",
"fieldname": "column_break99",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
@@ -181,6 +173,31 @@
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "user_remark",
"fieldtype": "Small Text",
"in_filter": 1,
"label": "User Remark",
"no_copy": 1,
"oldfieldname": "user_remark",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "view_details",
"fieldtype": "Fold",
"label": "View Details",
"permlevel": 0
},
{
"fieldname": "reference",
"fieldtype": "Section Break",
"label": "Reference",
"options": "icon-pushpin",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "clearance_date",
"fieldtype": "Date",
@@ -194,23 +211,6 @@
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break98",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "user_remark",
"fieldtype": "Small Text",
"in_filter": 1,
"label": "User Remark",
"no_copy": 1,
"oldfieldname": "user_remark",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 0
},
{
"description": "User Remark will be added to Auto Remark",
"fieldname": "remark",
@@ -224,6 +224,12 @@
"read_only": 1,
"reqd": 0
},
{
"fieldname": "column_break98",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "bill_no",
"fieldtype": "Data",
@@ -333,6 +339,7 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
@@ -426,7 +433,7 @@
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
@@ -440,7 +447,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:16:47.686703",
"modified": "2014-09-09 05:35:31.217863",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Voucher",
@@ -448,6 +455,7 @@
"permissions": [
{
"amend": 1,
"apply_user_permissions": 1,
"cancel": 1,
"create": 1,
"delete": 1,
@@ -476,6 +484,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,

View File

@@ -4,8 +4,8 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr, flt, fmt_money, formatdate, getdate
from frappe import msgprint, _
from frappe.utils import cstr, flt, fmt_money, formatdate, getdate
from frappe import msgprint, _, scrub
from erpnext.setup.utils import get_company_currency
from erpnext.controllers.accounts_controller import AccountsController
@@ -13,10 +13,6 @@ from erpnext.controllers.accounts_controller import AccountsController
class JournalVoucher(AccountsController):
def __init__(self, arg1, arg2=None):
super(JournalVoucher, self).__init__(arg1, arg2)
self.master_type = {}
self.credit_days_for = {}
self.credit_days_global = -1
self.is_approving_authority = -1
def validate(self):
if not self.is_opening:
@@ -35,18 +31,35 @@ class JournalVoucher(AccountsController):
self.create_remarks()
self.set_aging_date()
self.set_print_format_fields()
self.validate_against_sales_order()
self.validate_against_purchase_order()
def on_submit(self):
if self.voucher_type in ['Bank Voucher', 'Contra Voucher', 'Journal Entry']:
self.check_credit_days()
self.check_reference_date()
self.make_gl_entries()
self.check_credit_limit()
self.update_advance_paid()
def update_advance_paid(self):
advance_paid = frappe._dict()
for d in self.get("entries"):
if d.is_advance:
if d.against_sales_order:
advance_paid.setdefault("Sales Order", []).append(d.against_sales_order)
elif d.against_purchase_order:
advance_paid.setdefault("Purchase Order", []).append(d.against_purchase_order)
for voucher_type, order_list in advance_paid.items():
for voucher_no in list(set(order_list)):
frappe.get_doc(voucher_type, voucher_no).set_total_advance_paid()
def on_cancel(self):
from erpnext.accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doctype, self.name, "against_jv")
self.make_gl_entries(1)
self.update_advance_paid()
def validate_cheque_info(self):
if self.voucher_type in ['Bank Voucher']:
@@ -59,25 +72,36 @@ class JournalVoucher(AccountsController):
def validate_entries_for_advance(self):
for d in self.get('entries'):
if not d.is_advance and not d.against_voucher and \
not d.against_invoice and not d.against_jv:
if not (d.against_voucher and d.against_invoice and d.against_jv):
master_type = frappe.db.get_value("Account", d.account, "master_type")
if (master_type == 'Customer' and flt(d.credit) > 0) or \
(master_type == 'Supplier' and flt(d.debit) > 0):
msgprint(_("Please check 'Is Advance' against Account {0} if this is an advance entry.").format(d.account))
if not d.is_advance:
msgprint(_("Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.").format(d.idx, d.account))
elif (d.against_sales_order or d.against_purchase_order) and d.is_advance != "Yes":
frappe.throw(_("Row {0}: Payment against Sales/Purchase Order should always be marked as advance").format(d.idx))
def validate_against_jv(self):
for d in self.get('entries'):
if d.against_jv:
account_root_type = frappe.db.get_value("Account", d.account, "root_type")
if account_root_type == "Asset" and flt(d.debit) > 0:
frappe.throw(_("For {0}, only credit entries can be linked against another debit entry")
.format(d.account))
elif account_root_type == "Liability" and flt(d.credit) > 0:
frappe.throw(_("For {0}, only debit entries can be linked against another credit entry")
.format(d.account))
if d.against_jv == self.name:
frappe.throw(_("You can not enter current voucher in 'Against Journal Voucher' column"))
against_entries = frappe.db.sql("""select * from `tabJournal Voucher Detail`
where account = %s and docstatus = 1 and parent = %s
and ifnull(against_jv, '') = ''""", (d.account, d.against_jv), as_dict=True)
and ifnull(against_jv, '') = '' and ifnull(against_invoice, '') = ''
and ifnull(against_voucher, '') = ''""", (d.account, d.against_jv), as_dict=True)
if not against_entries:
frappe.throw(_("Journal Voucher {0} does not have account {1} or already matched")
frappe.throw(_("Journal Voucher {0} does not have account {1} or already matched against other voucher")
.format(d.against_jv, d.account))
else:
dr_or_cr = "debit" if d.credit > 0 else "credit"
@@ -90,24 +114,89 @@ class JournalVoucher(AccountsController):
.format(d.against_jv, dr_or_cr))
def validate_against_sales_invoice(self):
for d in self.get("entries"):
if d.against_invoice:
if d.debit > 0:
frappe.throw(_("Row {0}: Debit entry can not be linked with a Sales Invoice")
.format(d.idx))
if frappe.db.get_value("Sales Invoice", d.against_invoice, "debit_to") != d.account:
frappe.throw(_("Row {0}: Account does not match with \
Sales Invoice Debit To account").format(d.idx, d.account))
payment_against_voucher = self.validate_account_in_against_voucher("against_invoice", "Sales Invoice")
self.validate_against_invoice_fields("Sales Invoice", payment_against_voucher)
def validate_against_purchase_invoice(self):
payment_against_voucher = self.validate_account_in_against_voucher("against_voucher", "Purchase Invoice")
self.validate_against_invoice_fields("Purchase Invoice", payment_against_voucher)
def validate_against_sales_order(self):
payment_against_voucher = self.validate_account_in_against_voucher("against_sales_order", "Sales Order")
self.validate_against_order_fields("Sales Order", payment_against_voucher)
def validate_against_purchase_order(self):
payment_against_voucher = self.validate_account_in_against_voucher("against_purchase_order", "Purchase Order")
self.validate_against_order_fields("Purchase Order", payment_against_voucher)
def validate_account_in_against_voucher(self, against_field, doctype):
payment_against_voucher = frappe._dict()
field_dict = {'Sales Invoice': "Debit To",
'Purchase Invoice': "Credit To",
'Sales Order': "Customer",
'Purchase Order': "Supplier"
}
for d in self.get("entries"):
if d.against_voucher:
if flt(d.credit) > 0:
frappe.throw(_("Row {0}: Credit entry can not be linked with a Purchase Invoice")
.format(d.idx))
if frappe.db.get_value("Purchase Invoice", d.against_voucher, "credit_to") != d.account:
frappe.throw(_("Row {0}: Account does not match with \
Purchase Invoice Credit To account").format(d.idx, d.account))
if d.get(against_field):
dr_or_cr = "credit" if against_field in ["against_invoice", "against_sales_order"] \
else "debit"
if against_field in ["against_invoice", "against_sales_order"] \
and flt(d.debit) > 0:
frappe.throw(_("Row {0}: Debit entry can not be linked with a {1}").format(d.idx, doctype))
if against_field in ["against_voucher", "against_purchase_order"] \
and flt(d.credit) > 0:
frappe.throw(_("Row {0}: Credit entry can not be linked with a {1}").format(d.idx, doctype))
voucher_account = frappe.db.get_value(doctype, d.get(against_field), \
scrub(field_dict.get(doctype)))
account_master_name = frappe.db.get_value("Account", d.account, "master_name")
if against_field in ["against_invoice", "against_voucher"] \
and voucher_account != d.account:
frappe.throw(_("Row {0}: Account {1} does not match with {2} {3} account") \
.format(d.idx, d.account, doctype, field_dict.get(doctype)))
if against_field in ["against_sales_order", "against_purchase_order"]:
if voucher_account != account_master_name:
frappe.throw(_("Row {0}: Account {1} does not match with {2} {3} Name") \
.format(d.idx, d.account, doctype, field_dict.get(doctype)))
elif d.is_advance == "Yes":
payment_against_voucher.setdefault(d.get(against_field), []).append(flt(d.get(dr_or_cr)))
return payment_against_voucher
def validate_against_invoice_fields(self, doctype, payment_against_voucher):
for voucher_no, payment_list in payment_against_voucher.items():
voucher_properties = frappe.db.get_value(doctype, voucher_no,
["docstatus", "outstanding_amount"])
if voucher_properties[0] != 1:
frappe.throw(_("{0} {1} is not submitted").format(doctype, voucher_no))
if flt(voucher_properties[1]) < flt(sum(payment_list)):
frappe.throw(_("Payment against {0} {1} cannot be greater \
than Outstanding Amount {2}").format(doctype, voucher_no, voucher_properties[1]))
def validate_against_order_fields(self, doctype, payment_against_voucher):
for voucher_no, payment_list in payment_against_voucher.items():
voucher_properties = frappe.db.get_value(doctype, voucher_no,
["docstatus", "per_billed", "status", "advance_paid", "grand_total"])
if voucher_properties[0] != 1:
frappe.throw(_("{0} {1} is not submitted").format(doctype, voucher_no))
if flt(voucher_properties[1]) >= 100:
frappe.throw(_("{0} {1} is fully billed").format(doctype, voucher_no))
if cstr(voucher_properties[2]) == "Stopped":
frappe.throw(_("{0} {1} is stopped").format(doctype, voucher_no))
if flt(voucher_properties[4]) < flt(voucher_properties[3]) + flt(sum(payment_list)):
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
than Grand Total {2}").format(doctype, voucher_no, voucher_properties[3]))
def set_against_account(self):
accounts_debited, accounts_credited = [], []
@@ -142,12 +231,18 @@ class JournalVoucher(AccountsController):
if self.cheque_date:
r.append(_('Reference #{0} dated {1}').format(self.cheque_no, formatdate(self.cheque_date)))
else:
msgprint(_("Please enter Reference date"), raise_exception=1)
msgprint(_("Please enter Reference date"), raise_exception=frappe.MandatoryError)
for d in self.get('entries'):
if d.against_invoice and d.credit:
currency = frappe.db.get_value("Sales Invoice", d.against_invoice, "currency")
r.append(_("{0} {1} against Invoice {1}").format(currency, fmt_money(flt(d.credit)), d.against_invoice))
r.append(_("{0} against Sales Invoice {1}").format(fmt_money(flt(d.credit), currency = currency), \
d.against_invoice))
if d.against_sales_order and d.credit:
currency = frappe.db.get_value("Sales Order", d.against_sales_order, "currency")
r.append(_("{0} against Sales Order {1}").format(fmt_money(flt(d.credit), currency = currency), \
d.against_sales_order))
if d.against_voucher and d.debit:
bill_no = frappe.db.sql("""select bill_no, bill_date, currency
@@ -158,13 +253,17 @@ class JournalVoucher(AccountsController):
fmt_money(flt(d.debit)), bill_no[0][0],
bill_no[0][1] and formatdate(bill_no[0][1].strftime('%Y-%m-%d'))))
if d.against_purchase_order and d.debit:
currency = frappe.db.get_value("Purchase Order", d.against_purchase_order, "currency")
r.append(_("{0} against Purchase Order {1}").format(fmt_money(flt(d.credit), currency = currency), \
d.against_purchase_order))
if self.user_remark:
r.append(_("Note: {0}").format(self.user_remark))
if r:
self.remark = ("\n").join(r)
else:
frappe.msgprint(_("User Remarks is mandatory"), raise_exception=1)
self.remark = ("\n").join(r) #User Remarks is not mandatory
def set_aging_date(self):
if self.is_opening != 'Yes':
@@ -186,66 +285,38 @@ class JournalVoucher(AccountsController):
def set_print_format_fields(self):
for d in self.get('entries'):
account_type, master_type = frappe.db.get_value("Account", d.account,
["account_type", "master_type"])
acc = frappe.db.get_value("Account", d.account, ["account_type", "master_type"], as_dict=1)
if master_type in ['Supplier', 'Customer']:
if not acc: continue
if acc.master_type in ['Supplier', 'Customer']:
if not self.pay_to_recd_from:
self.pay_to_recd_from = frappe.db.get_value(master_type,
' - '.join(d.account.split(' - ')[:-1]),
master_type == 'Customer' and 'customer_name' or 'supplier_name')
self.pay_to_recd_from = frappe.db.get_value(acc.master_type, ' - '.join(d.account.split(' - ')[:-1]),
acc.master_type == 'Customer' and 'customer_name' or 'supplier_name')
if self.voucher_type in ["Credit Note", "Debit Note"]:
self.set_total_amount(d.debit or d.credit)
if account_type in ['Bank', 'Cash']:
company_currency = get_company_currency(self.company)
amt = flt(d.debit) and d.debit or d.credit
self.total_amount = company_currency + ' ' + cstr(amt)
from frappe.utils import money_in_words
self.total_amount_in_words = money_in_words(amt, company_currency)
if acc.account_type in ['Bank', 'Cash']:
self.set_total_amount(d.debit or d.credit)
def check_credit_days(self):
date_diff = 0
def set_total_amount(self, amt):
company_currency = get_company_currency(self.company)
self.total_amount = fmt_money(amt, currency=company_currency)
from frappe.utils import money_in_words
self.total_amount_in_words = money_in_words(amt, company_currency)
def check_reference_date(self):
if self.cheque_date:
date_diff = (getdate(self.cheque_date)-getdate(self.posting_date)).days
for d in self.get("entries"):
due_date = None
if d.against_invoice and flt(d.credit) > 0:
due_date = frappe.db.get_value("Sales Invoice", d.against_invoice, "due_date")
elif d.against_voucher and flt(d.debit) > 0:
due_date = frappe.db.get_value("Purchase Invoice", d.against_voucher, "due_date")
if date_diff <= 0: return
# Get List of Customer Account
acc_list = filter(lambda d: frappe.db.get_value("Account", d.account,
"master_type")=='Customer', self.get('entries'))
for d in acc_list:
credit_days = self.get_credit_days_for(d.account)
# Check credit days
if credit_days > 0 and not self.get_authorized_user() and cint(date_diff) > credit_days:
msgprint(_("Maximum allowed credit is {0} days after posting date").format(credit_days),
raise_exception=1)
def get_credit_days_for(self, ac):
if not self.credit_days_for.has_key(ac):
self.credit_days_for[ac] = cint(frappe.db.get_value("Account", ac, "credit_days"))
if not self.credit_days_for[ac]:
if self.credit_days_global==-1:
self.credit_days_global = cint(frappe.db.get_value("Company",
self.company, "credit_days"))
return self.credit_days_global
else:
return self.credit_days_for[ac]
def get_authorized_user(self):
if self.is_approving_authority==-1:
self.is_approving_authority = 0
# Fetch credit controller role
approving_authority = frappe.db.get_value("Accounts Settings", None,
"credit_controller")
# Check logged-in user is authorized
if approving_authority in frappe.user.get_roles():
self.is_approving_authority = 1
return self.is_approving_authority
if due_date and getdate(self.cheque_date) > getdate(due_date):
msgprint(_("Note: Reference Date {0} is after invoice due date {1}")
.format(formatdate(self.cheque_date), formatdate(due_date)))
def make_gl_entries(self, cancel=0, adv_adj=0):
from erpnext.accounts.general_ledger import make_gl_entries
@@ -259,14 +330,18 @@ class JournalVoucher(AccountsController):
"against": d.against_account,
"debit": flt(d.debit, self.precision("debit", "entries")),
"credit": flt(d.credit, self.precision("credit", "entries")),
"against_voucher_type": ((d.against_voucher and "Purchase Invoice")
or (d.against_invoice and "Sales Invoice")
or (d.against_jv and "Journal Voucher")),
"against_voucher": d.against_voucher or d.against_invoice or d.against_jv,
"against_voucher_type": (("Purchase Invoice" if d.against_voucher else None)
or ("Sales Invoice" if d.against_invoice else None)
or ("Journal Voucher" if d.against_jv else None)
or ("Sales Order" if d.against_sales_order else None)
or ("Purchase Order" if d.against_purchase_order else None)),
"against_voucher": d.against_voucher or d.against_invoice or d.against_jv
or d.against_sales_order or d.against_purchase_order,
"remarks": self.remark,
"cost_center": d.cost_center
})
)
if gl_map:
make_gl_entries(gl_map, cancel=cancel, adv_adj=adv_adj)
@@ -274,7 +349,7 @@ class JournalVoucher(AccountsController):
for d in self.get("entries"):
master_type, master_name = frappe.db.get_value("Account", d.account,
["master_type", "master_name"])
if master_type == "Customer" and master_name:
if master_type == "Customer" and master_name and flt(d.debit) > 0:
super(JournalVoucher, self).check_credit_limit(d.account)
def get_balance(self):
@@ -410,7 +485,7 @@ def get_opening_accounts(company):
"""get all balance sheet accounts for opening entry"""
from erpnext.accounts.utils import get_balance_on
accounts = frappe.db.sql_list("""select name from tabAccount
where group_or_ledger='Ledger' and report_type='Profit and Loss' and company=%s""", company)
where group_or_ledger='Ledger' and report_type='Balance Sheet' and company=%s""", company)
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
@@ -429,9 +504,10 @@ def get_against_sales_invoice(doctype, txt, searchfield, start, page_len, filter
(filters["account"], "%%%s%%" % txt, start, page_len))
def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
from `tabJournal Voucher` jv, `tabJournal Voucher Detail` jv_detail
where jv_detail.parent = jv.name and jv_detail.account = %s and jv.docstatus = 1
return frappe.db.sql("""select distinct jv.name, jv.posting_date, jv.user_remark
from `tabJournal Voucher` jv, `tabJournal Voucher Detail` jvd
where jvd.parent = jv.name and jvd.account = %s and jv.docstatus = 1
and (ifnull(jvd.against_invoice, '') = '' and ifnull(jvd.against_voucher, '') = '' and ifnull(jvd.against_jv, '') = '' )
and jv.%s like %s order by jv.name desc limit %s, %s""" %
("%s", searchfield, "%s", "%s", "%s"),
(filters["account"], "%%%s%%" % txt, start, page_len))

View File

@@ -0,0 +1,20 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-10">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span class="text-muted" style="margin-right: 8px;">
{%= doc.get_formatted("posting_date") %}</span>
<span class="label label-info filterable"
data-filter="voucher_type,=,{%= doc.voucher_type %}">
{%= doc.voucher_type %}
</span>
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-2 text-right">
{%= doc.get_formatted("total_debit") %}
</div>
</div>

View File

@@ -0,0 +1,3 @@
frappe.listview_settings['Journal Voucher'] = {
add_fields: ["voucher_type", "posting_date", "total_debit", "company"]
};

View File

@@ -1,41 +1,88 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
import unittest, frappe
from frappe.utils import flt
class TestJournalVoucher(unittest.TestCase):
def test_journal_voucher_with_against_jv(self):
self.clear_account_balance()
jv_invoice = frappe.copy_doc(test_records[2])
jv_invoice.insert()
jv_invoice.submit()
base_jv = frappe.copy_doc(test_records[0])
self.jv_against_voucher_testcase(base_jv, jv_invoice)
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where account = %s and docstatus = 1 and parent = %s""",
("_Test Customer - _TC", jv_invoice.name)))
def test_jv_against_sales_order(self):
from erpnext.selling.doctype.sales_order.test_sales_order \
import test_records as so_test_records
sales_order = frappe.copy_doc(so_test_records[0])
base_jv = frappe.copy_doc(test_records[0])
self.jv_against_voucher_testcase(base_jv, sales_order)
def test_jv_against_purchase_order(self):
from erpnext.buying.doctype.purchase_order.test_purchase_order \
import test_records as po_test_records
purchase_order = frappe.copy_doc(po_test_records[0])
base_jv = frappe.copy_doc(test_records[1])
self.jv_against_voucher_testcase(base_jv, purchase_order)
def jv_against_voucher_testcase(self, base_jv, test_voucher):
dr_or_cr = "credit" if test_voucher.doctype in ["Sales Order", "Journal Voucher"] else "debit"
field_dict = {'Journal Voucher': "against_jv",
'Sales Order': "against_sales_order",
'Purchase Order': "against_purchase_order"
}
self.clear_account_balance()
test_voucher.insert()
test_voucher.submit()
if test_voucher.doctype == "Journal Voucher":
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where account = %s and docstatus = 1 and parent = %s""",
("_Test Customer - _TC", test_voucher.name)))
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", jv_invoice.name))
where %s=%s""" % (field_dict.get(test_voucher.doctype), '%s'), (test_voucher.name)))
jv_payment = frappe.copy_doc(test_records[0])
jv_payment.get("entries")[0].against_jv = jv_invoice.name
jv_payment.insert()
jv_payment.submit()
base_jv.get("entries")[0].is_advance = "Yes" if (test_voucher.doctype in ["Sales Order", "Purchase Order"]) else "No"
base_jv.get("entries")[0].set(field_dict.get(test_voucher.doctype), test_voucher.name)
base_jv.insert()
base_jv.submit()
submitted_voucher = frappe.get_doc(test_voucher.doctype, test_voucher.name)
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", jv_invoice.name))
where %s=%s""" % (field_dict.get(test_voucher.doctype), '%s'), (submitted_voucher.name)))
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s and credit=400""", jv_invoice.name))
where %s=%s and %s=400""" % (field_dict.get(submitted_voucher.doctype), '%s', dr_or_cr), (submitted_voucher.name)))
# cancel jv_invoice
jv_invoice.cancel()
if base_jv.get("entries")[0].is_advance == "Yes":
self.advance_paid_testcase(base_jv, submitted_voucher, dr_or_cr)
self.cancel_against_voucher_testcase(submitted_voucher)
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", jv_invoice.name))
def advance_paid_testcase(self, base_jv, test_voucher, dr_or_cr):
#Test advance paid field
advance_paid = frappe.db.sql("""select advance_paid from `tab%s`
where name=%s""" % (test_voucher.doctype, '%s'), (test_voucher.name))
payment_against_order = base_jv.get("entries")[0].get(dr_or_cr)
self.assertTrue(flt(advance_paid[0][0]) == flt(payment_against_order))
def cancel_against_voucher_testcase(self, test_voucher):
if test_voucher.doctype == "Journal Voucher":
# if test_voucher is a Journal Voucher, test cancellation of test_voucher
test_voucher.cancel()
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", test_voucher.name))
elif test_voucher.doctype in ["Sales Order", "Purchase Order"]:
# if test_voucher is a Sales Order/Purchase Order, test error on cancellation of test_voucher
submitted_voucher = frappe.get_doc(test_voucher.doctype, test_voucher.name)
self.assertRaises(frappe.LinkExistsError, submitted_voucher.cancel)
def test_jv_against_stock_account(self):
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory

View File

@@ -1,6 +1,6 @@
{
"autoname": "JVD.######",
"creation": "2013-02-22 01:27:39.000000",
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -31,6 +31,7 @@
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
"print_width": "180px",
"search_index": 0,
"width": "180px"
@@ -50,6 +51,7 @@
"oldfieldtype": "Data",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
@@ -115,11 +117,6 @@
"print_hide": 0,
"search_index": 1
},
{
"fieldname": "col_break3",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "against_jv",
"fieldtype": "Link",
@@ -133,6 +130,25 @@
"print_hide": 0,
"search_index": 1
},
{
"fieldname": "col_break3",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "against_sales_order",
"fieldtype": "Link",
"label": "Against Sales Order",
"options": "Sales Order",
"permlevel": 0
},
{
"fieldname": "against_purchase_order",
"fieldtype": "Link",
"label": "Against Purchase Order",
"options": "Purchase Order",
"permlevel": 0
},
{
"fieldname": "is_advance",
"fieldtype": "Select",
@@ -158,9 +174,10 @@
],
"idx": 1,
"istable": 1,
"modified": "2014-02-03 12:44:31.000000",
"modified": "2014-08-20 12:19:55.049973",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Voucher Detail",
"owner": "Administrator"
"owner": "Administrator",
"permissions": []
}

View File

@@ -31,7 +31,7 @@
"description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.",
"fieldname": "default_account",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Default Account",
"options": "Account",
@@ -41,7 +41,7 @@
],
"icon": "icon-credit-card",
"idx": 1,
"modified": "2014-05-07 05:06:13.702313",
"modified": "2014-05-27 03:49:13.846602",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
@@ -59,6 +59,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"report": 1,

View File

@@ -0,0 +1,78 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts");
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this
this.frm.set_query('party_account', function() {
if(!me.frm.doc.company) {
msgprint(__("Please select company first"));
} else {
return{
filters:[
['Account', 'company', '=', me.frm.doc.company],
['Account', 'group_or_ledger', '=', 'Ledger'],
['Account', 'master_type', 'in', ['Customer', 'Supplier']]
]
};
}
});
this.frm.set_query('bank_cash_account', function() {
if(!me.frm.doc.company) {
msgprint(__("Please select company first"));
} else {
return{
filters:[
['Account', 'company', '=', me.frm.doc.company],
['Account', 'group_or_ledger', '=', 'Ledger'],
['Account', 'account_type', 'in', ['Bank', 'Cash']]
]
};
}
});
},
get_unreconciled_entries: function() {
var me = this;
return this.frm.call({
doc: me.frm.doc,
method: 'get_unreconciled_entries',
callback: function(r, rt) {
var invoices = [];
$.each(me.frm.doc.payment_reconciliation_invoices || [], function(i, row) {
if (row.invoice_number && !inList(invoices, row.invoice_number))
invoices.push(row.invoice_number);
});
frappe.meta.get_docfield("Payment Reconciliation Payment", "invoice_number",
me.frm.doc.name).options = invoices.join("\n");
$.each(me.frm.doc.payment_reconciliation_payments || [], function(i, p) {
if(!inList(invoices, cstr(p.invoice_number))) p.invoice_number = null;
});
refresh_field("payment_reconciliation_payments");
}
});
},
reconcile: function() {
var me = this;
return this.frm.call({
doc: me.frm.doc,
method: 'reconcile'
});
}
});
$.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm}));
cur_frm.add_fetch('party_account', 'master_type', 'party_type')

View File

@@ -0,0 +1,156 @@
{
"allow_copy": 1,
"creation": "2014-07-09 12:04:51.681583",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"reqd": 1
},
{
"depends_on": "",
"fieldname": "party_account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Party Account",
"options": "Account",
"permlevel": 0,
"reqd": 1,
"search_index": 0
},
{
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 1,
"in_list_view": 1,
"label": "Party Type",
"options": "\nCustomer\nSupplier",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "bank_cash_account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Bank / Cash Account",
"options": "Account",
"permlevel": 0,
"reqd": 0,
"search_index": 0
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "minimum_amount",
"fieldtype": "Currency",
"label": "Minimum Amount",
"permlevel": 0
},
{
"fieldname": "maximum_amount",
"fieldtype": "Currency",
"label": "Maximum Amount",
"permlevel": 0
},
{
"fieldname": "get_unreconciled_entries",
"fieldtype": "Button",
"label": "Get Unreconciled Entries",
"permlevel": 0
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "Unreconciled Payment Details",
"permlevel": 0
},
{
"fieldname": "payment_reconciliation_payments",
"fieldtype": "Table",
"label": "Payment Reconciliation Payments",
"options": "Payment Reconciliation Payment",
"permlevel": 0
},
{
"fieldname": "reconcile",
"fieldtype": "Button",
"label": "Reconcile",
"permlevel": 0
},
{
"fieldname": "sec_break2",
"fieldtype": "Section Break",
"label": "Invoice/Journal Voucher Details",
"permlevel": 0
},
{
"fieldname": "payment_reconciliation_invoices",
"fieldtype": "Table",
"label": "Payment Reconciliation Invoices",
"options": "Payment Reconciliation Invoice",
"permlevel": 0,
"read_only": 1
}
],
"hide_toolbar": 1,
"icon": "icon-resize-horizontal",
"issingle": 1,
"modified": "2014-10-16 17:51:44.367107",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts User",
"submit": 0,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,193 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
class PaymentReconciliation(Document):
def get_unreconciled_entries(self):
self.get_jv_entries()
self.get_invoice_entries()
def get_jv_entries(self):
self.check_mandatory_to_fetch()
dr_or_cr = "credit" if self.party_type == "Customer" else "debit"
cond = self.check_condition(dr_or_cr)
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
if self.bank_cash_account else "1=1"
jv_entries = frappe.db.sql("""
select
t1.name as voucher_no, t1.posting_date, t1.remark, t2.account,
t2.name as voucher_detail_no, {dr_or_cr} as payment_amount, t2.is_advance
from
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t1.name = t2.parent and t1.docstatus = 1 and t2.docstatus = 1
and t2.account = %(party_account)s and {dr_or_cr} > 0
and ifnull(t2.against_voucher, '')='' and ifnull(t2.against_invoice, '')=''
and ifnull(t2.against_jv, '')='' {cond}
and (CASE
WHEN t1.voucher_type in ('Debit Note', 'Credit Note')
THEN 1=1
ELSE {bank_account_condition}
END)
""".format(**{
"dr_or_cr": dr_or_cr,
"cond": cond,
"bank_account_condition": bank_account_condition,
}), {
"party_account": self.party_account,
"bank_cash_account": "%%%s%%" % self.bank_cash_account
}, as_dict=1)
self.add_payment_entries(jv_entries)
def add_payment_entries(self, jv_entries):
self.set('payment_reconciliation_payments', [])
for e in jv_entries:
ent = self.append('payment_reconciliation_payments', {})
ent.journal_voucher = e.get('voucher_no')
ent.posting_date = e.get('posting_date')
ent.amount = flt(e.get('payment_amount'))
ent.remark = e.get('remark')
ent.voucher_detail_number = e.get('voucher_detail_no')
ent.is_advance = e.get('is_advance')
def get_invoice_entries(self):
#Fetch JVs, Sales and Purchase Invoices for 'payment_reconciliation_invoices' to reconcile against
non_reconciled_invoices = []
dr_or_cr = "debit" if self.party_type == "Customer" else "credit"
cond = self.check_condition(dr_or_cr)
invoice_list = frappe.db.sql("""
select
voucher_no, voucher_type, posting_date,
ifnull(sum({dr_or_cr}), 0) as invoice_amount
from
`tabGL Entry`
where
account = %s and {dr_or_cr} > 0 {cond}
group by voucher_type, voucher_no
""".format(**{
"cond": cond,
"dr_or_cr": dr_or_cr
}), (self.party_account), as_dict=True)
for d in invoice_list:
payment_amount = frappe.db.sql("""
select
ifnull(sum(ifnull({0}, 0)), 0)
from
`tabGL Entry`
where
account = %s and {0} > 0
and against_voucher_type = %s and ifnull(against_voucher, '') = %s
""".format("credit" if self.party_type == "Customer" else "debit"),
(self.party_account, d.voucher_type, d.voucher_no))
payment_amount = payment_amount[0][0] if payment_amount else 0
if d.invoice_amount - payment_amount > 0.005:
non_reconciled_invoices.append({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'outstanding_amount': flt(d.invoice_amount - payment_amount, 2)
})
self.add_invoice_entries(non_reconciled_invoices)
def add_invoice_entries(self, non_reconciled_invoices):
#Populate 'payment_reconciliation_invoices' with JVs and Invoices to reconcile against
self.set('payment_reconciliation_invoices', [])
for e in non_reconciled_invoices:
ent = self.append('payment_reconciliation_invoices', {})
ent.invoice_type = e.get('voucher_type')
ent.invoice_number = e.get('voucher_no')
ent.invoice_date = e.get('posting_date')
ent.amount = flt(e.get('invoice_amount'))
ent.outstanding_amount = e.get('outstanding_amount')
def reconcile(self, args):
self.get_invoice_entries()
self.validate_invoice()
dr_or_cr = "credit" if self.party_type == "Customer" else "debit"
lst = []
for e in self.get('payment_reconciliation_payments'):
if e.invoice_type and e.invoice_number and e.allocated_amount:
lst.append({
'voucher_no' : e.journal_voucher,
'voucher_detail_no' : e.voucher_detail_number,
'against_voucher_type' : e.invoice_type,
'against_voucher' : e.invoice_number,
'account' : self.party_account,
'is_advance' : e.is_advance,
'dr_or_cr' : dr_or_cr,
'unadjusted_amt' : flt(e.amount),
'allocated_amt' : flt(e.allocated_amount)
})
if lst:
from erpnext.accounts.utils import reconcile_against_document
reconcile_against_document(lst)
msgprint(_("Successfully Reconciled"))
self.get_unreconciled_entries()
def check_mandatory_to_fetch(self):
for fieldname in ["company", "party_account"]:
if not self.get(fieldname):
frappe.throw(_("Please select {0} first").format(self.meta.get_label(fieldname)))
def validate_invoice(self):
if not self.get("payment_reconciliation_invoices"):
frappe.throw(_("No records found in the Invoice table"))
if not self.get("payment_reconciliation_payments"):
frappe.throw(_("No records found in the Payment table"))
unreconciled_invoices = frappe._dict()
for d in self.get("payment_reconciliation_invoices"):
unreconciled_invoices.setdefault(d.invoice_type, {}).setdefault(d.invoice_number, d.outstanding_amount)
invoices_to_reconcile = []
for p in self.get("payment_reconciliation_payments"):
if p.invoice_type and p.invoice_number and p.allocated_amount:
invoices_to_reconcile.append(p.invoice_number)
if p.invoice_number not in unreconciled_invoices.get(p.invoice_type, {}):
frappe.throw(_("{0}: {1} not found in Invoice Details table")
.format(p.invoice_type, p.invoice_number))
if flt(p.allocated_amount) > flt(p.amount):
frappe.throw(_("Row {0}: Allocated amount {1} must be less than or equals to JV amount {2}")
.format(p.idx, p.allocated_amount, p.amount))
if flt(p.allocated_amount) > unreconciled_invoices.get(p.invoice_type, {}).get(p.invoice_number):
frappe.throw(_("Row {0}: Allocated amount {1} must be less than or equals to invoice outstanding amount {2}")
.format(p.idx, p.allocated_amount, unreconciled_invoices.get(p.invoice_type, {}).get(p.invoice_number)))
if not invoices_to_reconcile:
frappe.throw(_("Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row"))
def check_condition(self, dr_or_cr):
cond = self.from_date and " and posting_date >= '" + self.from_date + "'" or ""
cond += self.to_date and " and posting_date <= '" + self.to_date + "'" or ""
if self.minimum_amount:
cond += " and {0} >= %s".format(dr_or_cr) % self.minimum_amount
if self.maximum_amount:
cond += " and {0} <= %s".format(dr_or_cr) % self.maximum_amount
return cond

View File

@@ -0,0 +1,66 @@
{
"creation": "2014-07-09 16:14:23.672922",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "invoice_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Type",
"options": "Sales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "invoice_number",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Number",
"options": "",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "invoice_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Invoice Date",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Outstanding Amount",
"permlevel": 0,
"read_only": 1
}
],
"istable": 1,
"modified": "2014-07-18 12:20:51.269974",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Invoice",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentReconciliationInvoice(Document):
pass

View File

@@ -1,42 +1,18 @@
{
"creation": "2013-02-22 01:27:39",
"creation": "2014-07-09 16:13:35.452759",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "voucher_no",
"fieldname": "journal_voucher",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Voucher No",
"label": "Journal Voucher",
"options": "Journal Voucher",
"permlevel": 0,
"print_width": "140px",
"read_only": 1,
"reqd": 0,
"width": "140px"
},
{
"fieldname": "unmatched_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Unmatched Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Allocated Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"permlevel": 0
"reqd": 0
},
{
"fieldname": "posting_date",
@@ -47,41 +23,13 @@
"read_only": 1
},
{
"fieldname": "total_amt",
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Total Amount",
"options": "Company:company:default_currency",
"label": "Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "against_account",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Against Account",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "remarks",
"fieldtype": "Small Text",
"label": "Remarks",
"permlevel": 0,
"print_width": "200px",
"read_only": 1,
"width": "200px"
},
{
"fieldname": "voucher_detail_no",
"fieldtype": "Data",
"hidden": 1,
"label": "Voucher Detail No",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "is_advance",
"fieldtype": "Data",
@@ -91,20 +39,78 @@
"read_only": 1
},
{
"fieldname": "original_amount",
"fieldtype": "Currency",
"fieldname": "voucher_detail_number",
"fieldtype": "Data",
"hidden": 1,
"label": "Original Amount",
"in_list_view": 0,
"label": "Voucher Detail Number",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Allocated amount",
"permlevel": 0,
"precision": "",
"reqd": 1
},
{
"default": "Sales Invoice",
"fieldname": "invoice_type",
"fieldtype": "Select",
"in_list_view": 0,
"label": "Invoice Type",
"options": "\nSales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"fieldname": "invoice_number",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Invoice Number",
"options": "",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "",
"permlevel": 0
},
{
"fieldname": "remark",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Remark",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_break2",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
}
],
"hide_toolbar": 1,
"idx": 1,
"istable": 1,
"modified": "2014-04-30 19:27:15.993641",
"modified": "2014-10-16 17:40:54.040194",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment to Invoice Matching Tool Detail",
"name": "Payment Reconciliation Payment",
"name_case": "",
"owner": "Administrator",
"permissions": []
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentReconciliationPayment(Document):
pass

View File

@@ -1 +0,0 @@
Tool for mapping (cancelling) unpaid invoices and payments.

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,51 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.onload_post_render = function(doc) {
$(cur_frm.get_field("reconcile").input).addClass("btn-info");
}
cur_frm.fields_dict.voucher_no.get_query = function(doc) {
// TO-do: check for pos, it should not come
if (!doc.account) msgprint(__("Please select Account first"));
else {
return {
doctype: doc.voucher_type,
query: "erpnext.accounts.doctype.payment_to_invoice_matching_tool.payment_to_invoice_matching_tool.get_voucher_nos",
filters: {
"voucher_type": doc.voucher_type,
"account": doc.account
}
}
}
}
cur_frm.cscript.voucher_no = function() {
return cur_frm.call({
doc: cur_frm.doc,
method: "get_voucher_details"
});
}
cur_frm.cscript.get_against_entries = function() {
return cur_frm.call({
doc: cur_frm.doc,
method: "get_against_entries"
});
}
cur_frm.cscript.reconcile = function() {
return cur_frm.call({
doc: cur_frm.doc,
method: "reconcile"
});
}
cur_frm.cscript.allocated_amount = function(doc, cdt, cdn) {
var total_allocated_amount = 0
$.each(cur_frm.doc.against_entries, function(i, d) {
if(d.allocated_amount > 0) total_allocated_amount += flt(d.allocated_amount);
else if (d.allocated_amount < 0) frappe.throw(__("Allocated amount can not be negative"));
})
cur_frm.set_value("total_allocated_amount", total_allocated_amount);
}

View File

@@ -1,187 +0,0 @@
{
"creation": "2013-01-30 12:49:46",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Other",
"fields": [
{
"fieldname": "account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Account",
"options": "Account",
"permlevel": 0,
"reqd": 1
},
{
"default": "Journal Voucher",
"fieldname": "voucher_type",
"fieldtype": "Select",
"in_list_view": 0,
"label": "Voucher Type",
"options": "Sales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "voucher_no",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Voucher No",
"options": "[Select]",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"in_list_view": 0,
"permlevel": 0,
"print_width": "50%",
"width": "50%"
},
{
"fieldname": "total_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Total Amount",
"options": "",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "unmatched_amount",
"fieldtype": "Currency",
"label": "Unmatched Amount",
"options": "",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "against_entries_section",
"fieldtype": "Section Break",
"label": "Against Entries",
"permlevel": 0
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From Date",
"permlevel": 0
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"permlevel": 0
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"label": "",
"permlevel": 0,
"print_width": "50%",
"width": "50%"
},
{
"fieldname": "amt_greater_than",
"fieldtype": "Currency",
"label": "Amount >=",
"permlevel": 0
},
{
"fieldname": "amt_less_than",
"fieldtype": "Currency",
"label": "Amount <=",
"permlevel": 0
},
{
"fieldname": "section_break0",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0
},
{
"fieldname": "get_against_entries",
"fieldtype": "Button",
"label": "Get Against Entries",
"options": "",
"permlevel": 0
},
{
"description": "Update allocated amount in the above table and then click \"Allocate\" button",
"fieldname": "against_entries",
"fieldtype": "Table",
"label": "Against Entries",
"options": "Payment to Invoice Matching Tool Detail",
"permlevel": 0
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0
},
{
"fieldname": "total_allocated_amount",
"fieldtype": "Currency",
"label": "Total Allocated Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_breal4",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"default": "",
"fieldname": "allocate_amount_automatically",
"fieldtype": "Button",
"hidden": 1,
"label": "Allocate Amount Automatically",
"permlevel": 0,
"reqd": 0
},
{
"fieldname": "reconcile",
"fieldtype": "Button",
"label": "Reconcile",
"options": "",
"permlevel": 0
}
],
"hide_toolbar": 0,
"icon": "icon-magic",
"idx": 1,
"issingle": 1,
"modified": "2014-04-30 17:11:05.908619",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment to Invoice Matching Tool",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
{
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "Accounts User",
"submit": 0,
"write": 1
}
]
}

View File

@@ -1,173 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
class PaymenttoInvoiceMatchingTool(Document):
def get_voucher_details(self):
total_amount = frappe.db.sql("""select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
from `tabGL Entry`
where voucher_type = %s and voucher_no = %s
and account = %s and ifnull(against_voucher, '') != voucher_no""",
(self.voucher_type, self.voucher_no, self.account))
self.total_amount = total_amount and flt(total_amount[0][0]) or 0
reconciled_payment = frappe.db.sql("""
select abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)))
from `tabGL Entry`
where against_voucher_type = %s and against_voucher = %s and account = %s
""", (self.voucher_type, self.voucher_no, self.account))
reconciled_payment = reconciled_payment and flt(reconciled_payment[0][0]) or 0
self.unmatched_amount = self.total_amount - reconciled_payment
def get_against_entries(self):
self.set('against_entries', [])
gle = self.get_gl_entries()
self.create_against_entries_table(gle)
def get_gl_entries(self):
self.validate_mandatory()
dr_or_cr = "credit" if self.total_amount > 0 else "debit"
cond = self.from_date and " and t1.posting_date >= '" + self.from_date + "'" or ""
cond += self.to_date and " and t1.posting_date <= '" + self.to_date + "'" or ""
if self.amt_greater_than:
cond += ' and abs(ifnull(t2.debit, 0) - ifnull(t2.credit, 0)) >= ' + self.amt_greater_than
if self.amt_less_than:
cond += ' and abs(ifnull(t2.debit, 0) - ifnull(t2.credit, 0)) >= ' + self.amt_less_than
gle = frappe.db.sql("""
select
t1.name as voucher_no, t1.posting_date, t1.total_debit as total_amt,
abs(ifnull(t2.debit, 0) - ifnull(t2.credit, 0)) as unmatched_amount, t1.remark,
t2.against_account, t2.name as voucher_detail_no, t2.is_advance
from
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t1.name = t2.parent and t1.docstatus = 1 and t2.account = %s
and ifnull(t2.against_voucher, '')='' and ifnull(t2.against_invoice, '')=''
and ifnull(t2.against_jv, '')='' and t2.%s > 0 and t1.name != %s
and not exists (select * from `tabJournal Voucher Detail`
where parent=%s and against_jv = t1.name) %s
group by t1.name, t2.name """ % ('%s', dr_or_cr, '%s', '%s', cond),
(self.account, self.voucher_no, self.voucher_no), as_dict=1)
return gle
def create_against_entries_table(self, gle):
adjusted_jv = {}
for d in gle:
if not adjusted_jv.has_key(d.get("voucher_no")):
matched_amount = frappe.db.sql("""
select
ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0)
from
`tabGL Entry`
where
account = %s and against_voucher_type = "Journal Voucher"
and ifnull(against_voucher, '') = %s
""", (self.account, d.get('voucher_no')))
matched_amount = matched_amount[0][0] if matched_amount else 0
else:
matched_amount = adjusted_jv.get(d.get("voucher_no"))
if matched_amount < flt(d.get('unmatched_amount')):
unmatched_amount = flt(d.get('unmatched_amount')) - matched_amount
adjusted_jv.setdefault(d.get("voucher_no"), 0)
else:
unmatched_amount = 0
adjusted_jv.setdefault(d.get("voucher_no"), matched_amount - flt(d.get('unmatched_amount')))
if unmatched_amount:
ch = self.append('against_entries', {})
ch.voucher_no = d.get('voucher_no')
ch.posting_date = d.get('posting_date')
ch.unmatched_amount = unmatched_amount
ch.total_amt = flt(d.get('total_amt'))
ch.against_account = d.get('against_account')
ch.remarks = d.get('remark')
ch.voucher_detail_no = d.get('voucher_detail_no')
ch.is_advance = d.get("is_advance")
ch.original_amount = flt(d.get('unmatched_amount'))
def validate_mandatory(self):
for fieldname in ["account", "voucher_type", "voucher_no"]:
if not self.get(fieldname):
frappe.throw(_("Please select {0} first").format(self.meta.get_label("fieldname")))
if not frappe.db.exists(self.voucher_type, self.voucher_no):
frappe.throw(_("Voucher No is not valid"))
def reconcile(self):
self.validate_mandatory()
self.validate_allocated_amount()
dr_or_cr = "credit" if self.total_amount > 0 else "debit"
lst = []
for d in self.get('against_entries'):
if flt(d.allocated_amount) > 0:
lst.append({
'voucher_no' : d.voucher_no,
'voucher_detail_no' : d.voucher_detail_no,
'against_voucher_type' : self.voucher_type,
'against_voucher' : self.voucher_no,
'account' : self.account,
'is_advance' : d.is_advance,
'dr_or_cr' : dr_or_cr,
'unadjusted_amt' : flt(d.original_amount),
'allocated_amt' : flt(d.allocated_amount)
})
if lst:
from erpnext.accounts.utils import reconcile_against_document
reconcile_against_document(lst)
self.get_voucher_details()
self.get_against_entries()
msgprint(_("Successfully allocated"))
def validate_allocated_amount(self):
if not self.total_allocated_amount:
frappe.throw(_("You must allocate amount before reconcile"))
elif self.total_allocated_amount > self.unmatched_amount:
frappe.throw(_("Total Allocated Amount can not be greater than unmatched amount"))
def get_voucher_nos(doctype, txt, searchfield, start, page_len, filters):
non_reconclied_entries = []
entries = frappe.db.sql("""
select
voucher_no, posting_date, ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0) as amount
from
`tabGL Entry`
where
account = %s and voucher_type = %s and voucher_no like %s
and ifnull(against_voucher, '') = ''
group by voucher_no
""", (filters["account"], filters["voucher_type"], "%%%s%%" % txt), as_dict=True)
for d in entries:
adjusted_amount = frappe.db.sql("""
select
ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0)
from
`tabGL Entry`
where
account = %s and against_voucher_type = %s and ifnull(against_voucher, '') = %s
""", (filters["account"], filters["voucher_type"], d.voucher_no))
adjusted_amount = adjusted_amount[0][0] if adjusted_amount else 0
if d.amount > adjusted_amount:
non_reconclied_entries.append([d.voucher_no, d.posting_date, d.amount])
return non_reconclied_entries

View File

@@ -1 +0,0 @@
Journal Voucher (payment) detail for matching to invoice.

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -0,0 +1,214 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// For license information, please see license.txt
frappe.provide("erpnext.payment_tool");
// Help content
frappe.ui.form.on("Payment Tool", "onload", function(frm) {
frm.set_value("make_jv_help", '<i class="icon-hand-right"></i> '
+ __("Note: If payment is not made against any reference, make Journal Voucher manually."));
frm.set_query("payment_account", function() {
return {
filters: [
['Account', 'account_type', 'in', 'Bank, Cash'],
['Account', 'group_or_ledger', '=', 'Ledger'],
['Account', 'company', '=', frm.doc.company]
]
}
});
frm.set_query("against_voucher_type", "payment_tool_details", function() {
return {
filters: {"name": ["in", ["Sales Invoice", "Purchase Invoice", "Journal Voucher", "Sales Order", "Purchase Order"]]}
};
});
});
frappe.ui.form.on("Payment Tool", "refresh", function(frm) {
frappe.ui.form.trigger("Payment Tool", "party_type");
});
frappe.ui.form.on("Payment Tool", "party_type", function(frm) {
frm.toggle_reqd("customer", frm.doc.party_type == "Customer");
frm.toggle_reqd("supplier", frm.doc.party_type == "Supplier");
});
frappe.ui.form.on("Payment Tool", "company", function(frm) {
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
frappe.ui.form.on("Payment Tool", "received_or_paid", function(frm) {
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
// Set party account name
frappe.ui.form.on("Payment Tool", "customer", function(frm) {
erpnext.payment_tool.set_party_account(frm);
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
frappe.ui.form.on("Payment Tool", "supplier", function(frm) {
erpnext.payment_tool.set_party_account(frm);
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
erpnext.payment_tool.check_mandatory_to_set_button = function(frm) {
if (frm.doc.company && frm.doc.party_type && frm.doc.received_or_paid && (frm.doc.customer || frm.doc.supplier)) {
frm.fields_dict.get_outstanding_vouchers.$input.addClass("btn-primary");
}
}
//Set Button color
erpnext.payment_tool.set_party_account = function(frm) {
if(frm.doc.party_type == "Customer") {
var party_name = frm.doc.customer;
} else {
var party_name = frm.doc.supplier;
}
return frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_party_account',
args: {
party_type: frm.doc.party_type,
party_name: party_name
},
callback: function(r, rt) {
if(!r.exc) {
frm.set_value("party_account", r.message);
}
}
});
}
// Get outstanding vouchers
frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
erpnext.payment_tool.check_mandatory_to_fetch(frm.doc);
frm.set_value("payment_tool_details", []);
return frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_outstanding_vouchers',
args: {
args: {
"company": frm.doc.company,
"party_type": frm.doc.party_type,
"received_or_paid": frm.doc.received_or_paid,
"party_name": frm.doc.party_type == "Customer" ? frm.doc.customer : frm.doc.supplier,
"party_account": frm.doc.party_account
}
},
callback: function(r, rt) {
if(r.message) {
frm.fields_dict.get_outstanding_vouchers.$input.removeClass("btn-primary");
frm.fields_dict.make_journal_voucher.$input.addClass("btn-primary");
frappe.model.clear_table(frm.doc, "payment_tool_details");
$.each(r.message, function(i, d) {
var invoice_detail = frappe.model.add_child(frm.doc, "Payment Tool Detail", "payment_tool_details");
invoice_detail.against_voucher_type = d.voucher_type;
invoice_detail.against_voucher_no = d.voucher_no;
invoice_detail.total_amount = d.invoice_amount;
invoice_detail.outstanding_amount = d.outstanding_amount;
});
}
refresh_field("payment_tool_details");
erpnext.payment_tool.set_total_payment_amount(frm);
}
});
});
// validate against_voucher_type
frappe.ui.form.on("Payment Tool Detail", "against_voucher_type", function(frm) {
erpnext.payment_tool.validate_against_voucher(frm);
});
erpnext.payment_tool.validate_against_voucher = function(frm) {
$.each(frm.doc.payment_tool_details || [], function(i, row) {
if(frm.doc.party_type=="Customer"
&& !in_list(["Sales Order", "Sales Invoice", "Journal Voucher"], row.against_voucher_type)) {
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
frappe.throw(__("Against Voucher Type must be one of Sales Order, Sales Invoice or Journal Voucher"))
}
if(frm.doc.party_type=="Supplier"
&& !in_list(["Purchase Order", "Purchase Invoice", "Journal Voucher"], row.against_voucher_type)) {
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
frappe.throw(__("Against Voucher Type must be one of Purchase Order, Purchase Invoice or Journal Voucher"))
}
});
}
// validate against_voucher_type
frappe.ui.form.on("Payment Tool Detail", "against_voucher_no", function(frm, cdt, cdn) {
var row = locals[cdt][cdn];
frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_against_voucher_amount',
args: {
"against_voucher_type": row.against_voucher_type,
"against_voucher_no": row.against_voucher_no
},
callback: function(r) {
if(!r.exc) {
$.each(r.message, function(k, v) {
frappe.model.set_value(cdt, cdn, k, v);
});
}
}
});
});
// Set total payment amount
frappe.ui.form.on("Payment Tool Detail", "payment_amount", function(frm) {
erpnext.payment_tool.set_total_payment_amount(frm);
});
frappe.ui.form.on("Payment Tool Detail", "payment_tool_details_remove", function(frm) {
erpnext.payment_tool.set_total_payment_amount(frm);
});
erpnext.payment_tool.set_total_payment_amount = function(frm) {
var total_amount = 0.00;
$.each(frm.doc.payment_tool_details || [], function(i, row) {
if (row.payment_amount && (row.payment_amount <= row.outstanding_amount)) {
total_amount = total_amount + row.payment_amount;
} else {
if(row.payment_amount < 0)
msgprint(__("Row {0}: Payment amount can not be negative", [row.idx]));
else if(row.payment_amount >= row.outstanding_amount)
msgprint(__("Row {0}: Payment Amount cannot be greater than Outstanding Amount", [__(row.idx)]));
frappe.model.set_value(row.doctype, row.name, "payment_amount", 0.0);
}
});
frm.set_value("total_payment_amount", total_amount);
}
// Make Journal voucher
frappe.ui.form.on("Payment Tool", "make_journal_voucher", function(frm) {
erpnext.payment_tool.check_mandatory_to_fetch(frm.doc);
return frappe.call({
method: 'make_journal_voucher',
doc: frm.doc,
callback: function(r) {
frm.fields_dict.make_journal_voucher.$input.addClass("btn-primary");
var doclist = frappe.model.sync(r.message);
frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
}
});
});
erpnext.payment_tool.check_mandatory_to_fetch = function(doc) {
var check_fields = [
['Company', doc.company],
['Party Type', doc.party_type],
['Received Or Paid', doc.received_or_paid],
['Customer / Supplier', doc.party_type == "Customer" ? doc.customer : doc.supplier]
];
$.each(check_fields, function(i, v) {
if(!v[1]) frappe.throw(__("Please select {0} first", [v[0]]));
});
}

View File

@@ -0,0 +1,381 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"creation": "2014-07-23 15:12:27.746665",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "Party Details",
"permlevel": 0
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"reqd": 1
},
{
"allow_on_submit": 0,
"default": "Customer",
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Party Type",
"no_copy": 0,
"options": "Customer\nSupplier",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:(doc.party_type == 'Customer')",
"fieldname": "customer",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Customer",
"no_copy": 0,
"options": "Customer",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:(doc.party_type == 'Supplier')",
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Supplier",
"no_copy": 0,
"options": "Supplier",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"fieldname": "party_account",
"fieldtype": "Link",
"hidden": 1,
"label": "Party Account",
"no_copy": 1,
"options": "Account",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": 0,
"fieldname": "received_or_paid",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Received Or Paid",
"no_copy": 0,
"options": "Received\nPaid",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "get_outstanding_vouchers",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Get Outstanding Vouchers",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Column Break 1",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_mode",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Mode",
"no_copy": 0,
"options": "Mode of Payment",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Account",
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "reference_no",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference No",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "reference_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Date",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "sec_break3",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Against Voucher",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_tool_details",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Tool Details",
"no_copy": 0,
"options": "Payment Tool Detail",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "section_break_19",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "total_payment_amount",
"fieldtype": "Currency",
"label": "Total Payment Amount",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": 0,
"fieldname": "make_journal_voucher",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Make Journal Voucher",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"fieldname": "data_22",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "section_break_21",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"allow_on_submit": 0,
"fieldname": "make_jv_help",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
}
],
"hide_heading": 0,
"hide_toolbar": 1,
"icon": "icon-magic",
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"modified": "2014-09-12 04:43:05.963218",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 0,
"export": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Accounts Manager",
"set_user_permissions": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 0,
"export": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Accounts User",
"set_user_permissions": 0,
"submit": 0,
"write": 1
}
],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,119 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
from frappe.model.document import Document
import json
class PaymentTool(Document):
def make_journal_voucher(self):
from erpnext.accounts.utils import get_balance_on
total_payment_amount = 0.00
invoice_voucher_type = {
'Sales Invoice': 'against_invoice',
'Purchase Invoice': 'against_voucher',
'Journal Voucher': 'against_jv',
'Sales Order': 'against_sales_order',
'Purchase Order': 'against_purchase_order',
}
jv = frappe.new_doc('Journal Voucher')
jv.voucher_type = 'Journal Entry'
jv.company = self.company
jv.cheque_no = self.reference_no
jv.cheque_date = self.reference_date
if not self.total_payment_amount:
frappe.throw(_("Please enter Payment Amount in atleast one row"))
for v in self.get("payment_tool_details"):
if not frappe.db.get_value(v.against_voucher_type, {"name": v.against_voucher_no}):
frappe.throw(_("Row {0}: {1} is not a valid {2}").format(v.idx, v.against_voucher_no,
v.against_voucher_type))
if v.payment_amount:
d1 = jv.append("entries")
d1.account = self.party_account
d1.balance = get_balance_on(self.party_account)
d1.set("debit" if self.received_or_paid=="Paid" else "credit", flt(v.payment_amount))
d1.set(invoice_voucher_type.get(v.against_voucher_type), v.against_voucher_no)
d1.set('is_advance', 'Yes' if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No')
total_payment_amount = flt(total_payment_amount) + flt(d1.debit) - flt(d1.credit)
d2 = jv.append("entries")
d2.account = self.payment_account
d2.set('debit' if total_payment_amount < 0 else 'credit', abs(total_payment_amount))
if self.payment_account:
d2.balance = get_balance_on(self.payment_account)
return jv.as_dict()
@frappe.whitelist()
def get_party_account(party_type, party_name):
return frappe.db.get_value("Account", {"master_type": party_type, "master_name": party_name})
@frappe.whitelist()
def get_outstanding_vouchers(args):
from erpnext.accounts.utils import get_outstanding_invoices
if not frappe.has_permission("Payment Tool"):
frappe.throw(_("No permission to use Payment Tool"), frappe.PermissionError)
args = json.loads(args)
if args.get("party_type") == "Customer" and args.get("received_or_paid") == "Received":
amount_query = "ifnull(debit, 0) - ifnull(credit, 0)"
elif args.get("party_type") == "Supplier" and args.get("received_or_paid") == "Paid":
amount_query = "ifnull(credit, 0) - ifnull(debit, 0)"
else:
frappe.throw(_("Please enter the Against Vouchers manually"))
# Get all outstanding sales /purchase invoices
outstanding_invoices = get_outstanding_invoices(amount_query, args.get("party_account"))
# Get all SO / PO which are not fully billed or aginst which full advance not paid
orders_to_be_billed = get_orders_to_be_billed(args.get("party_type"), args.get("party_name"))
return outstanding_invoices + orders_to_be_billed
def get_orders_to_be_billed(party_type, party_name):
voucher_type = 'Sales Order' if party_type == "Customer" else 'Purchase Order'
orders = frappe.db.sql("""
select
name as voucher_no,
ifnull(grand_total, 0) as invoice_amount,
(ifnull(grand_total, 0) - ifnull(advance_paid, 0)) as outstanding_amount,
transaction_date as posting_date
from
`tab%s`
where
%s = %s
and docstatus = 1
and ifnull(status, "") != "Stopped"
and ifnull(grand_total, 0) > ifnull(advance_paid, 0)
and abs(100 - ifnull(per_billed, 0)) > 0.01
""" % (voucher_type, 'customer' if party_type == "Customer" else 'supplier', '%s'),
party_name, as_dict = True)
order_list = []
for d in orders:
d["voucher_type"] = voucher_type
order_list.append(d)
return order_list
@frappe.whitelist()
def get_against_voucher_amount(against_voucher_type, against_voucher_no):
if against_voucher_type in ["Sales Order", "Purchase Order"]:
select_cond = "grand_total as total_amount, ifnull(grand_total, 0) - ifnull(advance_paid, 0) as outstanding_amount"
elif against_voucher_type in ["Sales Invoice", "Purchase Invoice"]:
select_cond = "grand_total as total_amount, outstanding_amount"
elif against_voucher_type == "Journal Voucher":
select_cond = "total_debit as total_amount"
details = frappe.db.sql("""select {0} from `tab{1}` where name = %s"""
.format(select_cond, against_voucher_type), against_voucher_no, as_dict=1)
return details[0] if details else {}

View File

@@ -0,0 +1,195 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest, frappe, json
from frappe.utils import flt
test_dependencies = ["Item"]
class TestPaymentTool(unittest.TestCase):
def test_make_journal_voucher(self):
from erpnext.accounts.doctype.journal_voucher.test_journal_voucher \
import test_records as jv_test_records
from erpnext.selling.doctype.sales_order.test_sales_order \
import test_records as so_test_records
from erpnext.buying.doctype.purchase_order.test_purchase_order \
import test_records as po_test_records
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice \
import test_records as si_test_records
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice \
import test_records as pi_test_records
self.clear_table_entries()
base_customer_jv = self.create_against_jv(jv_test_records[2], { "account": "_Test Customer 3 - _TC"})
base_supplier_jv = self.create_against_jv(jv_test_records[1], { "account": "_Test Supplier 1 - _TC"})
#Create SO with partial outstanding
so1 = self.create_voucher(so_test_records[0], {
"customer": "_Test Customer 3"
})
jv_against_so1 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_sales_order": so1.name,
"is_advance": "Yes"
})
#Create SO with no outstanding
so2 = self.create_voucher(so_test_records[0], {
"customer": "_Test Customer 3"
})
jv_against_so2 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_sales_order": so2.name,
"credit": 1000,
"is_advance": "Yes"
})
po = self.create_voucher(po_test_records[1], {
"supplier": "_Test Supplier 1"
})
#Create SI with partial outstanding
si1 = self.create_voucher(si_test_records[0], {
"customer": "_Test Customer 3",
"debit_to": "_Test Customer 3 - _TC"
})
jv_against_si1 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_invoice": si1.name
})
#Create SI with no outstanding
si2 = self.create_voucher(si_test_records[0], {
"customer": "_Test Customer 3",
"debit_to": "_Test Customer 3 - _TC"
})
jv_against_si2 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_invoice": si2.name,
"credit": 561.80
})
pi = self.create_voucher(pi_test_records[0], {
"supplier": "_Test Supplier 1",
"credit_to": "_Test Supplier 1 - _TC"
})
#Create a dict containing properties and expected values
expected_outstanding = {
"Journal Voucher" : [base_customer_jv.name, 400.00],
"Sales Invoice" : [si1.name, 161.80],
"Purchase Invoice" : [pi.name, 1512.30],
"Sales Order" : [so1.name, 600.00],
"Purchase Order" : [po.name, 5000.00]
}
args = {
"company": "_Test Company",
"party_type": "Customer",
"received_or_paid": "Received",
"customer": "_Test Customer",
"party_account": "_Test Customer 3 - _TC",
"payment_mode": "Cheque",
"payment_account": "_Test Account Bank Account - _TC",
"reference_no": "123456",
"reference_date": "2013-02-14"
}
self.make_voucher_for_party(args, expected_outstanding)
args.update({
"party_type": "Supplier",
"received_or_paid": "Paid",
"supplier": "_Test Supplier 1",
"party_account": "_Test Supplier 1 - _TC"
})
expected_outstanding["Journal Voucher"] = [base_supplier_jv.name, 400.00]
self.make_voucher_for_party(args, expected_outstanding)
def create_voucher(self, test_record, args):
doc = frappe.copy_doc(test_record)
doc.update(args)
doc.insert()
doc.submit()
return doc
def create_against_jv(self, test_record, args):
jv = frappe.copy_doc(test_record)
jv.get("entries")[0].update(args)
if args.get("debit"):
jv.get("entries")[1].credit = args["debit"]
elif args.get("credit"):
jv.get("entries")[1].debit = args["credit"]
jv.insert()
jv.submit()
return jv
def make_voucher_for_party(self, args, expected_outstanding):
#Make Journal Voucher for Party
payment_tool_doc = frappe.new_doc("Payment Tool")
for k, v in args.items():
payment_tool_doc.set(k, v)
self.check_outstanding_vouchers(payment_tool_doc, args, expected_outstanding)
def check_outstanding_vouchers(self, doc, args, expected_outstanding):
from erpnext.accounts.doctype.payment_tool.payment_tool import get_outstanding_vouchers
outstanding_entries = get_outstanding_vouchers(json.dumps(args))
for d in outstanding_entries:
self.assertEquals(flt(d.get("outstanding_amount"), 2), expected_outstanding.get(d.get("voucher_type"))[1])
self.check_jv_entries(doc, outstanding_entries, expected_outstanding)
def check_jv_entries(self, paytool, outstanding_entries, expected_outstanding):
for e in outstanding_entries:
d1 = paytool.append("payment_tool_details")
d1.against_voucher_type = e.get("voucher_type")
d1.against_voucher_no = e.get("voucher_no")
d1.total_amount = e.get("invoice_amount")
d1.outstanding_amount = e.get("outstanding_amount")
d1.payment_amount = 100.00
paytool.total_payment_amount = 300
new_jv = paytool.make_journal_voucher()
#Create a list of expected values as [party account, payment against, against_jv, against_invoice,
#against_voucher, against_sales_order, against_purchase_order]
expected_values = [
[paytool.party_account, 100.00, expected_outstanding.get("Journal Voucher")[0], None, None, None, None],
[paytool.party_account, 100.00, None, expected_outstanding.get("Sales Invoice")[0], None, None, None],
[paytool.party_account, 100.00, None, None, expected_outstanding.get("Purchase Invoice")[0], None, None],
[paytool.party_account, 100.00, None, None, None, expected_outstanding.get("Sales Order")[0], None],
[paytool.party_account, 100.00, None, None, None, None, expected_outstanding.get("Purchase Order")[0]]
]
for jv_entry in new_jv.get("entries"):
if paytool.party_account == jv_entry.get("account"):
row = [
jv_entry.get("account"),
jv_entry.get("debit" if paytool.party_type=="Supplier" else "credit"),
jv_entry.get("against_jv"),
jv_entry.get("against_invoice"),
jv_entry.get("against_voucher"),
jv_entry.get("against_sales_order"),
jv_entry.get("against_purchase_order"),
]
self.assertTrue(row in expected_values)
self.assertEquals(new_jv.get("cheque_no"), paytool.reference_no)
self.assertEquals(new_jv.get("cheque_date"), paytool.reference_date)
def clear_table_entries(self):
frappe.db.sql("""delete from `tabGL Entry` where (account = "_Test Customer 3 - _TC" or account = "_Test Supplier 1 - _TC")""")
frappe.db.sql("""delete from `tabSales Order` where customer_name = "_Test Customer 3" """)
frappe.db.sql("""delete from `tabPurchase Order` where supplier_name = "_Test Supplier 1" """)

View File

@@ -0,0 +1,130 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"creation": "2014-08-11 14:27:54.463897",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"allow_on_submit": 0,
"fieldname": "against_voucher_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher Type",
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
"print_width": "",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"width": ""
},
{
"allow_on_submit": 0,
"fieldname": "against_voucher_no",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher No",
"no_copy": 0,
"options": "against_voucher_type",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"allow_on_submit": 0,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Total Amount",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Outstanding Amount",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Payment Amount",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2014-09-11 08:55:34.384017",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool Detail",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -1,10 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ContactControl(Document):
pass
class PaymentToolDetail(Document):
pass

View File

@@ -43,13 +43,14 @@
},
{
"fieldname": "amended_from",
"fieldtype": "Data",
"ignore_restrictions": 1,
"fieldtype": "Link",
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"options": "Period Closing Voucher",
"permlevel": 0,
"read_only": 1
},
@@ -101,7 +102,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:16:36.920034",
"modified": "2014-06-23 07:55:49.946225",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Period Closing Voucher",

View File

@@ -62,7 +62,7 @@
"options": "Price List",
"permlevel": 0,
"read_only": 0,
"reqd": 1
"reqd": 0
},
{
"fieldname": "company",
@@ -147,7 +147,7 @@
"options": "Warehouse",
"permlevel": 0,
"read_only": 0,
"reqd": 1
"reqd": 0
},
{
"fieldname": "cost_center",
@@ -171,6 +171,7 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
@@ -192,6 +193,7 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"in_filter": 0,
@@ -205,14 +207,13 @@
],
"icon": "icon-cog",
"idx": 1,
"modified": "2014-05-09 02:17:34.814856",
"modified": "2014-09-09 05:35:31.969193",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Setting",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -225,7 +226,7 @@
"write": 1
},
{
"cancel": 0,
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,

View File

@@ -0,0 +1,10 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('POS Setting')
class TestPOSSetting(unittest.TestCase):
pass

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,91 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Pricing Rule", "refresh", function(frm) {
var help_content = ['<table class="table table-bordered" style="background-color: #f9f9f9;">',
'<tr><td>',
'<h4><i class="icon-hand-right"></i> ',
__('Notes'),
':</h4>',
'<ul>',
'<li>',
__("Pricing Rule is made to overwrite Price List / define discount percentage, based on some criteria."),
'</li>',
'<li>',
__("If selected Pricing Rule is made for 'Price', it will overwrite Price List. Pricing Rule price is the final price, so no further discount should be applied. Hence, in transactions like Sales Order, Purchase Order etc, it will be fetched in 'Rate' field, rather than 'Price List Rate' field."),
'</li>',
'<li>',
__('Discount Percentage can be applied either against a Price List or for all Price List.'),
'</li>',
'<li>',
__('To not apply Pricing Rule in a particular transaction, all applicable Pricing Rules should be disabled.'),
'</li>',
'</ul>',
'</td></tr>',
'<tr><td>',
'<h4><i class="icon-question-sign"></i> ',
__('How Pricing Rule is applied?'),
'</h4>',
'<ol>',
'<li>',
__("Pricing Rule is first selected based on 'Apply On' field, which can be Item, Item Group or Brand."),
'</li>',
'<li>',
__("Then Pricing Rules are filtered out based on Customer, Customer Group, Territory, Supplier, Supplier Type, Campaign, Sales Partner etc."),
'</li>',
'<li>',
__('Pricing Rules are further filtered based on quantity.'),
'</li>',
'<li>',
__('If two or more Pricing Rules are found based on the above conditions, Priority is applied. Priority is a number between 0 to 20 while default value is zero (blank). Higher number means it will take precedence if there are multiple Pricing Rules with same conditions.'),
'</li>',
'<li>',
__('Even if there are multiple Pricing Rules with highest priority, then following internal priorities are applied:'),
'<ul>',
'<li>',
__('Item Code > Item Group > Brand'),
'</li>',
'<li>',
__('Customer > Customer Group > Territory'),
'</li>',
'<li>',
__('Supplier > Supplier Type'),
'</li>',
'</ul>',
'</li>',
'<li>',
__('If multiple Pricing Rules continue to prevail, users are asked to set Priority manually to resolve conflict.'),
'</li>',
'</ol>',
'</td></tr>',
'</table>'].join("\n");
set_field_options("pricing_rule_help", help_content);
cur_frm.cscript.set_options_for_applicable_for();
});
cur_frm.cscript.set_options_for_applicable_for = function() {
var options = [""];
var applicable_for = cur_frm.doc.applicable_for;
if(cur_frm.doc.selling) {
options = $.merge(options, ["Customer", "Customer Group", "Territory", "Sales Partner", "Campaign"]);
}
if(cur_frm.doc.buying) {
$.merge(options, ["Supplier", "Supplier Type"]);
}
set_field_options("applicable_for", options.join("\n"));
if(!in_list(options, applicable_for)) applicable_for = null;
cur_frm.set_value("applicable_for", applicable_for)
}
cur_frm.cscript.selling = function() {
cur_frm.cscript.set_options_for_applicable_for();
}
cur_frm.cscript.buying = function() {
cur_frm.cscript.set_options_for_applicable_for();
}

View File

@@ -51,6 +51,18 @@
"options": "Brand",
"permlevel": 0
},
{
"fieldname": "selling",
"fieldtype": "Check",
"label": "Selling",
"permlevel": 0
},
{
"fieldname": "buying",
"fieldtype": "Check",
"label": "Buying",
"permlevel": 0
},
{
"fieldname": "applicable_for",
"fieldtype": "Select",
@@ -131,6 +143,13 @@
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0
},
{
"default": "Today",
"fieldname": "valid_from",
@@ -198,12 +217,25 @@
"label": "For Price List",
"options": "Price List",
"permlevel": 0
},
{
"fieldname": "help_section",
"fieldtype": "Section Break",
"label": "",
"options": "Simple",
"permlevel": 0
},
{
"fieldname": "pricing_rule_help",
"fieldtype": "HTML",
"label": "Pricing Rule Help",
"permlevel": 0
}
],
"icon": "icon-gift",
"idx": 1,
"istable": 0,
"modified": "2014-05-12 16:24:52.005162",
"modified": "2014-06-20 19:36:22.502381",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -212,8 +244,8 @@
{
"create": 1,
"delete": 1,
"export": 0,
"import": 0,
"export": 1,
"import": 1,
"permlevel": 0,
"read": 1,
"report": 1,
@@ -258,7 +290,6 @@
"permlevel": 0,
"read": 1,
"report": 1,
"restrict": 1,
"role": "System Manager",
"write": 1
}

View File

@@ -5,28 +5,46 @@
from __future__ import unicode_literals
import frappe
import json
import copy
from frappe import throw, _
from frappe.utils import flt
from frappe.utils import flt, cint
from frappe.model.document import Document
class MultiplePricingRuleConflict(frappe.ValidationError): pass
class PricingRule(Document):
def validate(self):
self.validate_mandatory()
self.validate_applicable_for_selling_or_buying()
self.validate_min_max_qty()
self.cleanup_fields_value()
self.validate_price_or_discount()
self.validate_max_discount()
def validate_mandatory(self):
for field in ["apply_on", "applicable_for", "price_or_discount"]:
for field in ["apply_on", "applicable_for"]:
tocheck = frappe.scrub(self.get(field) or "")
if tocheck and not self.get(tocheck):
throw(_("{0} is required").format(self.meta.get_label(tocheck)), frappe.MandatoryError)
def validate_applicable_for_selling_or_buying(self):
if not self.selling and not self.buying:
throw(_("Atleast one of the Selling or Buying must be selected"))
if not self.selling and self.applicable_for in ["Customer", "Customer Group",
"Territory", "Sales Partner", "Campaign"]:
throw(_("Selling must be checked, if Applicable For is selected as {0}"
.format(self.applicable_for)))
if not self.buying and self.applicable_for in ["Supplier", "Supplier Type"]:
throw(_("Buying must be checked, if Applicable For is selected as {0}"
.format(self.applicable_for)))
def validate_min_max_qty(self):
if self.min_qty and self.max_qty and flt(self.min_qty) > flt(self.max_qty):
throw(_("Min Qty can not be greater than Max Qty"))
def cleanup_fields_value(self):
for logic_field in ["apply_on", "applicable_for", "price_or_discount"]:
fieldname = frappe.scrub(self.get(logic_field) or "")
@@ -39,3 +57,204 @@ class PricingRule(Document):
f = frappe.scrub(f)
if f!=fieldname:
self.set(f, None)
def validate_price_or_discount(self):
for field in ["Price", "Discount Percentage"]:
if flt(self.get(frappe.scrub(field))) < 0:
throw(_("{0} can not be negative").format(field))
def validate_max_discount(self):
if self.price_or_discount == "Discount Percentage" and self.item_code:
max_discount = frappe.db.get_value("Item", self.item_code, "max_discount")
if max_discount and flt(self.discount_percentage) > flt(max_discount):
throw(_("Max discount allowed for item: {0} is {1}%").format(self.item_code, max_discount))
#--------------------------------------------------------------------------------
@frappe.whitelist()
def apply_pricing_rule(args):
"""
args = {
"item_list": [{"doctype": "", "name": "", "item_code": "", "brand": "", "item_group": ""}, ...],
"customer": "something",
"customer_group": "something",
"territory": "something",
"supplier": "something",
"supplier_type": "something",
"currency": "something",
"conversion_rate": "something",
"price_list": "something",
"plc_conversion_rate": "something",
"company": "something",
"transaction_date": "something",
"campaign": "something",
"sales_partner": "something",
"ignore_pricing_rule": "something"
}
"""
if isinstance(args, basestring):
args = json.loads(args)
args = frappe._dict(args)
# list of dictionaries
out = []
if args.get("parenttype") == "Material Request": return out
if not args.transaction_type:
args.transaction_type = "buying" if frappe.get_meta(args.parenttype).get_field("supplier") \
else "selling"
item_list = args.get("item_list")
args.pop("item_list")
for item in item_list:
args_copy = copy.deepcopy(args)
args_copy.update(item)
out.append(get_pricing_rule_for_item(args_copy))
return out
def get_pricing_rule_for_item(args):
if args.get("parenttype") == "Material Request": return {}
item_details = frappe._dict({
"doctype": args.doctype,
"name": args.name,
"pricing_rule": None
})
if args.ignore_pricing_rule or not args.item_code:
return item_details
if not (args.item_group and args.brand):
args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"])
if not args.item_group:
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
if args.customer and not (args.customer_group and args.territory):
customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
if customer:
args.customer_group, args.territory = customer
elif args.supplier and not args.supplier_type:
args.supplier_type = frappe.db.get_value("Supplier", args.supplier, "supplier_type")
pricing_rules = get_pricing_rules(args)
pricing_rule = filter_pricing_rules(args, pricing_rules)
if pricing_rule:
item_details.pricing_rule = pricing_rule.name
if pricing_rule.price_or_discount == "Price":
item_details.update({
"price_list_rate": pricing_rule.price/flt(args.conversion_rate) \
if args.conversion_rate else 0.0,
"discount_percentage": 0.0
})
else:
item_details.discount_percentage = pricing_rule.discount_percentage
return item_details
def get_pricing_rules(args):
def _get_tree_conditions(parenttype, allow_blank=True):
field = frappe.scrub(parenttype)
condition = ""
if args.get(field):
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
parent_groups = frappe.db.sql_list("""select name from `tab%s`
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
if parent_groups:
if allow_blank: parent_groups.append('')
condition = " ifnull("+field+", '') in ('" + \
"', '".join([d.replace("'", "\\'").replace('"', '\\"') for d in parent_groups])+"')"
return condition
conditions = ""
for field in ["company", "customer", "supplier", "supplier_type", "campaign", "sales_partner"]:
if args.get(field):
conditions += " and ifnull("+field+", '') in (%("+field+")s, '')"
else:
conditions += " and ifnull("+field+", '') = ''"
for parenttype in ["Customer Group", "Territory"]:
group_condition = _get_tree_conditions(parenttype)
if group_condition:
conditions += " and " + group_condition
if not args.price_list: args.price_list = None
conditions += " and ifnull(for_price_list, '') in (%(price_list)s, '')"
if args.get("transaction_date"):
conditions += """ and %(transaction_date)s between ifnull(valid_from, '2000-01-01')
and ifnull(valid_upto, '2500-12-31')"""
item_group_condition = _get_tree_conditions("Item Group", False)
if item_group_condition: item_group_condition = " or " + item_group_condition
return frappe.db.sql("""select * from `tabPricing Rule`
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
and docstatus < 2 and ifnull(disable, 0) = 0
and ifnull({transaction_type}, 0) = 1 {conditions}
order by priority desc, name desc""".format(
item_group_condition=item_group_condition,
transaction_type=args.transaction_type, conditions=conditions), args, as_dict=1)
def filter_pricing_rules(args, pricing_rules):
# filter for qty
if pricing_rules and args.get("qty"):
pricing_rules = filter(lambda x: (args.qty>=flt(x.min_qty)
and (args.qty<=x.max_qty if x.max_qty else True)), pricing_rules)
# find pricing rule with highest priority
if pricing_rules:
max_priority = max([cint(p.priority) for p in pricing_rules])
if max_priority:
pricing_rules = filter(lambda x: cint(x.priority)==max_priority, pricing_rules)
# apply internal priority
all_fields = ["item_code", "item_group", "brand", "customer", "customer_group", "territory",
"supplier", "supplier_type", "campaign", "sales_partner"]
if len(pricing_rules) > 1:
for field_set in [["item_code", "item_group", "brand"],
["customer", "customer_group", "territory"], ["supplier", "supplier_type"]]:
remaining_fields = list(set(all_fields) - set(field_set))
if if_all_rules_same(pricing_rules, remaining_fields):
pricing_rules = apply_internal_priority(pricing_rules, field_set, args)
break
if len(pricing_rules) > 1:
price_or_discount = list(set([d.price_or_discount for d in pricing_rules]))
if len(price_or_discount) == 1 and price_or_discount[0] == "Discount Percentage":
pricing_rules = filter(lambda x: x.for_price_list==args.price_list, pricing_rules) \
or pricing_rules
if len(pricing_rules) > 1:
frappe.throw(_("Multiple Price Rule exists with same criteria, please resolve \
conflict by assigning priority. Price Rules: {0}")
.format("\n".join([d.name for d in pricing_rules])), MultiplePricingRuleConflict)
elif pricing_rules:
return pricing_rules[0]
def if_all_rules_same(pricing_rules, fields):
all_rules_same = True
val = [pricing_rules[0][k] for k in fields]
for p in pricing_rules[1:]:
if val != [p[k] for k in fields]:
all_rules_same = False
break
return all_rules_same
def apply_internal_priority(pricing_rules, field_set, args):
filtered_rules = []
for field in field_set:
if args.get(field):
filtered_rules = filter(lambda x: x[field]==args[field], pricing_rules)
if filtered_rules: break
return filtered_rules or pricing_rules

View File

@@ -17,9 +17,11 @@ class TestPricingRule(unittest.TestCase):
"doctype": "Pricing Rule",
"apply_on": "Item Code",
"item_code": "_Test Item",
"selling": 1,
"price_or_discount": "Discount Percentage",
"price": 0,
"discount_percentage": 10,
"company": "_Test Company"
}
frappe.get_doc(test_record.copy()).insert()
@@ -28,15 +30,16 @@ class TestPricingRule(unittest.TestCase):
"company": "_Test Company",
"price_list": "_Test Price List",
"currency": "_Test Currency",
"doctype": "Sales Order",
"parenttype": "Sales Order",
"conversion_rate": 1,
"price_list_currency": "_Test Currency",
"plc_conversion_rate": 1,
"order_type": "Sales",
"transaction_type": "selling",
"customer": "_Test Customer",
"doctype": "Sales Order Item",
"name": None
})
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 10)
@@ -71,8 +74,8 @@ class TestPricingRule(unittest.TestCase):
self.assertEquals(details.get("discount_percentage"), 5)
frappe.db.sql("update `tabPricing Rule` set priority=NULL where campaign='_Test Campaign'")
from erpnext.stock.get_item_details import MultiplePricingRuleConflict
self.assertRaises (MultiplePricingRuleConflict, get_item_details, args)
from erpnext.accounts.doctype.pricing_rule.pricing_rule import MultiplePricingRuleConflict
self.assertRaises(MultiplePricingRuleConflict, get_item_details, args)
args.item_code = "_Test Item 2"
details = get_item_details(args)

View File

@@ -27,7 +27,8 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
// Show / Hide button
if(doc.docstatus==1 && doc.outstanding_amount > 0)
this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher);
this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher,
frappe.boot.doctype_icons["Journal Voucher"]);
if(doc.docstatus==1) {
cur_frm.appframe.add_button(__('View Ledger'), function() {
@@ -56,7 +57,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
company: cur_frm.doc.company
}
})
});
}, "icon-download", "btn-default");
cur_frm.add_custom_button(__('From Purchase Receipt'),
function() {
@@ -69,7 +70,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
company: cur_frm.doc.company
}
})
});
}, "icon-download", "btn-default");
}
@@ -77,16 +78,19 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
},
supplier: function() {
var me = this;
if(this.frm.updating_party_details)
return;
erpnext.utils.get_party_details(this.frm,
"erpnext.accounts.party.get_party_details", {
erpnext.utils.get_party_details(this.frm, "erpnext.accounts.party.get_party_details",
{
posting_date: this.frm.doc.posting_date,
party: this.frm.doc.supplier,
party_type: "Supplier",
account: this.frm.doc.debit_to,
price_list: this.frm.doc.buying_price_list,
})
}, function() {
me.apply_pricing_rule();
})
},
credit_to: function() {
@@ -109,7 +113,8 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
entries_add: function(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
this.frm.script_manager.copy_from_first_row("entries", row, ["expense_account", "cost_center"]);
this.frm.script_manager.copy_from_first_row("entries", row,
["expense_account", "cost_center", "project_name"]);
},
on_submit: function() {
@@ -227,7 +232,6 @@ cur_frm.fields_dict['entries'].grid.get_field('project_name').get_query = functi
}
}
cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
if(doc.select_print_heading){
// print heading

View File

@@ -1,5 +1,4 @@
{
"allow_attach": 1,
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-05-21 16:16:39",
@@ -77,7 +76,7 @@
},
{
"fieldname": "contact_mobile",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Mobile No",
"permlevel": 0,
@@ -85,7 +84,7 @@
},
{
"fieldname": "contact_email",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Contact Email",
"permlevel": 0,
@@ -106,7 +105,7 @@
"fieldname": "posting_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Posting Date",
"label": "Date",
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -117,7 +116,7 @@
"search_index": 1
},
{
"description": "If not applicable please enter: NA",
"description": "",
"fieldname": "bill_no",
"fieldtype": "Data",
"in_filter": 1,
@@ -127,7 +126,7 @@
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"reqd": 1,
"reqd": 0,
"search_index": 1
},
{
@@ -146,7 +145,7 @@
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
@@ -231,6 +230,14 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"label": "Ignore Pricing Rule",
"no_copy": 1,
"permlevel": 1,
"print_hide": 1
},
{
"fieldname": "items",
"fieldtype": "Section Break",
@@ -256,22 +263,6 @@
"fieldtype": "Section Break",
"permlevel": 0
},
{
"fieldname": "net_total_import",
"fieldtype": "Currency",
"label": "Net Total",
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "column_break_28",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "Will be calculated automatically when you enter the details",
"fieldname": "net_total",
@@ -284,6 +275,22 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_28",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "net_total_import",
"fieldtype": "Currency",
"label": "Net Total",
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "taxes",
"fieldtype": "Section Break",
@@ -332,6 +339,59 @@
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "other_charges_added",
"fieldtype": "Currency",
"label": "Taxes and Charges Added (Company Currency)",
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "other_charges_deducted",
"fieldtype": "Currency",
"label": "Taxes and Charges Deducted (Company Currency)",
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Invoice.",
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break8",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "other_charges_added_import",
"fieldtype": "Currency",
@@ -401,6 +461,17 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "total_tax",
"fieldtype": "Currency",
"label": "Total Tax (Company Currency)",
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
@@ -416,70 +487,6 @@
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break8",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "total_tax",
"fieldtype": "Currency",
"label": "Total Tax (Company Currency)",
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "other_charges_added",
"fieldtype": "Currency",
"label": "Taxes and Charges Added (Company Currency)",
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "other_charges_deducted",
"fieldtype": "Currency",
"label": "Taxes and Charges Deducted (Company Currency)",
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Invoice.",
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "write_off_amount",
"fieldtype": "Currency",
@@ -525,6 +532,11 @@
"read_only": 0,
"report_hide": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "advances",
"fieldtype": "Section Break",
@@ -593,6 +605,7 @@
"label": "Supplier Address",
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
@@ -686,7 +699,7 @@
"oldfieldname": "due_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide": 1,
"read_only": 0,
"search_index": 1
},
@@ -739,21 +752,145 @@
"print_hide": 1,
"read_only": 0,
"reqd": 0
},
{
"depends_on": "eval:doc.docstatus<2",
"fieldname": "recurring_invoice",
"fieldtype": "Section Break",
"label": "Recurring Invoice",
"options": "icon-time",
"permlevel": 0,
"print_hide": 1
},
{
"fieldname": "column_break_77",
"fieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"width": "50%"
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.docstatus<2",
"description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date",
"fieldname": "is_recurring",
"fieldtype": "Check",
"label": "Is Recurring",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
"fieldtype": "Select",
"label": "Recurring Type",
"no_copy": 1,
"options": "Monthly\nQuarterly\nHalf-yearly\nYearly",
"permlevel": 0,
"print_hide": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "Start date of current invoice's period",
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "End date of current invoice's period",
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc",
"fieldname": "repeat_on_day_of_month",
"fieldtype": "Int",
"label": "Repeat on Day of Month",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring invoice will be stop",
"fieldname": "end_date",
"fieldtype": "Date",
"label": "End Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1
},
{
"fieldname": "column_break_82",
"fieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"width": "50%"
},
{
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which next invoice will be generated. It is generated on submit.",
"fieldname": "next_date",
"fieldtype": "Date",
"label": "Next Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "eval:doc.is_recurring==1",
"description": "The unique id for tracking all recurring invoices. It is generated on submit.",
"fieldname": "recurring_id",
"fieldtype": "Data",
"label": "Recurring Id",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
"fieldname": "notification_email_address",
"fieldtype": "Small Text",
"label": "Notification Email Address",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1
}
],
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:16:52.618986",
"modified": "2014-11-27 17:28:20.133701",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 0,
"amend": 1,
"apply_user_permissions": 1,
"cancel": 1,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -761,11 +898,12 @@
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"write": 0
"submit": 1,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -780,6 +918,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -808,6 +947,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -819,6 +959,12 @@
"role": "Auditor",
"submit": 0,
"write": 0
},
{
"permlevel": 1,
"read": 1,
"role": "Accounts Manager",
"write": 1
}
],
"read_only_onload": 1,

View File

@@ -4,16 +4,19 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr, flt, formatdate
from frappe.utils import cint, cstr, formatdate, flt
from frappe import msgprint, _, throw
from erpnext.setup.utils import get_company_currency
import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
from erpnext.accounts.party import get_party_account, get_due_date
form_grid_templates = {
"entries": "templates/form_grid/item_grid.html"
}
class PurchaseInvoice(BuyingController):
tname = 'Purchase Invoice Item'
fname = 'entries'
@@ -30,6 +33,7 @@ class PurchaseInvoice(BuyingController):
'target_ref_field': 'amount',
'source_field': 'amount',
'percent_join_field': 'purchase_order',
'overflow_type': 'billing'
}]
def validate(self):
@@ -42,9 +46,9 @@ class PurchaseInvoice(BuyingController):
self.pr_required()
self.check_active_purchase_items()
self.check_conversion_rate()
self.validate_bill_no()
self.validate_credit_acc()
self.clear_unallocated_advances("Purchase Invoice Advance", "advance_allocation_details")
self.validate_advance_jv("advance_allocation_details", "purchase_order")
self.check_for_acc_head_of_supplier()
self.check_for_stopped_status()
self.validate_with_previous_doc()
@@ -56,6 +60,14 @@ class PurchaseInvoice(BuyingController):
self.update_valuation_rate("entries")
self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount",
"purchase_receipt_details")
self.create_remarks()
def create_remarks(self):
if not self.remarks:
if self.bill_no and self.bill_date:
self.remarks = _("Against Supplier Invoice {0} dated {1}").format(self.bill_no, formatdate(self.bill_date))
else:
self.remarks = _("No Remarks")
def set_missing_values(self, for_validate=False):
if not self.credit_to:
@@ -68,7 +80,7 @@ class PurchaseInvoice(BuyingController):
def get_advances(self):
super(PurchaseInvoice, self).get_advances(self.credit_to,
"Purchase Invoice Advance", "advance_allocation_details", "debit")
"Purchase Invoice Advance", "advance_allocation_details", "debit", "purchase_order")
def check_active_purchase_items(self):
for d in self.get('entries'):
@@ -83,23 +95,6 @@ class PurchaseInvoice(BuyingController):
if (self.currency == default_currency and flt(self.conversion_rate) != 1.00) or not self.conversion_rate or (self.currency != default_currency and flt(self.conversion_rate) == 1.00):
throw(_("Conversion rate cannot be 0 or 1"))
def validate_bill_no(self):
if self.bill_no and self.bill_no.lower().strip() \
not in ['na', 'not applicable', 'none']:
b_no = frappe.db.sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice`
where bill_no = %s and credit_to = %s and docstatus = 1 and name != %s""",
(self.bill_no, self.credit_to, self.name))
if b_no and cstr(b_no[0][2]) == cstr(self.is_opening):
throw(_("Bill No {0} already booked in Purchase Invoice {1}").format(cstr(b_no[0][0]),
cstr(b_no[0][1])))
if not self.remarks and self.bill_date:
self.remarks = (self.remarks or '') + "\n" \
+ _("Against Bill {0} dated {1}").format(self.bill_no, formatdate(self.bill_date))
if not self.remarks:
self.remarks = "No Remarks"
def validate_credit_acc(self):
if frappe.db.get_value("Account", self.credit_to, "report_type") != "Balance Sheet":
frappe.throw(_("Account must be a balance sheet account"))
@@ -254,6 +249,8 @@ class PurchaseInvoice(BuyingController):
reconcile_against_document(lst)
def on_submit(self):
super(PurchaseInvoice, self).on_submit()
self.check_prev_docstatus()
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
@@ -269,6 +266,9 @@ class PurchaseInvoice(BuyingController):
auto_accounting_for_stock = \
cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
stock_received_but_not_billed = self.get_company_default("stock_received_but_not_billed")
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
gl_entries = []
# parent's gl entry
@@ -308,30 +308,10 @@ class PurchaseInvoice(BuyingController):
(tax.add_deduct_tax == "Add" and 1 or -1) * flt(tax.tax_amount)
# item gl entries
stock_item_and_auto_accounting_for_stock = False
negative_expense_to_be_booked = 0.0
stock_items = self.get_stock_items()
for item in self.get("entries"):
if auto_accounting_for_stock and item.item_code in stock_items:
if flt(item.valuation_rate):
# if auto inventory accounting enabled and stock item,
# then do stock related gl entries
# expense will be booked in sales invoice
stock_item_and_auto_accounting_for_stock = True
valuation_amt = flt(item.base_amount + item.item_tax_amount,
self.precision("base_amount", item))
gl_entries.append(
self.get_gl_dict({
"account": item.expense_account,
"against": self.credit_to,
"debit": valuation_amt,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
elif flt(item.base_amount):
# if not a stock item or auto inventory accounting disabled, book the expense
if flt(item.base_amount):
gl_entries.append(
self.get_gl_dict({
"account": item.expense_account,
@@ -342,23 +322,52 @@ class PurchaseInvoice(BuyingController):
})
)
if stock_item_and_auto_accounting_for_stock and valuation_tax:
if auto_accounting_for_stock and item.item_code in stock_items and item.item_tax_amount:
# Post reverse entry for Stock-Received-But-Not-Billed if it is booked in Purchase Receipt
negative_expense_booked_in_pi = None
if item.purchase_receipt:
negative_expense_booked_in_pi = frappe.db.sql("""select name from `tabGL Entry`
where voucher_type='Purchase Receipt' and voucher_no=%s and account=%s""",
(item.purchase_receipt, expenses_included_in_valuation))
if not negative_expense_booked_in_pi:
gl_entries.append(
self.get_gl_dict({
"account": stock_received_but_not_billed,
"against": self.credit_to,
"debit": flt(item.item_tax_amount, self.precision("item_tax_amount", item)),
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
negative_expense_to_be_booked += flt(item.item_tax_amount, self.precision("item_tax_amount", item))
if negative_expense_to_be_booked and valuation_tax:
# credit valuation tax amount in "Expenses Included In Valuation"
# this will balance out valuation amount included in cost of goods sold
expenses_included_in_valuation = \
self.get_company_default("expenses_included_in_valuation")
total_valuation_amount = sum(valuation_tax.values())
amount_including_divisional_loss = negative_expense_to_be_booked
i = 1
for cost_center, amount in valuation_tax.items():
if i == len(valuation_tax):
applicable_amount = amount_including_divisional_loss
else:
applicable_amount = negative_expense_to_be_booked * (amount / total_valuation_amount)
amount_including_divisional_loss -= applicable_amount
gl_entries.append(
self.get_gl_dict({
"account": expenses_included_in_valuation,
"cost_center": cost_center,
"against": self.credit_to,
"credit": amount,
"credit": applicable_amount,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
i += 1
# writeoff account includes petty difference in the invoice amount
# and the amount that is paid
if self.write_off_account and flt(self.write_off_amount):
@@ -382,7 +391,7 @@ class PurchaseInvoice(BuyingController):
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Purchase Order")
self.make_cancel_gl_entries()
self.make_gl_entries_on_cancel()
def on_update(self):
pass

View File

@@ -0,0 +1,45 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span style="margin-right: 8px; display: inline-block">
<span class="filterable"
data-filter="supplier,=,{%= doc.supplier %}">
{%= doc.supplier_name %}</span></span>
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
<span class="label label-danger filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,>,0|due_date,<,Today">
{%= __("Overdue: ") + comment_when(doc.due_date) %}
</span>
{% } else { %}
<span class="label label-warning filterable"
data-filter="outstanding_amount,>,0|due,>=,Today"
title="{%= __("Payment Pending") %}">
{%= doc.get_formatted("due_date") %}</span>
{% } %}
{% } %}
{% if(doc.outstanding_amount==0 && doc.docstatus==1) { %}
<span class="label label-success filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,=,0">
<i class="icon-ok-sign"></i> {%= __("Paid") %}
</span>
{% } %}
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-1 text-right">
{% var completed = cint((doc.grand_total - doc.outstanding_amount) * 100 / doc.grand_total), title = __("Outstanding Amount") + ": " + doc.get_formatted("outstanding_amount") %}
{% include "templates/form_grid/includes/progress.html" %}
</div>
<div class="col-xs-2 text-right">
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
{%= doc.get_formatted("grand_total_import") %}
</div>
</div>
</div>

View File

@@ -3,10 +3,6 @@
// render
frappe.listview_settings['Purchase Invoice'] = {
add_fields: ["`tabPurchase Invoice`.grand_total", "`tabPurchase Invoice`.outstanding_amount"],
add_columns: [{"content":"paid_amount", width:"10%", type:"bar-graph", label: "Paid"}],
prepare_data: function(data) {
data.paid_amount = flt(data.grand_total) ? (((flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total)) * 100) : 0;
}
add_fields: ["supplier", "supplier_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"]
};

View File

@@ -9,7 +9,8 @@ import frappe.model
import json
from frappe.utils import cint
import frappe.defaults
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory, \
test_records as pr_test_records
test_dependencies = ["Item", "Cost Center"]
test_ignore = ["Serial No"]
@@ -57,9 +58,41 @@ class TestPurchaseInvoice(unittest.TestCase):
expected_values = sorted([
["_Test Supplier - _TC", 0, 720],
["Stock Received But Not Billed - _TC", 750.0, 0],
["Expenses Included In Valuation - _TC", 0.0, 250.0],
["_Test Account Shipping Charges - _TC", 100.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
set_perpetual_inventory(0)
def test_gl_entries_with_auto_accounting_for_stock_against_pr(self):
set_perpetual_inventory(1)
self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
pr = frappe.copy_doc(pr_test_records[0])
pr.submit()
pi = frappe.copy_doc(test_records[1])
for d in pi.get("entries"):
d.purchase_receipt = pr.name
pi.insert()
pi.submit()
gl_entries = frappe.db.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
order by account asc""", pi.name, as_dict=1)
self.assertTrue(gl_entries)
expected_values = sorted([
["_Test Supplier - _TC", 0, 720],
["Stock Received But Not Billed - _TC", 500.0, 0],
["_Test Account Shipping Charges - _TC", 100.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
["Expenses Included In Valuation - _TC", 0, 250.0],
])
for i, gle in enumerate(gl_entries):
@@ -198,4 +231,8 @@ class TestPurchaseInvoice(unittest.TestCase):
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_voucher=%s""", pi.name))
def test_recurring_invoice(self):
from erpnext.controllers.tests.test_recurring_document import test_recurring_document
test_recurring_document(self, test_records)
test_records = frappe.get_test_records('Purchase Invoice')

View File

@@ -1,206 +1,208 @@
[
{
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"entries": [
{
"amount": 500,
"base_amount": 500,
"base_rate": 50,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"qty": 10,
"rate": 50,
"amount": 500,
"base_amount": 500,
"base_rate": 50,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"qty": 10,
"rate": 50,
"uom": "_Test UOM"
},
},
{
"amount": 750,
"base_amount": 750,
"base_rate": 150,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"qty": 5,
"rate": 150,
"amount": 750,
"base_amount": 750,
"base_rate": 150,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"qty": 5,
"rate": 150,
"uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "BILL",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "_T-BILL",
"other_charges": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 100
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 10
},
},
{
"account_head": "_Test Account Excise Duty - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Excise Duty - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 12
},
},
{
"account_head": "_Test Account Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 3
},
},
{
"account_head": "_Test Account S&H Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"account_head": "_Test Account S&H Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"row_id": 3
},
},
{
"account_head": "_Test Account CST - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account CST - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 5
},
},
{
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 12.5
},
},
{
"account_head": "_Test Account Discount - _TC",
"add_deduct_tax": "Deduct",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 10,
"account_head": "_Test Account Discount - _TC",
"add_deduct_tax": "Deduct",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 10,
"row_id": 7
}
],
"posting_date": "2013-02-03",
],
"posting_date": "2013-02-03",
"supplier": "_Test Supplier",
"supplier_name": "_Test Supplier"
},
},
{
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1.0,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1.0,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"entries": [
{
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"qty": 10.0,
"rate": 50.0,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"qty": 10.0,
"rate": 50.0,
"uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "_T-Purchase Invoice-",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "_T-Purchase Invoice-",
"other_charges": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 100.0
},
},
{
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 120.0
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 150.0
}
],
"posting_date": "2013-02-03",
],
"posting_date": "2013-02-03",
"supplier": "_Test Supplier",
"supplier_name": "_Test Supplier"
}
]
]

View File

@@ -1,6 +1,6 @@
{
"autoname": "EVD.######",
"creation": "2013-05-22 12:43:10.000000",
"creation": "2013-05-22 12:43:10",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -8,7 +8,7 @@
"fieldname": "item_code",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"in_list_view": 1,
"label": "Item",
"oldfieldname": "item_code",
"oldfieldtype": "Link",
@@ -52,7 +52,6 @@
{
"fieldname": "quantity_and_rate",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Quantity and Rate",
"permlevel": 0
},
@@ -76,7 +75,7 @@
{
"fieldname": "uom",
"fieldtype": "Link",
"in_list_view": 0,
"in_list_view": 1,
"label": "UOM",
"options": "UOM",
"permlevel": 0,
@@ -86,7 +85,6 @@
{
"fieldname": "conversion_factor",
"fieldtype": "Float",
"in_list_view": 0,
"label": "Conversion Factor",
"permlevel": 0,
"print_hide": 1,
@@ -100,7 +98,6 @@
{
"fieldname": "price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate",
"options": "currency",
"permlevel": 0,
@@ -109,8 +106,8 @@
},
{
"fieldname": "discount_percentage",
"fieldtype": "Float",
"in_list_view": 0,
"fieldtype": "Percent",
"in_list_view": 1,
"label": "Discount %",
"permlevel": 0,
"print_hide": 0,
@@ -124,7 +121,6 @@
{
"fieldname": "base_price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -169,7 +165,6 @@
{
"fieldname": "base_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Rate (Company Currency)",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -182,7 +177,6 @@
{
"fieldname": "base_amount",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Amount (Company Currency)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -193,17 +187,9 @@
"reqd": 1
},
{
"fieldname": "pricing_rule_for_price",
"fieldname": "pricing_rule",
"fieldtype": "Link",
"label": "Pricing Rule For Price",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "pricing_rule_for_discount",
"fieldtype": "Link",
"label": "Pricing Rule For Discount",
"label": "Pricing Rule",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
@@ -211,14 +197,12 @@
{
"fieldname": "accounting",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Accounting",
"permlevel": 0
},
{
"fieldname": "expense_account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Expense Head",
"oldfieldname": "expense_head",
"oldfieldtype": "Link",
@@ -235,11 +219,20 @@
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "project_name",
"fieldtype": "Link",
"in_filter": 1,
"label": "Project Name",
"options": "Project",
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"default": ":Company",
"fieldname": "cost_center",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -253,26 +246,13 @@
{
"fieldname": "reference",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Reference",
"permlevel": 0
},
{
"fieldname": "project_name",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"options": "Project",
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "brand",
"fieldtype": "Data",
"hidden": 1,
"in_list_view": 0,
"label": "Brand",
"oldfieldname": "brand",
"oldfieldtype": "Data",
@@ -286,7 +266,6 @@
"fieldtype": "Link",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "Item Group",
"oldfieldname": "item_group",
"oldfieldtype": "Link",
@@ -301,7 +280,6 @@
"fieldname": "item_tax_rate",
"fieldtype": "Small Text",
"hidden": 1,
"in_list_view": 0,
"label": "Item Tax Rate",
"oldfieldname": "item_tax_rate",
"oldfieldtype": "Small Text",
@@ -314,7 +292,6 @@
"fieldname": "item_tax_amount",
"fieldtype": "Currency",
"hidden": 1,
"in_list_view": 0,
"label": "Item Tax Amount",
"no_copy": 1,
"options": "Company:company:default_currency",
@@ -325,28 +302,10 @@
"search_index": 0,
"width": "150px"
},
{
"allow_on_submit": 1,
"fieldname": "page_break",
"fieldtype": "Check",
"in_list_view": 0,
"label": "Page Break",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1
},
{
"fieldname": "col_break6",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "purchase_order",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Order",
"no_copy": 1,
"oldfieldname": "purchase_order",
@@ -357,12 +316,16 @@
"read_only": 1,
"search_index": 1
},
{
"fieldname": "col_break6",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "po_detail",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Order Item",
"no_copy": 1,
"oldfieldname": "po_detail",
@@ -376,7 +339,6 @@
"fieldname": "purchase_receipt",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Receipt",
"no_copy": 1,
"oldfieldname": "purchase_receipt",
@@ -387,12 +349,22 @@
"read_only": 1,
"search_index": 1
},
{
"allow_on_submit": 1,
"fieldname": "page_break",
"fieldtype": "Check",
"label": "Page Break",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1
},
{
"fieldname": "pr_detail",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "PR Detail",
"no_copy": 1,
"oldfieldname": "pr_detail",
@@ -406,7 +378,6 @@
"fieldname": "valuation_rate",
"fieldtype": "Currency",
"hidden": 1,
"in_list_view": 0,
"label": "Valuation Rate",
"no_copy": 1,
"options": "Company:company:default_currency",
@@ -418,7 +389,6 @@
"fieldname": "rm_supp_cost",
"fieldtype": "Currency",
"hidden": 1,
"in_list_view": 0,
"label": "Raw Materials Supplied Cost",
"no_copy": 1,
"options": "Company:company:default_currency",
@@ -429,9 +399,12 @@
],
"idx": 1,
"istable": 1,
"modified": "2014-02-28 11:27:53.000000",
"modified": "2014-09-09 05:35:35.712453",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
"owner": "Administrator"
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -1,431 +1,164 @@
{
"_last_update": null,
"_user_tags": null,
"allow_attach": null,
"allow_copy": null,
"allow_email": null,
"allow_import": null,
"allow_print": null,
"allow_rename": null,
"allow_trash": null,
"autoname": "PVTD.######",
"change_log": null,
"client_script": null,
"client_script_core": null,
"client_string": null,
"colour": null,
"creation": "2013-05-21 16:16:04",
"custom": null,
"default_print_format": null,
"description": null,
"docstatus": 0,
"doctype": "DocType",
"document_type": null,
"dt_template": null,
"autoname": "PVTD.######",
"creation": "2013-05-21 16:16:04",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"allow_on_submit": null,
"default": "Valuation and Total",
"depends_on": null,
"description": null,
"fieldname": "category",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Consider Tax or Charge for",
"no_column": null,
"no_copy": null,
"oldfieldname": "category",
"oldfieldtype": "Select",
"options": "Valuation and Total\nValuation\nTotal",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": "Valuation and Total",
"fieldname": "category",
"fieldtype": "Select",
"in_list_view": 0,
"label": "Consider Tax or Charge for",
"oldfieldname": "category",
"oldfieldtype": "Select",
"options": "Valuation and Total\nValuation\nTotal",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": "Add",
"depends_on": null,
"description": null,
"fieldname": "add_deduct_tax",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Add or Deduct",
"no_column": null,
"no_copy": null,
"oldfieldname": "add_deduct_tax",
"oldfieldtype": "Select",
"options": "Add\nDeduct",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": "Add",
"fieldname": "add_deduct_tax",
"fieldtype": "Select",
"label": "Add or Deduct",
"oldfieldname": "add_deduct_tax",
"oldfieldtype": "Select",
"options": "Add\nDeduct",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "charge_type",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Type",
"no_column": null,
"no_copy": null,
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "charge_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Type",
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"description": null,
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Reference Row #",
"no_column": null,
"no_copy": null,
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"label": "Reference Row #",
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Description",
"no_column": null,
"no_copy": null,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": "300px",
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_width": "300px",
"read_only": 0,
"reqd": 1,
"width": "300px"
},
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": null,
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "col_break1",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "account_head",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Account Head",
"no_column": null,
"no_copy": null,
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "account_head",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Account Head",
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": ":Company",
"depends_on": null,
"description": null,
"fieldname": "cost_center",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Cost Center",
"no_column": null,
"no_copy": null,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": ":Company",
"fieldname": "cost_center",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "rate",
"fieldtype": "Float",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Rate",
"no_column": null,
"no_copy": null,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "rate",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"read_only": 0,
"reqd": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "tax_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "total",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Total",
"no_column": null,
"no_copy": null,
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Item Wise Tax Detail ",
"no_column": null,
"no_copy": null,
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Item Wise Tax Detail ",
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": 1,
"in_list_view": null,
"label": "Parenttype",
"no_column": null,
"no_copy": null,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": 0,
"set_only_once": null,
"trigger": null,
"width": null
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"label": "Parenttype",
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"search_index": 0
}
],
"hide_heading": 1,
"hide_toolbar": null,
"icon": null,
"idx": 1,
"in_create": null,
"in_dialog": null,
"is_submittable": null,
"is_transaction_doc": null,
"issingle": null,
"istable": 1,
"max_attachments": null,
"menu_index": null,
"modified": "2014-04-15 09:48:45.892548",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges",
"name_case": null,
"owner": "Administrator",
"parent": null,
"parent_node": null,
"parentfield": null,
"parenttype": null,
"permissions": [],
"plugin": null,
"print_outline": null,
"read_only": null,
"read_only_onload": null,
"search_fields": null,
"section_style": null,
"server_code": null,
"server_code_compiled": null,
"server_code_core": null,
"server_code_error": null,
"show_in_menu": null,
"smallicon": null,
"subject": null,
"tag_fields": null,
"title_field": null,
"use_template": null,
"version": null
}
],
"hide_heading": 1,
"idx": 1,
"istable": 1,
"modified": "2014-05-30 03:43:32.494112",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges",
"owner": "Administrator",
"permissions": []
}

View File

@@ -21,9 +21,9 @@ erpnext.POS = Class.extend({
<tr>\
<th style="width: 40%">'+__("Item")+'</th>\
<th style="width: 9%"></th>\
<th style="width: 17%; text-align: right;">Qty</th>\
<th style="width: 22%; text-align: right;">Qty</th>\
<th style="width: 9%"></th>\
<th style="width: 25%; text-align: right;">Rate</th>\
<th style="width: 20%; text-align: right;">Rate</th>\
</tr>\
</thead>\
<tbody>\
@@ -114,7 +114,7 @@ erpnext.POS = Class.extend({
});
this.wrapper.find('input.discount-amount').on("change", function() {
frappe.model.set_value(me.frm.doctype, me.frm.docname, "discount_amount", this.value);
frappe.model.set_value(me.frm.doctype, me.frm.docname, "discount_amount", flt(this.value));
});
this.call_function("remove-items", function() {me.remove_selected_items();});
@@ -233,6 +233,11 @@ erpnext.POS = Class.extend({
},
make_item_list: function() {
var me = this;
if(!this.price_list) {
msgprint(__("Price List not found or disabled"));
return;
}
me.item_timeout = null;
frappe.call({
method: 'erpnext.accounts.doctype.sales_invoice.pos.get_items',
@@ -367,10 +372,8 @@ erpnext.POS = Class.extend({
this.hide_payment_button();
// If quotation to is not Customer then remove party
if (this.frm.doctype == "Quotation") {
if (this.frm.doctype == "Quotation" && this.frm.doc.quotation_to!="Customer") {
this.party_field.$wrapper.remove();
if (this.frm.doc.quotation_to == "Customer")
this.make_party();
}
},
refresh_item_list: function() {
@@ -389,14 +392,19 @@ erpnext.POS = Class.extend({
$(repl('<tr id="%(item_code)s" data-selected="false">\
<td>%(item_code)s%(item_name)s</td>\
<td style="vertical-align:middle;" align="right">\
<td style="vertical-align:top; padding-top: 10px;" \
align="right">\
<div class="decrease-qty" style="cursor:pointer;">\
<i class="icon-minus-sign icon-large text-danger"></i>\
</div>\
</td>\
<td style="vertical-align:middle;"><input type="text" value="%(qty)s" \
class="form-control qty" style="text-align: right;"></td>\
<td style="vertical-align:middle;cursor:pointer;">\
<td style="vertical-align:middle;">\
<input type="text" value="%(qty)s" \
class="form-control qty" style="text-align: right;">\
<div class="actual-qty small text-muted">'
+__("Stock: ")+'<span class="text-success">%(actual_qty)s</span>%(projected_qty)s</div>\
</td>\
<td style="vertical-align:top; padding-top: 10px;">\
<div class="increase-qty" style="cursor:pointer;">\
<i class="icon-plus-sign icon-large text-success"></i>\
</div>\
@@ -407,6 +415,9 @@ erpnext.POS = Class.extend({
item_code: d.item_code,
item_name: d.item_name===d.item_code ? "" : ("<br>" + d.item_name),
qty: d.qty,
actual_qty: d.actual_qty,
projected_qty: d.projected_qty ? (" <span title='"+__("Projected Qty")
+"'>(" + d.projected_qty + ")<span>") : "",
rate: format_currency(d.rate, me.frm.doc.currency),
amount: format_currency(d.amount, me.frm.doc.currency)
}
@@ -481,7 +492,11 @@ erpnext.POS = Class.extend({
});
me.refresh_delete_btn();
this.barcode.$input.focus();
if(me.frm.doc[this.party.toLowerCase()]) {
this.barcode.$input.focus();
} else {
this.party_field.$input.focus();
}
},
increase_decrease_qty: function(tr, operation) {
var item_code = tr.attr("id");
@@ -489,7 +504,7 @@ erpnext.POS = Class.extend({
if (operation == "increase-qty")
this.update_qty(item_code, item_qty + 1);
else if (operation == "decrease-qty" && item_qty != 1)
else if (operation == "decrease-qty" && item_qty != 0)
this.update_qty(item_code, item_qty - 1);
},
disable_text_box_and_button: function() {

View File

@@ -11,7 +11,6 @@ cur_frm.pformat.print_heading = 'Invoice';
{% include 'selling/sales_common.js' %};
{% include 'accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js' %}
{% include 'utilities/doctype/sms_control/sms_control.js' %}
{% include 'accounts/doctype/sales_invoice/pos.js' %}
frappe.provide("erpnext.accounts");
@@ -25,7 +24,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}
// toggle to pos view if is_pos is 1 in user_defaults
if ((cint(frappe.defaults.get_user_defaults("is_pos"))===1 || this.frm.doc.is_pos)) {
if ((is_null(this.frm.doc.is_pos) && cint(frappe.defaults.get_user_default("is_pos"))===1) || this.frm.doc.is_pos) {
if(this.frm.doc.__islocal && !this.frm.doc.amended_from && !this.frm.doc.customer) {
this.frm.set_value("is_pos", 1);
this.is_pos(function() {
@@ -35,8 +34,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}
}
// if document is POS then change default print format to "POS Invoice"
if(cur_frm.doc.is_pos && cur_frm.doc.docstatus===1) {
// if document is POS then change default print format to "POS Invoice" if no default is specified
if(cur_frm.doc.is_pos && cur_frm.doc.docstatus===1 && cint(frappe.defaults.get_user_defaults("fs_pos_view"))===1
&& !locals.DocType[cur_frm.doctype].default_print_format) {
locals.DocType[cur_frm.doctype].default_print_format = "POS Invoice";
cur_frm.setup_print_layout();
}
@@ -73,12 +73,14 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
return item.delivery_note ? true : false;
});
if(!from_delivery_note)
cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
if(!from_delivery_note) {
cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'], "icon-truck")
}
}
if(doc.outstanding_amount!=0)
cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
if(doc.outstanding_amount!=0) {
cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher, "icon-money");
}
}
// Show buttons only when pos view is active
@@ -102,7 +104,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
company: cur_frm.doc.company
}
})
});
}, "icon-download", "btn-default");
},
delivery_note_btn: function() {
@@ -122,7 +124,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
};
}
});
});
}, "icon-download", "btn-default");
},
tc_name: function() {
@@ -155,8 +157,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
customer: function() {
if(this.frm.updating_party_details)
return;
var me = this;
if(this.frm.updating_party_details) return;
erpnext.utils.get_party_details(this.frm,
"erpnext.accounts.party.get_party_details", {
posting_date: this.frm.doc.posting_date,
@@ -164,7 +167,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
party_type: "Customer",
account: this.frm.doc.debit_to,
price_list: this.frm.doc.selling_price_list,
})
}, function() {
me.apply_pricing_rule();
})
},
debit_to: function() {
@@ -181,8 +186,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
// this will make outstanding amount 0
this.frm.set_value("write_off_amount",
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount),
precision("write_off_amount"));
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount,
precision("write_off_amount"))
);
}
this.calculate_outstanding_amount(false);
@@ -219,10 +225,9 @@ $.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_
// Hide Fields
// ------------
cur_frm.cscript.hide_fields = function(doc) {
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'gross_profit',
'gross_profit_percent', 'get_advances_received',
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
'advance_adjustment_details', 'sales_partner', 'commission_rate',
'total_commission', 'advances'];
'total_commission', 'advances', 'from_date', 'to_date'];
item_flds_normal = ['sales_order', 'delivery_note']
@@ -393,33 +398,8 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
})
}
cur_frm.cscript.convert_into_recurring_invoice = function(doc, dt, dn) {
// set default values for recurring invoices
if(doc.convert_into_recurring_invoice) {
var owner_email = doc.owner=="Administrator"
? frappe.user_info("Administrator").email
: doc.owner;
doc.notification_email_address = $.map([cstr(owner_email),
cstr(doc.contact_email)], function(v) { return v || null; }).join(", ");
doc.repeat_on_day_of_month = frappe.datetime.str_to_obj(doc.posting_date).getDate();
}
refresh_many(["notification_email_address", "repeat_on_day_of_month"]);
cur_frm.cscript.send_sms = function() {
frappe.require("assets/erpnext/js/sms_manager.js");
var sms_man = new SMSManager(cur_frm.doc);
}
cur_frm.cscript.invoice_period_from_date = function(doc, dt, dn) {
// set invoice_period_to_date
if(doc.invoice_period_from_date) {
var recurring_type_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6,
'Yearly': 12};
var months = recurring_type_map[doc.recurring_type];
if(months) {
var to_date = frappe.datetime.add_months(doc.invoice_period_from_date,
months);
doc.invoice_period_to_date = frappe.datetime.add_days(to_date, -1);
refresh_field('invoice_period_to_date');
}
}
}

View File

@@ -1,5 +1,4 @@
{
"allow_attach": 1,
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-05-24 19:29:05",
@@ -71,7 +70,7 @@
},
{
"fieldname": "contact_mobile",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Mobile No",
"permlevel": 0,
@@ -79,13 +78,24 @@
},
{
"fieldname": "contact_email",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Contact Email",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"label": "Mode of Payment",
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "Mode of Payment",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
@@ -103,19 +113,6 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Sales Invoice",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
@@ -130,12 +127,25 @@
"reqd": 1,
"search_index": 0
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Sales Invoice",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"default": "Today",
"fieldname": "posting_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Posting Date",
"label": "Date",
"no_copy": 1,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -159,15 +169,25 @@
"search_index": 0
},
{
"fieldname": "mode_of_payment",
"fieldname": "shipping_address_name",
"fieldtype": "Link",
"label": "Mode of Payment",
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "Mode of Payment",
"hidden": 1,
"in_filter": 1,
"label": "Shipping Address Name",
"options": "Address",
"permlevel": 0,
"read_only": 0
"precision": "",
"print_hide": 1
},
{
"fieldname": "shipping_address",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Shipping Address",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "currency_section",
@@ -241,6 +261,14 @@
"read_only": 0,
"reqd": 1
},
{
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"label": "Ignore Pricing Rule",
"no_copy": 1,
"permlevel": 1,
"print_hide": 1
},
{
"fieldname": "items",
"fieldtype": "Section Break",
@@ -303,20 +331,6 @@
"fieldtype": "Section Break",
"permlevel": 0
},
{
"fieldname": "net_total_export",
"fieldtype": "Currency",
"label": "Net Total",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "column_break_32",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "net_total",
"fieldtype": "Currency",
@@ -329,6 +343,20 @@
"read_only": 1,
"reqd": 1
},
{
"fieldname": "column_break_32",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "net_total_export",
"fieldtype": "Currency",
"label": "Net Total",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "taxes",
"fieldtype": "Section Break",
@@ -403,11 +431,6 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_45",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "other_charges_total",
"fieldtype": "Currency",
@@ -419,14 +442,29 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_45",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount",
"options": "Company:company:default_currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0
},
{
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "totals",
"fieldtype": "Section Break",
@@ -437,70 +475,6 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Grand Total",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"reqd": 1
},
{
"fieldname": "rounded_total_export",
"fieldtype": "Currency",
"label": "Rounded Total",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "gross_profit",
"fieldtype": "Currency",
"label": "Gross Profit",
"oldfieldname": "gross_profit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "gross_profit_percent",
"fieldtype": "Float",
"label": "Gross Profit (%)",
"oldfieldname": "gross_profit_percent",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break5",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "grand_total",
"fieldtype": "Currency",
@@ -561,6 +535,49 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break5",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Grand Total",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"reqd": 1
},
{
"fieldname": "rounded_total_export",
"fieldtype": "Currency",
"label": "Rounded Total",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "advances",
"fieldtype": "Section Break",
@@ -682,6 +699,11 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@@ -1051,9 +1073,9 @@
"allow_on_submit": 1,
"depends_on": "eval:doc.docstatus<2",
"description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date",
"fieldname": "convert_into_recurring_invoice",
"fieldname": "is_recurring",
"fieldtype": "Check",
"label": "Convert into Recurring Invoice",
"label": "Is Recurring",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1061,7 +1083,7 @@
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
"fieldtype": "Select",
@@ -1074,7 +1096,31 @@
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"depends_on": "eval:doc.is_recurring==1",
"description": "Start date of current invoice's period",
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"read_only": 0
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "End date of current invoice's period",
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"read_only": 0
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ",
"fieldname": "repeat_on_day_of_month",
"fieldtype": "Int",
@@ -1086,23 +1132,11 @@
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "Start date of current invoice's period",
"fieldname": "invoice_period_from_date",
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring invoice will be stop",
"fieldname": "end_date",
"fieldtype": "Date",
"label": "Invoice Period From Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "End date of current invoice's period",
"fieldname": "invoice_period_to_date",
"fieldtype": "Date",
"label": "Invoice Period To Date",
"label": "End Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1118,30 +1152,7 @@
"width": "50%"
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
"fieldname": "notification_email_address",
"fieldtype": "Small Text",
"label": "Notification Email Address",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.",
"fieldname": "recurring_id",
"fieldtype": "Data",
"label": "Recurring Id",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which next invoice will be generated. It is generated on submit.\n",
"fieldname": "next_date",
"fieldtype": "Date",
@@ -1151,13 +1162,24 @@
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "eval:doc.is_recurring==1",
"description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.",
"fieldname": "recurring_id",
"fieldtype": "Data",
"label": "Recurring Id",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "The date on which recurring invoice will be stop",
"fieldname": "end_date",
"fieldtype": "Date",
"label": "End Date",
"depends_on": "eval:doc.is_recurring==1",
"description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
"fieldname": "notification_email_address",
"fieldtype": "Small Text",
"label": "Notification Email Address",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1180,7 +1202,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:17:00.217556",
"modified": "2015-01-12 17:34:36.353241",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -1202,6 +1224,7 @@
},
{
"amend": 1,
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
@@ -1215,6 +1238,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"cancel": 0,
"delete": 0,
"email": 1,
@@ -1223,6 +1247,12 @@
"read": 1,
"report": 1,
"role": "Customer"
},
{
"permlevel": 1,
"read": 1,
"role": "Accounts Manager",
"write": 1
}
],
"read_only_onload": 1,

View File

@@ -4,20 +4,18 @@
from __future__ import unicode_literals
import frappe
import frappe.defaults
from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \
get_first_day, get_last_day
from frappe.model.naming import make_autoname
from frappe.utils import cint, cstr, flt
from frappe import _, msgprint, throw
from erpnext.accounts.party import get_party_account, get_due_date
from erpnext.controllers.stock_controller import update_gl_entries_after
from frappe.model.mapper import get_mapped_doc
month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
from erpnext.controllers.selling_controller import SellingController
form_grid_templates = {
"entries": "templates/form_grid/item_grid.html"
}
class SalesInvoice(SellingController):
tname = 'Sales Invoice Item'
fname = 'entries'
@@ -36,7 +34,8 @@ class SalesInvoice(SellingController):
'join_field': 'so_detail',
'percent_join_field': 'sales_order',
'status_field': 'billing_status',
'keyword': 'Billed'
'keyword': 'Billed',
'overflow_type': 'billing'
}]
def validate(self):
@@ -51,6 +50,7 @@ class SalesInvoice(SellingController):
self.validate_debit_acc()
self.validate_fixed_asset_account()
self.clear_unallocated_advances("Sales Invoice Advance", "advance_adjustment_details")
self.validate_advance_jv("advance_adjustment_details", "sales_order")
self.add_remarks()
if cint(self.is_pos):
@@ -66,15 +66,18 @@ class SalesInvoice(SellingController):
self.is_opening = 'No'
self.set_aging_date()
frappe.get_doc("Account", self.debit_to).validate_due_date(self.posting_date, self.due_date)
self.set_against_income_account()
self.validate_c_form()
self.validate_time_logs_are_submitted()
self.validate_recurring_invoice()
self.validate_multiple_billing("Delivery Note", "dn_detail", "amount",
"delivery_note_details")
def on_submit(self):
super(SalesInvoice, self).on_submit()
if cint(self.update_stock) == 1:
self.update_stock_ledger()
else:
@@ -96,9 +99,7 @@ class SalesInvoice(SellingController):
if not cint(self.is_pos) == 1:
self.update_against_document_in_jv()
self.update_c_form()
self.update_time_log_batch(self.name)
self.convert_to_recurring()
def before_cancel(self):
self.update_time_log_batch(None)
@@ -115,8 +116,9 @@ class SalesInvoice(SellingController):
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
self.validate_c_form_on_cancel()
self.make_cancel_gl_entries()
self.make_gl_entries_on_cancel()
def update_status_updater_args(self):
if cint(self.update_stock):
@@ -134,13 +136,10 @@ class SalesInvoice(SellingController):
'keyword':'Delivered',
'second_source_dt': 'Delivery Note Item',
'second_source_field': 'qty',
'second_join_field': 'prevdoc_detail_docname'
'second_join_field': 'prevdoc_detail_docname',
'overflow_type': 'delivery'
})
def on_update_after_submit(self):
self.validate_recurring_invoice()
self.convert_to_recurring()
def get_portal_page(self):
return "invoice" if self.docstatus==1 else None
@@ -210,7 +209,7 @@ class SalesInvoice(SellingController):
def get_advances(self):
super(SalesInvoice, self).get_advances(self.debit_to,
"Sales Invoice Advance", "advance_adjustment_details", "credit")
"Sales Invoice Advance", "advance_adjustment_details", "credit", "sales_order")
def get_company_abbr(self):
return frappe.db.sql("select abbr from tabCompany where name=%s", self.company)[0][0]
@@ -262,11 +261,11 @@ class SalesInvoice(SellingController):
"""Validate Fixed Asset and whether Income Account Entered Exists"""
for d in self.get('entries'):
item = frappe.db.sql("""select name,is_asset_item,is_sales_item from `tabItem`
where name = %s and (ifnull(end_of_life,'')='' or end_of_life > now())""", d.item_code)
acc = frappe.db.sql("""select account_type from `tabAccount`
where name = %s""", d.item_code)
acc = frappe.db.sql("""select account_type from `tabAccount`
where name = %s and docstatus != 2""", d.income_account)
if item and item[0][1] == 'Yes' and not acc[0][0] == 'Fixed Asset':
msgprint(_("Account {0} must be of type 'Fixed Asset' as Item {1} is an Asset Item").format(d.item_code), raise_exception=True)
if item and item[0][1] == 'Yes' and acc and acc[0][0] != 'Fixed Asset':
msgprint(_("Account {0} must be of type 'Fixed Asset' as Item {1} is an Asset Item").format(acc[0][0], d.item_code), raise_exception=True)
def validate_with_previous_doc(self):
super(SalesInvoice, self).validate_with_previous_doc(self.tname, {
@@ -339,8 +338,8 @@ class SalesInvoice(SellingController):
def validate_pos(self):
if not self.cash_bank_account and flt(self.paid_amount):
msgprint(_("Cash or Bank Account is mandatory for making payment entry"))
raise Exception
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)):
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
@@ -370,6 +369,12 @@ class SalesInvoice(SellingController):
frappe.db.set(self, 'c_form_no', '')
def validate_c_form_on_cancel(self):
""" Display message if C-Form no exists on cancellation of Sales Invoice"""
if self.c_form_applicable == 'Yes' and self.c_form_no:
msgprint(_("Please remove this Invoice {0} from C-Form {1}")
.format(self.name, self.c_form_no), raise_exception = 1)
def update_current_stock(self):
for d in self.get('entries'):
if d.item_code and d.warehouse:
@@ -383,20 +388,20 @@ class SalesInvoice(SellingController):
def get_warehouse(self):
w = frappe.db.sql("""select warehouse from `tabPOS Setting`
where ifnull(user,'') = %s and company = %s""",
(frappe.session['user'], self.company))
w = w and w[0][0] or ''
if not w:
ps = frappe.db.sql("""select name, warehouse from `tabPOS Setting`
user_pos_setting = frappe.db.sql("""select name, warehouse from `tabPOS Setting`
where ifnull(user,'') = %s and company = %s""", (frappe.session['user'], self.company))
warehouse = user_pos_setting[0][1] if user_pos_setting else None
if not warehouse:
global_pos_setting = frappe.db.sql("""select name, warehouse from `tabPOS Setting`
where ifnull(user,'') = '' and company = %s""", self.company)
if not ps:
if global_pos_setting:
warehouse = global_pos_setting[0][1]
elif not user_pos_setting:
msgprint(_("POS Setting required to make POS Entry"), raise_exception=True)
elif not ps[0][1]:
msgprint(_("Warehouse required in POS Setting"))
else:
w = ps[0][1]
return w
return warehouse
def on_update(self):
if cint(self.update_stock) == 1:
@@ -431,8 +436,7 @@ class SalesInvoice(SellingController):
submitted = frappe.db.sql("""select name from `tabSales Order`
where docstatus = 1 and name = %s""", d.sales_order)
if not submitted:
msgprint(_("Sales Order {0} is not submitted").format(d.sales_order))
raise Exception
frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order))
if d.delivery_note:
submitted = frappe.db.sql("""select name from `tabDelivery Note`
@@ -469,9 +473,8 @@ class SalesInvoice(SellingController):
if repost_future_gle and cint(self.update_stock) \
and cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
items, warehouse_account = self.get_items_and_warehouse_accounts()
update_gl_entries_after(self.posting_date, self.posting_time,
warehouse_account, items)
items, warehouses = self.get_items_and_warehouses()
update_gl_entries_after(self.posting_date, self.posting_time, warehouses, items)
def get_gl_entries(self, warehouse_account=None):
from erpnext.accounts.general_ledger import merge_similar_entries
@@ -579,178 +582,6 @@ class SalesInvoice(SellingController):
})
)
def update_c_form(self):
"""Update amended id in C-form"""
if self.c_form_no and self.amended_from:
frappe.db.sql("""update `tabC-Form Invoice Detail` set invoice_no = %s,
invoice_date = %s, territory = %s, net_total = %s,
grand_total = %s where invoice_no = %s and parent = %s""",
(self.name, self.amended_from, self.c_form_no))
def validate_recurring_invoice(self):
if self.convert_into_recurring_invoice:
self.validate_notification_email_id()
if not self.recurring_type:
msgprint(_("Please select {0}").format(self.meta.get_label("recurring_type")),
raise_exception=1)
elif not (self.invoice_period_from_date and \
self.invoice_period_to_date):
throw(_("Invoice Period From and Invoice Period To dates mandatory for recurring invoice"))
def convert_to_recurring(self):
if self.convert_into_recurring_invoice:
if not self.recurring_id:
frappe.db.set(self, "recurring_id",
make_autoname("RECINV/.#####"))
self.set_next_date()
elif self.recurring_id:
frappe.db.sql("""update `tabSales Invoice`
set convert_into_recurring_invoice = 0
where recurring_id = %s""", (self.recurring_id,))
def validate_notification_email_id(self):
if self.notification_email_address:
email_list = filter(None, [cstr(email).strip() for email in
self.notification_email_address.replace("\n", "").split(",")])
from frappe.utils import validate_email_add
for email in email_list:
if not validate_email_add(email):
throw(_("{0} is an invalid email address in 'Notification Email Address'").format(email))
else:
throw(_("'Notification Email Addresses' not specified for recurring invoice"))
def set_next_date(self):
""" Set next date on which auto invoice will be created"""
if not self.repeat_on_day_of_month:
msgprint(_("Please enter 'Repeat on Day of Month' field value"), raise_exception=1)
next_date = get_next_date(self.posting_date,
month_map[self.recurring_type], cint(self.repeat_on_day_of_month))
frappe.db.set(self, 'next_date', next_date)
def get_next_date(dt, mcount, day=None):
dt = getdate(dt)
from dateutil.relativedelta import relativedelta
dt += relativedelta(months=mcount, day=day)
return dt
def manage_recurring_invoices(next_date=None, commit=True):
"""
Create recurring invoices on specific date by copying the original one
and notify the concerned people
"""
next_date = next_date or nowdate()
recurring_invoices = frappe.db.sql("""select name, recurring_id
from `tabSales Invoice` where ifnull(convert_into_recurring_invoice, 0)=1
and docstatus=1 and next_date=%s
and next_date <= ifnull(end_date, '2199-12-31')""", next_date)
exception_list = []
for ref_invoice, recurring_id in recurring_invoices:
if not frappe.db.sql("""select name from `tabSales Invoice`
where posting_date=%s and recurring_id=%s and docstatus=1""",
(next_date, recurring_id)):
try:
ref_wrapper = frappe.get_doc('Sales Invoice', ref_invoice)
new_invoice_wrapper = make_new_invoice(ref_wrapper, next_date)
send_notification(new_invoice_wrapper)
if commit:
frappe.db.commit()
except:
if commit:
frappe.db.rollback()
frappe.db.begin()
frappe.db.sql("update `tabSales Invoice` set \
convert_into_recurring_invoice = 0 where name = %s", ref_invoice)
notify_errors(ref_invoice, ref_wrapper.customer, ref_wrapper.owner)
frappe.db.commit()
exception_list.append(frappe.get_traceback())
finally:
if commit:
frappe.db.begin()
if exception_list:
exception_message = "\n\n".join([cstr(d) for d in exception_list])
raise Exception, exception_message
def make_new_invoice(ref_wrapper, posting_date):
from erpnext.accounts.utils import get_fiscal_year
new_invoice = frappe.copy_doc(ref_wrapper)
mcount = month_map[ref_wrapper.recurring_type]
invoice_period_from_date = get_next_date(ref_wrapper.invoice_period_from_date, mcount)
# get last day of the month to maintain period if the from date is first day of its own month
# and to date is the last day of its own month
if (cstr(get_first_day(ref_wrapper.invoice_period_from_date)) == \
cstr(ref_wrapper.invoice_period_from_date)) and \
(cstr(get_last_day(ref_wrapper.invoice_period_to_date)) == \
cstr(ref_wrapper.invoice_period_to_date)):
invoice_period_to_date = get_last_day(get_next_date(ref_wrapper.invoice_period_to_date,
mcount))
else:
invoice_period_to_date = get_next_date(ref_wrapper.invoice_period_to_date, mcount)
new_invoice.update({
"posting_date": posting_date,
"aging_date": posting_date,
"due_date": add_days(posting_date, cint(date_diff(ref_wrapper.due_date,
ref_wrapper.posting_date))),
"invoice_period_from_date": invoice_period_from_date,
"invoice_period_to_date": invoice_period_to_date,
"fiscal_year": get_fiscal_year(posting_date)[0],
"owner": ref_wrapper.owner,
})
new_invoice.submit()
return new_invoice
def send_notification(new_rv):
"""Notify concerned persons about recurring invoice generation"""
from frappe.core.doctype.print_format.print_format import get_html
frappe.sendmail(new_rv.notification_email_address,
subject="New Invoice : " + new_rv.name,
message = get_html(new_rv, new_rv, "SalesInvoice"))
def notify_errors(inv, customer, owner):
from frappe.utils.user import get_system_managers
recipients=get_system_managers()
frappe.sendmail(recipients + [frappe.db.get_value("User", owner, "email")],
subject="[Urgent] Error while creating recurring invoice for %s" % inv,
message = frappe.get_template("template/emails/recurring_invoice_failed.html").render({
"name": inv,
"customer": customer
}))
assign_task_to_owner(inv, "Recurring Invoice Failed", recipients)
def assign_task_to_owner(inv, msg, users):
for d in users:
from frappe.widgets.form import assign_to
args = {
'assign_to' : d,
'doctype' : 'Sales Invoice',
'name' : inv,
'description' : msg,
'priority' : 'Urgent'
}
assign_to.add(args)
@frappe.whitelist()
def get_bank_cash_account(mode_of_payment):
val = frappe.db.get_value("Mode of Payment", mode_of_payment, "default_account")
@@ -783,6 +614,7 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
@frappe.whitelist()
def make_delivery_note(source_name, target_doc=None):
def set_missing_values(source, target):
target.ignore_pricing_rule = 1
target.run_method("set_missing_values")
target.run_method("calculate_taxes_and_totals")

View File

@@ -0,0 +1,45 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span style="margin-right: 8px; display: inline-block">
<span class="filterable"
data-filter="customer,=,{%= doc.customer %}">
{%= doc.customer_name %}</span></span>
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
<span class="label label-danger filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,>,0|due_date,<,Today">
{%= __("Overdue: ") + comment_when(doc.due_date) %}
</span>
{% } else { %}
<span class="label label-warning filterable"
data-filter="outstanding_amount,>,0|due_date,>=,Today"
title="{%= __("Payment Pending") %}">
{%= doc.get_formatted("due_date") %}</span>
{% } %}
{% } %}
{% if(doc.outstanding_amount==0 && doc.docstatus==1) { %}
<span class="label label-success filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,=,0">
<i class="icon-ok-sign"></i> {%= __("Paid") %}
</span>
{% } %}
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-1 text-right">
{% var completed = cint((doc.grand_total - doc.outstanding_amount) * 100 / doc.grand_total), title = __("Outstanding Amount") + ": " + doc.get_formatted("outstanding_amount") %}
{% include "templates/form_grid/includes/progress.html" %}
</div>
<div class="col-xs-2 text-right">
<div class="text-ellipsis" title="{%= doc.get_formatted("grand_total_export") %}">
{%= doc.get_formatted("grand_total_export") %}
</div>
</div>
</div>

View File

@@ -3,12 +3,7 @@
// render
frappe.listview_settings['Sales Invoice'] = {
add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"],
add_columns: [{"content":"Percent Paid", width:"10%", type:"bar-graph",
label: "Payment Received"}],
prepare_data: function(data) {
data["Percent Paid"] = (data.docstatus===1 && flt(data.grand_total))
? (((flt(data.grand_total) - flt(data.outstanding_amount)) / flt(data.grand_total)) * 100)
: 0;
}
add_fields: ["customer", "customer_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"],
filters: [["outstanding_amount", ">", "0"]]
};

View File

@@ -1,385 +1,390 @@
[
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"entries": [
{
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "138-CMS Shoe",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_name": "138-CMS Shoe",
"parentfield": "entries",
"qty": 1.0,
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "138-CMS Shoe",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_name": "138-CMS Shoe",
"parentfield": "entries",
"qty": 1.0,
"rate": 500.0
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 561.8,
"grand_total_export": 561.8,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 561.8,
"grand_total_export": 561.8,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
"other_charges": [
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 6
},
},
{
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 6.36
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"sales_team": [
{
"allocated_percentage": 65.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"allocated_percentage": 65.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"sales_person": "_Test Sales Person 1"
},
},
{
"allocated_percentage": 34.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"allocated_percentage": 34.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"sales_person": "_Test Sales Person 2"
}
],
"selling_price_list": "_Test Price List",
],
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-03-07",
"entries": [
{
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "_Test Item",
"doctype": "Sales Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"income_account": "Sales - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"price_list_rate": 500.0,
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "_Test Item",
"doctype": "Sales Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"income_account": "Sales - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"price_list_rate": 500.0,
"qty": 1.0
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 630.0,
"grand_total_export": 630.0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 630.0,
"grand_total_export": 630.0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
"other_charges": [
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 16
},
},
{
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 10
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-03-07",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-03-07",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"entries": [
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 50,
"qty": 10,
"rate": 50,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 50,
"qty": 10,
"rate": 50,
"stock_uom": "_Test UOM"
},
},
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 150,
"qty": 5,
"rate": 150,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 150,
"qty": 5,
"rate": 150,
"stock_uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"other_charges": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 100
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 10
},
},
{
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 12
},
},
{
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 3
},
},
{
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"row_id": 3
},
},
{
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 5
},
},
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 12.5
},
},
{
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": -10,
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": -10,
"row_id": 7
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"entries": [
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 62.5,
"qty": 10,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 62.5,
"qty": 10,
"stock_uom": "_Test UOM"
},
},
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 190.66,
"qty": 5,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 190.66,
"qty": 5,
"stock_uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"other_charges": [
{
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"idx": 1,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"idx": 1,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 12
},
},
{
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 2,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 2,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"row_id": 1
},
},
{
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 3,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 1,
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 3,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 1,
"row_id": 1
},
},
{
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"idx": 4,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"idx": 4,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"row_id": 3
},
},
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"idx": 5,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"idx": 5,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 12.5
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"idx": 6,
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"idx": 6,
"parentfield": "other_charges",
"rate": 10
},
},
{
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"idx": 7,
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"idx": 7,
"parentfield": "other_charges",
"rate": 100
},
},
{
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"idx": 8,
"parentfield": "other_charges",
"rate": -10,
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"idx": 8,
"parentfield": "other_charges",
"rate": -10,
"row_id": 7
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
}
]
]

View File

@@ -502,7 +502,8 @@ class TestSalesInvoice(unittest.TestCase):
"warehouse": "_Test Warehouse - _TC"
})
pos_setting.insert()
if not frappe.db.exists("POS Setting", "_Test POS Setting"):
pos_setting.insert()
def test_si_gl_entry_with_aii_and_update_stock_with_warehouse_but_no_account(self):
self.clear_stock_account_balance()
@@ -664,142 +665,9 @@ class TestSalesInvoice(unittest.TestCase):
where against_invoice=%s""", si.name))
def test_recurring_invoice(self):
from frappe.utils import get_first_day, get_last_day, add_to_date, nowdate, getdate
from erpnext.accounts.utils import get_fiscal_year
today = nowdate()
base_si = frappe.copy_doc(test_records[0])
base_si.update({
"convert_into_recurring_invoice": 1,
"recurring_type": "Monthly",
"notification_email_address": "test@example.com, test1@example.com, test2@example.com",
"repeat_on_day_of_month": getdate(today).day,
"posting_date": today,
"fiscal_year": get_fiscal_year(today)[0],
"invoice_period_from_date": get_first_day(today),
"invoice_period_to_date": get_last_day(today)
})
from erpnext.controllers.tests.test_recurring_document import test_recurring_document
# monthly
si1 = frappe.copy_doc(base_si)
si1.insert()
si1.submit()
self._test_recurring_invoice(si1, True)
# monthly without a first and last day period
si2 = frappe.copy_doc(base_si)
si2.update({
"invoice_period_from_date": today,
"invoice_period_to_date": add_to_date(today, days=30)
})
si2.insert()
si2.submit()
self._test_recurring_invoice(si2, False)
# quarterly
si3 = frappe.copy_doc(base_si)
si3.update({
"recurring_type": "Quarterly",
"invoice_period_from_date": get_first_day(today),
"invoice_period_to_date": get_last_day(add_to_date(today, months=3))
})
si3.insert()
si3.submit()
self._test_recurring_invoice(si3, True)
# quarterly without a first and last day period
si4 = frappe.copy_doc(base_si)
si4.update({
"recurring_type": "Quarterly",
"invoice_period_from_date": today,
"invoice_period_to_date": add_to_date(today, months=3)
})
si4.insert()
si4.submit()
self._test_recurring_invoice(si4, False)
# yearly
si5 = frappe.copy_doc(base_si)
si5.update({
"recurring_type": "Yearly",
"invoice_period_from_date": get_first_day(today),
"invoice_period_to_date": get_last_day(add_to_date(today, years=1))
})
si5.insert()
si5.submit()
self._test_recurring_invoice(si5, True)
# yearly without a first and last day period
si6 = frappe.copy_doc(base_si)
si6.update({
"recurring_type": "Yearly",
"invoice_period_from_date": today,
"invoice_period_to_date": add_to_date(today, years=1)
})
si6.insert()
si6.submit()
self._test_recurring_invoice(si6, False)
# change posting date but keep recuring day to be today
si7 = frappe.copy_doc(base_si)
si7.update({
"posting_date": add_to_date(today, days=-1)
})
si7.insert()
si7.submit()
# setting so that _test function works
si7.posting_date = today
self._test_recurring_invoice(si7, True)
def _test_recurring_invoice(self, base_si, first_and_last_day):
from frappe.utils import add_months, get_last_day
from erpnext.accounts.doctype.sales_invoice.sales_invoice \
import manage_recurring_invoices, get_next_date
no_of_months = ({"Monthly": 1, "Quarterly": 3, "Yearly": 12})[base_si.recurring_type]
def _test(i):
self.assertEquals(i+1, frappe.db.sql("""select count(*) from `tabSales Invoice`
where recurring_id=%s and docstatus=1""", base_si.recurring_id)[0][0])
next_date = get_next_date(base_si.posting_date, no_of_months,
base_si.repeat_on_day_of_month)
manage_recurring_invoices(next_date=next_date, commit=False)
recurred_invoices = frappe.db.sql("""select name from `tabSales Invoice`
where recurring_id=%s and docstatus=1 order by name desc""",
base_si.recurring_id)
self.assertEquals(i+2, len(recurred_invoices))
new_si = frappe.get_doc("Sales Invoice", recurred_invoices[0][0])
for fieldname in ["convert_into_recurring_invoice", "recurring_type",
"repeat_on_day_of_month", "notification_email_address"]:
self.assertEquals(base_si.get(fieldname),
new_si.get(fieldname))
self.assertEquals(new_si.posting_date, unicode(next_date))
self.assertEquals(new_si.invoice_period_from_date,
unicode(add_months(base_si.invoice_period_from_date, no_of_months)))
if first_and_last_day:
self.assertEquals(new_si.invoice_period_to_date,
unicode(get_last_day(add_months(base_si.invoice_period_to_date,
no_of_months))))
else:
self.assertEquals(new_si.invoice_period_to_date,
unicode(add_months(base_si.invoice_period_to_date, no_of_months)))
return new_si
# if yearly, test 1 repetition, else test 5 repetitions
count = 1 if (no_of_months == 12) else 5
for i in xrange(count):
base_si = _test(i)
test_recurring_document(self, test_records)
def clear_stock_account_balance(self):
frappe.db.sql("delete from `tabStock Ledger Entry`")

View File

@@ -1,13 +1,12 @@
{
"autoname": "INVD.######",
"creation": "2013-06-04 11:02:19.000000",
"creation": "2013-06-04 11:02:19",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "barcode",
"fieldtype": "Data",
"in_list_view": 0,
"label": "Barcode",
"permlevel": 0,
"print_hide": 1,
@@ -32,7 +31,7 @@
"fieldname": "item_name",
"fieldtype": "Data",
"in_filter": 0,
"in_list_view": 0,
"in_list_view": 1,
"label": "Item Name",
"oldfieldname": "item_name",
"oldfieldtype": "Data",
@@ -51,7 +50,6 @@
"fieldname": "customer_item_code",
"fieldtype": "Data",
"hidden": 1,
"in_list_view": 0,
"label": "Customer's Item Code",
"permlevel": 0,
"print_hide": 1,
@@ -73,7 +71,6 @@
{
"fieldname": "quantity_and_rate",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Quantity and Rate",
"permlevel": 0
},
@@ -91,7 +88,6 @@
{
"fieldname": "price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
@@ -103,8 +99,8 @@
},
{
"fieldname": "discount_percentage",
"fieldtype": "Float",
"in_list_view": 0,
"fieldtype": "Percent",
"in_list_view": 1,
"label": "Discount (%)",
"oldfieldname": "adj_rate",
"oldfieldtype": "Float",
@@ -120,7 +116,7 @@
{
"fieldname": "stock_uom",
"fieldtype": "Link",
"in_list_view": 0,
"in_list_view": 1,
"label": "UOM",
"options": "UOM",
"permlevel": 0,
@@ -129,7 +125,6 @@
{
"fieldname": "base_price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
@@ -176,7 +171,6 @@
"fieldname": "base_rate",
"fieldtype": "Currency",
"in_filter": 0,
"in_list_view": 0,
"label": "Rate (Company Currency)",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
@@ -190,7 +184,6 @@
{
"fieldname": "base_amount",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Amount (Company Currency)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -201,17 +194,9 @@
"reqd": 1
},
{
"fieldname": "pricing_rule_for_price",
"fieldname": "pricing_rule",
"fieldtype": "Link",
"label": "Pricing Rule For Price",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "pricing_rule_for_discount",
"fieldtype": "Link",
"label": "Pricing Rule For Discount",
"label": "Pricing Rule",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
@@ -219,7 +204,6 @@
{
"fieldname": "accounting",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Accounting",
"permlevel": 0
},
@@ -227,7 +211,6 @@
"fieldname": "income_account",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Income Account",
"oldfieldname": "income_account",
"oldfieldtype": "Link",
@@ -244,7 +227,6 @@
"fieldtype": "Link",
"hidden": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Expense Account",
"options": "Account",
"permlevel": 0,
@@ -262,7 +244,6 @@
"fieldname": "cost_center",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -271,13 +252,12 @@
"print_hide": 1,
"print_width": "120px",
"read_only": 0,
"reqd": 0,
"reqd": 1,
"width": "120px"
},
{
"fieldname": "warehouse_and_reference",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Warehouse and Reference",
"permlevel": 0
},
@@ -285,7 +265,7 @@
"fieldname": "warehouse",
"fieldtype": "Link",
"hidden": 0,
"in_list_view": 0,
"in_list_view": 1,
"label": "Warehouse",
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
@@ -310,6 +290,7 @@
{
"fieldname": "batch_no",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Batch No",
"options": "Batch",
"permlevel": 0,
@@ -359,6 +340,7 @@
"permlevel": 0
},
{
"allow_on_submit": 1,
"fieldname": "actual_qty",
"fieldtype": "Float",
"label": "Available Qty at Warehouse",
@@ -380,6 +362,7 @@
"fieldname": "sales_order",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Sales Order",
"no_copy": 1,
"oldfieldname": "sales_order",
@@ -456,9 +439,12 @@
],
"idx": 1,
"istable": 1,
"modified": "2014-02-28 11:04:19.000000",
"modified": "2014-09-09 05:35:36.019576",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
"owner": "Administrator"
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -1,431 +1,156 @@
{
"_last_update": null,
"_user_tags": null,
"allow_attach": null,
"allow_copy": null,
"allow_email": null,
"allow_import": null,
"allow_print": null,
"allow_rename": null,
"allow_trash": null,
"autoname": "INVTD.######",
"change_log": null,
"client_script": null,
"client_script_core": null,
"client_string": null,
"colour": null,
"creation": "2013-04-24 11:39:32",
"custom": null,
"default_print_format": null,
"description": null,
"docstatus": 0,
"doctype": "DocType",
"document_type": null,
"dt_template": null,
"fields": [
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "charge_type",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Type",
"no_column": null,
"no_copy": null,
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"description": null,
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Reference Row #",
"no_column": null,
"no_copy": null,
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"permlevel": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Description",
"no_column": null,
"no_copy": null,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": "300px",
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "300px"
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "col_break_1",
"fieldtype": "Column Break",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": null,
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "50%"
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "account_head",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Account Head",
"no_column": null,
"no_copy": null,
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": 1,
"set_only_once": null,
"trigger": null,
"width": null
"search_index": 1
},
{
"allow_on_submit": null,
"default": ":Company",
"depends_on": null,
"description": null,
"fieldname": "cost_center",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Cost Center",
"no_column": null,
"no_copy": null,
"oldfieldname": "cost_center_other_charges",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"permlevel": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "rate",
"fieldtype": "Float",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Rate",
"no_column": null,
"no_copy": null,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"reqd": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "total",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Total",
"no_column": null,
"no_copy": null,
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"read_only": 1
},
{
"allow_on_submit": 0,
"default": null,
"depends_on": null,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldname": "included_in_print_rate",
"fieldtype": "Check",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Is this Tax included in Basic Rate?",
"no_column": null,
"no_copy": 0,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": "150px",
"read_only": null,
"report_hide": 1,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "150px"
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"depends_on": "eval:parent.discount_amount",
"fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"hidden": 0,
"label": "Tax Amount After Discount Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Item Wise Tax Detail",
"no_column": null,
"no_copy": null,
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": 1,
"in_list_view": null,
"label": "Parenttype",
"no_column": null,
"no_copy": null,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": 1,
"set_only_once": null,
"trigger": null,
"width": null
"search_index": 1
}
],
"hide_heading": 1,
"hide_toolbar": null,
"icon": null,
"idx": 1,
"in_create": null,
"in_dialog": null,
"is_submittable": null,
"is_transaction_doc": null,
"issingle": null,
"istable": 1,
"max_attachments": null,
"menu_index": null,
"modified": "2014-04-14 18:40:48.450796",
"modified": "2014-12-10 12:26:41.222471",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges",
"name_case": null,
"owner": "Administrator",
"parent": null,
"parent_node": null,
"parentfield": null,
"parenttype": null,
"permissions": [],
"plugin": null,
"print_outline": null,
"read_only": null,
"read_only_onload": null,
"search_fields": null,
"section_style": null,
"server_code": null,
"server_code_compiled": null,
"server_code_core": null,
"server_code_error": null,
"show_in_menu": null,
"smallicon": null,
"subject": null,
"tag_fields": null,
"title_field": null,
"use_template": null,
"version": null
"permissions": []
}

View File

@@ -46,17 +46,17 @@ cur_frm.pformat.other_charges= function(doc){
var new_val = flt(val)/flt(doc.conversion_rate);
return new_val;
}
function print_hide(fieldname) {
var doc_field = frappe.meta.get_docfield(doc.doctype, fieldname, doc.name);
return doc_field.print_hide;
}
out ='';
if (!doc.print_without_amount) {
var cl = doc.other_charges || [];
// outer table
// outer table
var out='<div><table class="noborder" style="width:100%"><tr><td style="width: 60%"></td><td>';
// main table
@@ -77,12 +77,12 @@ cur_frm.pformat.other_charges= function(doc){
// Discount Amount
if(!print_hide('discount_amount') && doc.discount_amount)
out += make_row('Discount Amount', convert_rate(doc.discount_amount), 0);
out += make_row('Discount Amount', doc.discount_amount, 0);
// grand total
if(!print_hide('grand_total_export'))
out += make_row('Grand Total', doc.grand_total_export, 1);
if(!print_hide('rounded_total_export'))
out += make_row('Rounded Total', doc.rounded_total_export, 1);
@@ -92,7 +92,7 @@ cur_frm.pformat.other_charges= function(doc){
out += '<table><tr><td style="width:25%;"><b>In Words</b></td>';
out += '<td style="width:50%;">' + doc.in_words_export + '</td></tr>';
}
out += '</table></td></tr></table></div>';
out += '</table></td></tr></table></div>';
}
return out;
}
@@ -139,14 +139,14 @@ cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query =
"account_type": ["Tax", "Chargeable", "Income Account"],
"company": doc.company
}
}
}
}
cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = function(doc) {
return{
'company': doc.company,
'group_or_ledger': "Ledger"
}
}
}
cur_frm.cscript.rate = function(doc, cdt, cdn) {

View File

@@ -2,7 +2,7 @@
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:title",
"creation": "2013-01-10 16:34:09.000000",
"creation": "2013-01-10 16:34:09",
"description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.",
"docstatus": 0,
"doctype": "DocType",
@@ -12,6 +12,7 @@
"fieldname": "title",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Title",
"oldfieldname": "title",
"oldfieldtype": "Data",
@@ -22,6 +23,7 @@
{
"fieldname": "is_default",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Default",
"permlevel": 0
},
@@ -34,6 +36,7 @@
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -69,7 +72,7 @@
],
"icon": "icon-money",
"idx": 1,
"modified": "2014-01-28 12:28:27.000000",
"modified": "2014-05-27 03:49:19.023941",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges Master",
@@ -77,7 +80,7 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
@@ -91,7 +94,6 @@
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -105,7 +107,6 @@
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,

View File

@@ -1,6 +1,6 @@
{
"autoname": "Prompt",
"creation": "2013-06-25 11:48:03.000000",
"creation": "2013-06-25 11:48:03",
"description": "Specify conditions to calculate shipping amount",
"docstatus": 0,
"doctype": "DocType",
@@ -102,13 +102,14 @@
],
"icon": "icon-truck",
"idx": 1,
"modified": "2014-01-20 17:49:27.000000",
"modified": "2014-05-27 03:49:19.387875",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Shipping Rule",
"owner": "Administrator",
"permissions": [
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -118,6 +119,7 @@
"role": "Accounts User"
},
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -127,7 +129,6 @@
"role": "Sales User"
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
@@ -139,7 +140,6 @@
"write": 1
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,

View File

@@ -15,7 +15,10 @@ def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True,
if gl_map:
if not cancel:
gl_map = process_gl_map(gl_map, merge_entries)
save_entries(gl_map, adv_adj, update_outstanding)
if gl_map and len(gl_map) > 1:
save_entries(gl_map, adv_adj, update_outstanding)
else:
frappe.throw(_("Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction."))
else:
delete_gl_entries(gl_map, adv_adj=adv_adj, update_outstanding=update_outstanding)
@@ -94,8 +97,7 @@ def validate_account_for_auto_accounting_for_stock(gl_map):
for entry in gl_map:
if entry.account in aii_accounts:
frappe.throw(_("Account: {0} can only be updated via \
Stock Transactions").format(entry.account), StockAccountInvalidTransaction)
frappe.throw(_("Account: {0} can only be updated via Stock Transactions").format(entry.account), StockAccountInvalidTransaction)
def delete_gl_entries(gl_entries=None, voucher_type=None, voucher_no=None,

View File

@@ -25,16 +25,16 @@ pscript['onload_Accounts Browser'] = function(wrapper){
'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
'<li>'+
__('Accounting Entries can be made against leaf nodes, called')+
'<b>' +__('Ledgers')+'</b>.'+ __('Entries against') +
'<b>' +__('Groups') + '</b>'+ __('are not allowed.')+
' <b>' +__('Ledgers')+'</b>. '+ __('Entries against ') +
'<b>' +__('Groups') + '</b> '+ __('are not allowed.')+
'</li>'+
'<li>'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
'<li>'+
'<b>'+__('To create a Bank Account:')+'</b>'+
'<b>'+__('To create a Bank Account')+'</b>: '+
__('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
'</li>'+
'<li>'+
'<b>'+__('To create a Tax Account:')+'</b>'+
'<b>'+__('To create a Tax Account') +'</b>: '+
__('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
'</li>'+
'</ol>'+
@@ -45,7 +45,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){
'icon-plus');
}
wrapper.appframe.set_title_right('Refresh', function() {
wrapper.appframe.set_title_right(__('Refresh'), function() {
wrapper.$company_select.change();
});
@@ -66,7 +66,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){
$.each(r.message, function(i, v) {
$('<option>').html(v).attr('value', v).appendTo(wrapper.$company_select);
});
wrapper.$company_select.val(frappe.defaults.get_user_default("company") || r[0]).change();
wrapper.$company_select.val(frappe.defaults.get_user_default("company") || r.message[0]).change();
}
});
}
@@ -238,6 +238,9 @@ erpnext.AccountsChart = Class.extend({
method: 'erpnext.accounts.utils.add_ac',
callback: function(r) {
d.hide();
if(node.expanded) {
node.toggle_node();
}
node.reload();
}
});
@@ -281,6 +284,9 @@ erpnext.AccountsChart = Class.extend({
method: 'erpnext.accounts.utils.add_cc',
callback: function(r) {
d.hide();
if(node.expanded) {
node.toggle_node();
}
node.reload();
}
});

View File

@@ -17,8 +17,9 @@ frappe.pages['financial-analytics'].onload = function(wrapper) {
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [
{
fieldtype:"Select", label: __("PL or BS"),
options:["Profit and Loss", "Balance Sheet"],
fieldtype:"Select", label: __("PL or BS"), fieldname: "pl_or_bs",
options:[{"label": __("Profit and Loss"), "value": "Profit and Loss"},
{"label": __("Balance Sheet"), "value": "Balance Sheet"}],
filter: function(val, item, opts, me) {
if(item._show) return true;
@@ -31,21 +32,23 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
}
},
{
fieldtype:"Select", label: __("Company"),
link:"Company", default_value: "Select Company...",
fieldtype:"Select", label: __("Company"), fieldname: "company",
link:"Company", default_value: __("Select Company..."),
filter: function(val, item, opts) {
return item.company == val || val == opts.default_value || item._show;
}
},
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
{fieldtype:"Date", label: __("From Date")},
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year", fieldname: "fiscal_year",
default_value: __("Select Fiscal Year...")},
{fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
{fieldtype:"Label", label: __("To")},
{fieldtype:"Date", label: __("To Date")},
{fieldtype:"Select", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
{fieldtype:"Select", label: __("Range"), fieldname: "range",
options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"},
{label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"},
{label: __("Yearly"), value: "Yearly"}]},
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: __("Reset Filters")}
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
],
setup_columns: function() {
var std_columns = [
@@ -203,11 +206,11 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
if(me.pl_or_bs=='Balance Sheet') {
$.each(me.data, function(i, ac) {
if((ac.rgt - ac.lft)==1 && ac.report_type=='Balance Sheet') {
var opening = 0;
var opening = flt(ac["opening_dr"]) - flt(ac["opening_cr"]);
//if(opening) throw opening;
$.each(me.columns, function(i, col) {
if(col.formatter==me.currency_formatter) {
if(col.balance_type=="Dr") {
if(col.balance_type=="Dr" && !in_list(["opening_dr", "opening_cr"], col.field)) {
opening = opening + flt(ac[col.date + "_dr"]) -
flt(ac[col.date + "_cr"]);
me.set_debit_or_credit(ac, col.date, opening);
@@ -229,7 +232,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
indent: 0,
opening: 0,
checked: false,
report_type: me.pl_or_bs,
report_type: me.pl_or_bs=="Balance Sheet"? "Balance Sheet" : "Profit and Loss",
};
me.item_by_name[net_profit.name] = net_profit;
@@ -241,7 +244,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
$.each(me.data, function(i, ac) {
if(!ac.parent_account && me.apply_filter(ac, "company") &&
ac.report_type==me.pl_or_bs) {
ac.report_type==net_profit.report_type) {
$.each(me.columns, function(i, col) {
if(col.formatter==me.currency_formatter && col.balance_type=="Dr") {
var bal = net_profit[col.date+"_dr"] -
@@ -253,9 +256,6 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
}
});
this.data.push(net_profit);
// $.each(me.data, function(i, v) {
// if(v.report_type=="Profit and Loss") console.log(v)
// })
}
},
add_balance: function(field, account, gl) {

View File

View File

@@ -0,0 +1,52 @@
frappe.pages['pos'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: __('Start POS'),
single_column: true
});
wrapper.body.html('<div class="text-center" style="margin: 40px">\
<p>' + __("Select type of transaction") + '</p>\
<p class="select-type" style="margin: auto; max-width: 300px; margin-bottom: 15px;"></p>\
<p class="alert alert-warning pos-setting-message hide">'
+ __("Please setup your POS Preferences")
+ ': <a class="btn btn-default" onclick="newdoc(\'POS Setting\')">'
+ __("Make new POS Setting") + '</a></p>\
<p><button class="btn btn-primary">' + __("Start") + '</button></p>\
</div>');
var pos_type = frappe.ui.form.make_control({
parent: wrapper.body.find(".select-type"),
df: {
fieldtype: "Select",
options: [
{label: __("Billing (Sales Invoice)"), value:"Sales Invoice"},
{value:"Sales Order"},
{value:"Delivery Note"},
{value:"Quotation"},
{value:"Purchase Order"},
{value:"Purchase Receipt"},
{value:"Purchase Invoice"},
],
fieldname: "pos_type"
},
only_input: true
});
pos_type.refresh();
wrapper.body.find(".btn-primary").on("click", function() {
erpnext.open_as_pos = true;
new_doc(pos_type.get_value());
});
$.ajax({
url: "/api/resource/POS Setting",
success: function(data) {
if(!data.data.length) {
wrapper.body.find(".pos-setting-message").removeClass('hide');
}
}
})
}

View File

@@ -0,0 +1,28 @@
{
"content": null,
"creation": "2014-08-08 02:45:55.931022",
"docstatus": 0,
"doctype": "Page",
"icon": "icon-th",
"modified": "2014-08-08 05:59:33.045012",
"modified_by": "Administrator",
"module": "Accounts",
"name": "pos",
"owner": "Administrator",
"page_name": "pos",
"roles": [
{
"role": "Sales User"
},
{
"role": "Purchase User"
},
{
"role": "Accounts User"
}
],
"script": null,
"standard": "Yes",
"style": null,
"title": "POS"
}

View File

@@ -1 +0,0 @@
Period wise opening and closing balance of all transactions.

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,51 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['trial-balance'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: __('Trial Balance'),
single_column: true
});
var TrialBalance = erpnext.AccountTreeGrid.extend({
init: function(wrapper, title) {
var me = this;
this._super(wrapper, title);
// period closing entry checkbox
this.wrapper.bind("make", function() {
$('<div style="margin: 10px 0px; "\
class="with_period_closing_entry"><input type="checkbox" checked="checked">' +
__("With period closing entry") + '</div>')
.appendTo(me.wrapper)
.find("input").click(function() { me.refresh(); });
});
},
prepare_balances: function() {
// store value of with closing entry
this.with_period_closing_entry = this.wrapper
.find(".with_period_closing_entry input:checked").length;
this._super();
},
update_balances: function(account, posting_date, v) {
// for period closing voucher,
// only consider them when adding "With Closing Entry is checked"
if(v.voucher_type === "Period Closing Voucher") {
if(this.with_period_closing_entry) {
this._super(account, posting_date, v);
}
} else {
this._super(account, posting_date, v);
}
},
})
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
wrapper.appframe.add_module_icon("Accounts")
}

View File

@@ -1,23 +0,0 @@
{
"creation": "2013-01-27 16:30:52.000000",
"docstatus": 0,
"doctype": "Page",
"icon": "icon-table",
"idx": 1,
"modified": "2013-07-11 14:44:49.000000",
"modified_by": "Administrator",
"module": "Accounts",
"name": "trial-balance",
"owner": "Administrator",
"page_name": "trial-balance",
"roles": [
{
"role": "Analytics"
},
{
"role": "Accounts Manager"
}
],
"standard": "Yes",
"title": "Trial Balance"
}

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