Compare commits

...

1153 Commits

Author SHA1 Message Date
Nabin Hait
5f98dddd0c Merge branch 'hotfix' 2017-06-02 14:05:53 +05:30
Nabin Hait
52e443cfc8 bumped to version 8.0.44 2017-06-02 14:35:53 +06:00
Nabin Hait
ae07f22d8b Fixed syntax error 2017-06-02 13:57:16 +05:30
Nabin Hait
a171d5e6ed Merge branch 'hotfix' 2017-06-01 19:09:36 +05:30
Nabin Hait
1091a25491 bumped to version 8.0.43 2017-06-01 19:39:36 +06:00
rohitwaghchaure
7f2513f7a1 [Fix] Employees working on a holiday report's date filter not working (#9108) 2017-06-01 18:57:34 +05:30
Makarand Bauskar
0b8f920e22 [minor] install node v7 (#9109) 2017-06-01 18:56:39 +05:30
Nabin Hait
e4b3a67e74 Rate validation in return entry 2017-06-01 16:47:45 +05:30
Manas Solanki
f02c82aeca Fixes in the patch (#9027)
* fix in the patch

* new patch for student groups

* changes in the merge student batch patch
2017-06-01 13:08:27 +05:30
tundebabzy
cf92be88b7 [minor] fixes typo (#9093) 2017-05-31 13:21:12 +05:30
Nabin Hait
38fae6a240 Merge branch 'hotfix' 2017-05-30 22:52:38 +05:30
Nabin Hait
f2c374f524 bumped to version 8.0.42 2017-05-30 23:22:38 +06:00
Saurabh
9a342c6401 Merge pull request #9090 from mbauskar/hotfix
[minor] fixed a unexpected token error for opportunity
2017-05-30 22:42:31 +05:30
mbauskar
26044f436a [minor] fixed a unexpected token error for opportunity 2017-05-30 22:28:08 +05:30
Nabin Hait
f6c396f176 Merge branch 'hotfix' 2017-05-30 15:59:04 +05:30
Nabin Hait
93b5367485 bumped to version 8.0.41 2017-05-30 16:29:04 +06:00
Manas Solanki
5995010007 Correction in the validation message (#9079) 2017-05-30 15:56:48 +05:30
bcornwellmott
0d38a6b495 Fix grammar error in HR Training Results (#9076)
* Fix Typo in message

Issue #9074

* Added  condition for notifying user of grade.
2017-05-30 15:56:02 +05:30
Manas Solanki
a85b68ee77 link for timesheet, fix https://github.com/frappe/erpnext/issues/9042 (#9071) 2017-05-30 15:55:00 +05:30
Manas Solanki
ca31425bb4 field for the naming series should have no copy attribute (#9067) 2017-05-30 15:36:50 +05:30
Manas Solanki
253c53cf53 updating serial no status from scheduler #9061 (#9066) 2017-05-30 15:35:58 +05:30
Nabin Hait
ac3b2aa913 Set change amount automatically only if it is a cash transaction (#9065) 2017-05-30 15:35:01 +05:30
Nabin Hait
5d7e8d9e83 Minor fix in timesheet (#9063) 2017-05-30 15:34:35 +05:30
Nabin Hait
6a5cf672c1 Fixed opportunity status (#9062) 2017-05-30 15:34:20 +05:30
Manas Solanki
5f7b88d9c3 set student roll no in backend if not given (#9039) 2017-05-30 15:33:50 +05:30
Nabin Hait
465d8352aa Merge branch 'hotfix' 2017-05-26 21:35:42 +05:30
Nabin Hait
38ada81487 bumped to version 8.0.40 2017-05-26 22:05:41 +06:00
Prateeksha Singh
e38c70c8bc [fix] uppercase filter frappe/erpnext#8996 (#9026) 2017-05-26 21:34:18 +05:30
Makarand Bauskar
157c334737 [minor] added get_terms methods to erpnext.utils so that it can be used in non transactional documents (#9037) 2017-05-26 21:32:33 +05:30
Nabin Hait
4b12896941 Party Dashboard: Consider any random company if default company not set (#9046) 2017-05-26 21:25:36 +05:30
Sagar Vora
7b0c682635 [fix] add round off difference to last row in landed cost voucher (#8989)
* [fix] add round off difference to last row in landed cost voucher

* Add test case for odd numbers

* Add assertEquals to verify applicable charges

* Use make_purchase_receipt, move round off logic

* Allow rounding difference

* Specify cost center to pass test
2017-05-26 14:58:54 +05:30
Nabin Hait
d45a036b5e Merge branch 'hotfix' 2017-05-25 14:19:50 +05:30
Nabin Hait
d7d9cd2938 bumped to version 8.0.39 2017-05-25 14:49:50 +06:00
Nabin Hait
7e7dc0f254 Update party.py 2017-05-25 14:18:20 +05:30
Ayush Shukla
e9cf1aba77 added float and rebase with hotfix (#9019) 2017-05-25 14:14:55 +05:30
Manas Solanki
c2bf50042f validate email id only if provided (#9020) 2017-05-25 14:14:42 +05:30
Nabin Hait
ca89b6f59c Merge branch 'hotfix' 2017-05-24 18:38:33 +05:30
Nabin Hait
12ec71781d bumped to version 8.0.38 2017-05-24 19:08:33 +06:00
Manas Solanki
659a225f24 allow multiple items in purchase receipt (#8997) 2017-05-24 17:49:52 +05:30
CH
d0ebd7f7c2 POS translatable fields correction 2017-05-24 17:45:46 +05:30
Nabin Hait
adfe84b04f Revert "Website Specification Labls should not be capitalised by default (#8798)"
This reverts commit 331566d612.
2017-05-24 17:33:07 +05:30
Nabin Hait
7916590528 Revert "Update lead.py (#8789)"
This reverts commit 9283377f87.
2017-05-24 17:33:07 +05:30
Nabin Hait
fdce7a0dc3 Revert "link the different doctype in the school module (#8844)"
This reverts commit c320537e4c.
2017-05-24 17:33:07 +05:30
Nabin Hait
b3d4326dcc Revert "Prompt for mandatory batch number in POS (#8928)"
This reverts commit ce9ac7885e.
2017-05-24 17:33:07 +05:30
Nabin Hait
54fcf85317 Revert "Documentation for Allow Login using Mobile Number (#8918)"
This reverts commit 818ad397c8.
2017-05-24 17:33:07 +05:30
Nabin Hait
689da20e7b Revert "View Attachments in portal (#8830)"
This reverts commit 7e661437b1.
2017-05-24 17:33:07 +05:30
Nabin Hait
eb92d907bc Revert "Added flt to convert string to float"
This reverts commit bf4915b285.
2017-05-24 17:33:07 +05:30
Nabin Hait
0cd792ebb2 Revert "Update taxes_and_totals.py"
This reverts commit e4afab7fb0.
2017-05-24 17:33:07 +05:30
Rushabh Mehta
e4afab7fb0 Update taxes_and_totals.py 2017-05-24 17:29:23 +05:30
Ayush AS
bf4915b285 Added flt to convert string to float 2017-05-24 17:29:23 +05:30
Charles-Henri Decultot
7e661437b1 View Attachments in portal (#8830)
* View Attachments in portal

* HTML beautify correction

* Move option to shopping cart settings

* new field in shopping cart settings for public attachments display in portal
2017-05-24 17:29:23 +05:30
Gaurav Naik
818ad397c8 Documentation for Allow Login using Mobile Number (#8918) 2017-05-24 17:29:23 +05:30
Charles-Henri Decultot
ce9ac7885e Prompt for mandatory batch number in POS (#8928)
* Prompt for mandatory batch number in POS

* Whitespaces correction
2017-05-24 17:29:23 +05:30
Manas Solanki
c320537e4c link the different doctype in the school module (#8844) 2017-05-24 17:29:23 +05:30
Abdulla P I
9283377f87 Update lead.py (#8789)
* Update lead.py

Import datetime to compare next contact date with now()

* Update lead.py

* Update lead.py

As per the suggestion from Nabin,instead of Datetime,getdate and nowdate from frappe.utils imported
2017-05-24 17:29:23 +05:30
KanchanChauhan
331566d612 Website Specification Labls should not be capitalised by default (#8798) 2017-05-24 17:29:23 +05:30
mbauskar
ff70f38eac [minor] patch to delete the schools deprecated doctypes 2017-05-24 17:13:16 +05:30
mbauskar
d1552f97e4 [minor] moved a comment in item.js 2017-05-24 17:13:16 +05:30
mbauskar
baa4afd67b [minor] removed the Grade Interval and Grading Structure doctype 2017-05-24 17:13:16 +05:30
Nabin Hait
2f0c34385b Check if doctype exists before renaming 2017-05-24 17:12:07 +05:30
Nabin Hait
258f7da778 Paid amount + Write Off Amount can not be greater than Grand Total in return POS 2017-05-24 17:12:07 +05:30
Nabin Hait
799a9cabe7 Can't change valuation method in stock settings, if there are transactions against some items which does not have it's own valuation method 2017-05-24 17:11:48 +05:30
Nabin Hait
24f0b13b22 Total unpaid amount in party is based on GLE 2017-05-24 16:46:56 +05:30
Nabin Hait
2d79a641c2 Annual billing amount in party dashboard based on grand total 2017-05-24 16:46:56 +05:30
Nabin Hait
7a9bd41a72 Improved currency exchange rate message 2017-05-24 16:18:36 +05:30
Nabin Hait
cf1e0508af Merge branch 'hotfix' 2017-05-24 09:07:26 +05:30
Nabin Hait
88906cfc63 bumped to version 8.0.37 2017-05-24 09:37:26 +06:00
Nabin Hait
e72c98dafb On change of item rate, set margin amount on price list rate, instead of margin percentage (#8988) 2017-05-24 09:01:44 +05:30
Nabin Hait
f8b412ba98 Merge branch 'hotfix' 2017-05-23 17:48:42 +05:30
Nabin Hait
c8a25b6dac bumped to version 8.0.36 2017-05-23 18:18:42 +06:00
Makarand Bauskar
724cc35421 [minor] added columns to pos print_template (#8978) 2017-05-23 17:43:42 +05:30
Nabin Hait
67ae3a7f22 Merge branch 'hotfix' 2017-05-23 17:16:19 +05:30
Nabin Hait
8854f8bd50 bumped to version 8.0.35 2017-05-23 17:46:19 +06:00
Manas Solanki
fe05645051 fix issue when image not saved after attaching (#8957) 2017-05-23 17:13:26 +05:30
Faris Ansari
29d64cae34 POS print format fix (#8973) 2017-05-23 17:12:51 +05:30
Nabin Hait
84e50fe371 Merge branch 'hotfix' 2017-05-23 12:04:06 +05:30
Nabin Hait
2ef20a968c bumped to version 8.0.34 2017-05-23 12:34:05 +06:00
Nabin Hait
fdc7d7f3de Check for active quotations before declaring it as lost (#8969) 2017-05-23 12:02:34 +05:30
Manas Solanki
a68fff470c minor fix in student group (#8959) 2017-05-23 11:39:53 +05:30
Manas Solanki
552f7ab678 fix in the patch for merging the student batch and student group (#8961) 2017-05-23 11:38:57 +05:30
Faris Ansari
2424aa73d7 Fix translated string in jinja (#8956) 2017-05-22 13:09:36 +05:30
Rushabh Mehta
50835cbaa0 Merge branch 'hotfix' 2017-05-19 19:24:42 +05:30
Rushabh Mehta
f3a318921f bumped to version 8.0.33 2017-05-19 19:54:42 +06:00
rohitwaghchaure
529f5ce503 [fix] Not able to change the status as Lost in opportunity (#8938) 2017-05-19 18:56:54 +05:30
rohitwaghchaure
177a26849d [fix] Trial balance not working (#8937) 2017-05-19 18:56:25 +05:30
Rushabh Mehta
d144a4c621 Merge branch 'hotfix' 2017-05-19 18:33:55 +05:30
Rushabh Mehta
d2484ece24 bumped to version 8.0.32 2017-05-19 19:03:54 +06:00
Rushabh Mehta
04ea4910f0 [rename] zh-tw -> zh-TW 2017-05-19 18:27:53 +05:30
Rushabh Mehta
65a27395fe [minor] remove student batch name from activation.py 2017-05-19 14:53:32 +05:30
Nabin Hait
91dcd8d952 Merge branch 'hotfix' 2017-05-19 14:12:28 +05:30
Nabin Hait
4d2d996782 bumped to version 8.0.31 2017-05-19 14:42:28 +06:00
Nabin Hait
47afc55939 Merge branch 'master' of github.com:frappe/erpnext into hotfix 2017-05-19 14:10:53 +05:30
Nabin Hait
8c72fa2e4f Merge branch 'develop' 2017-05-19 14:09:00 +05:30
Nabin Hait
0096240a65 bumped to version 8.0.30 2017-05-19 14:38:59 +06:00
Makarand Bauskar
864f134610 [minor] removed the da-DK.csv translations (#8930) 2017-05-19 14:04:52 +05:30
rohitwaghchaure
81fcbbefe5 Merge pull request #8929 from rohitwaghchaure/pos_transalate_issue
[fix] _ is not defined while accessing the POS
2017-05-19 13:23:27 +05:30
Rohit Waghchaure
8a1c58c3c3 [fix] _ is not defined while accessing the POS 2017-05-19 13:01:32 +05:30
Ayush Shukla
ae696d005a Changed report_hide=0 for reference_name (#8902) 2017-05-19 12:38:08 +05:30
Prateeksha Singh
89cec18467 set variant name based on template name (frappe/erpnext#6367) (#8920) 2017-05-19 12:35:36 +05:30
Rushabh Mehta
4bcc2316a9 Don't update variant when template is updated (#8922)
* [fix] allow editing of variant properties, reverting earlier fix

* [minor] dont automatically update variants when the template is saved
2017-05-19 12:33:00 +05:30
Nabin Hait
012c9a0916 Set default account in mode-of-payment Cash, only if default cash account exists (#8909) 2017-05-19 12:30:58 +05:30
Frappe PR Bot
c080479f1f [translation] translation updates (#8927) 2017-05-19 12:30:04 +05:30
tundebabzy
a109141624 Issue 8842 (#8869)
* adds test that confirms #8842

* fixes #8842 and adds tests

* fixes new test case

* adds test for `encode_company_abbr`

* adds six as a requirement

* fixes six.moves.range import

* fixes duplicate company used in test

* fresh commit of test

* fixes failing test - company not saving

* fixes failing test

* Revert "adds six as a requirement"

This reverts commit 80454d98dc.

* replaces whitespace indentation with tabs
2017-05-19 11:42:45 +05:30
Prateeksha Singh
064530d11f [minor] remove order_type as setter in multiselect (#8906) 2017-05-19 11:09:12 +05:30
Rushabh Mehta
6799e27390 [fix] chart of accounts root sorting, #8784, #8897 (#8904) 2017-05-18 16:21:21 +05:30
Rushabh Mehta
c6d75eb942 [fix] allow editing of variant properties, reverting earlier fix (#8905) 2017-05-18 16:21:01 +05:30
Nabin Hait
83f8344e62 Merge branch 'master' of github.com:frappe/erpnext into hotfix 2017-05-18 14:06:37 +05:30
Nabin Hait
ee59ecd396 Merge branch 'hotfix' of github.com:frappe/erpnext into hotfix 2017-05-18 14:06:06 +05:30
gmplab
7607cc9dfa try to fix #997 ,when cart is disabled, it will not show error and it will dedirect to 'contact' page (#8636) 2017-05-18 12:41:19 +05:30
Frappe PR Bot
32e453b8eb [translation] translation updates (#8867) 2017-05-18 12:35:26 +05:30
Nabin Hait
b32cf35fe5 Merge branch 'develop' 2017-05-18 12:01:54 +05:30
Nabin Hait
9422f69fdf bumped to version 8.0.29 2017-05-18 12:31:53 +06:00
Nabin Hait
61ac683847 Fixed chart of accounts for Indonesia (#8900) 2017-05-18 11:58:38 +05:30
Nabin Hait
8fac2ad183 Don't set batch nos automatically on saving, if already set and validate qty with batch (#8887) 2017-05-18 11:54:24 +05:30
Omar Jaber
52e1ba7714 update throw message in maintenance_schedule.py (#8896)
updating Throw message
2017-05-18 11:53:26 +05:30
Nabin Hait
08ea710c8f Minor fix in creating chart of accounts based on existing (#8890) 2017-05-17 19:43:12 +05:30
Nabin Hait
4b544347a9 Hide 'Edit Posting Time' from printing (#8888) 2017-05-17 19:42:38 +05:30
Francisco Roldán
85bfc05efa Fix missing translations (#8871)
* Fix missing translations

* Fix
2017-05-17 19:42:04 +05:30
Nabin Hait
e4f80a6eaa Open lost opportunity again if quotation made against it (#8854) 2017-05-17 19:41:39 +05:30
Rushabh Mehta
f69ffeb0b4 [fix] if rate is greater than price_list_rate, set margin instead of discount. Fixes frappe/erpnext#6468 (#8856) 2017-05-17 19:40:40 +05:30
Faris Ansari
f7a9023fda Show empty state when no students are found in student attendance tool (#8862)
- fixes #8839
2017-05-17 19:37:31 +05:30
Julian Robbins
3d6567411d Spelling improvmement (#8866) 2017-05-17 19:36:15 +05:30
Felipe Orellana
0952df29dc Update product.py (#8877)
Hi!

If template_item_code is None on line 71-72 the query will return ALL "Item Price" records irrespective of item_code, potentially causing the wrong price list rate to be used.

Noticed this behavior when fetching product price for a group of items without "variant_of" data.
2017-05-17 19:20:01 +05:30
Ayush Shukla
76d965f340 [minor]-Changed receivable to payable (#8880) 2017-05-17 19:18:47 +05:30
Ayush Shukla
c55b805b66 [minor] process_payroll_create salary fixed, fixes frappe/erpnext#8853 (#8881)
* [minor] process_payroll_create salary fixed

* [minor] indentation fix
2017-05-17 19:18:26 +05:30
tundebabzy
cf7df5d106 fixes #8883 (#8885) 2017-05-17 19:17:04 +05:30
Sagar Vora
3b04b030eb Fix cost center not getting pulled in DN and SINV (#8878)
* Fixes for getting selling cost center instead of company's default cost center.

* fix error in update_item
2017-05-17 19:16:27 +05:30
Nabin Hait
67ddcf9d32 Merge branch 'develop' 2017-05-17 13:54:04 +05:30
Nabin Hait
def2e4678c bumped to version 8.0.28 2017-05-17 14:24:04 +06:00
Nabin Hait
1e2d7b3519 Filters for multiselect dialog for DN/PR in Sales/Purchase Invoice (#8882) 2017-05-17 13:52:21 +05:30
Nabin Hait
3bd15fb19e Merge branch 'develop' 2017-05-16 13:39:42 +05:30
Nabin Hait
a282c13d84 bumped to version 8.0.27 2017-05-16 14:09:41 +06:00
rohitwaghchaure
a689432a6e [fix] Can't update naming series if format has year,month (#8836) 2017-05-16 12:47:34 +05:30
rohitwaghchaure
3da400b532 [fix] Due Date cannot be before Posting Date during amendement of an invoice (#8841) 2017-05-16 12:43:18 +05:30
Nabin Hait
8a27cf3785 Fix status of invoices with negative outstanding, if no return entry (#8829)
* Move allowance field in Item to the first section to apply it for both stock and non-stock items

* Fix status of invoices with negative outstanding, if no return entry

* get_value included in safe_eval
2017-05-16 12:43:00 +05:30
rohitwaghchaure
73456ac81a [fix] Payments on the invoice is showing even if IS POS option is disabled (#8802) 2017-05-16 11:29:57 +05:30
Saurabh
aa1be1ce92 [documentaion] stripe documentation (#8780) 2017-05-16 09:30:07 +05:30
rohitwaghchaure
654f186f95 [fix] Apply pricing rule on the item based on quantity as per stock uom (#8792) 2017-05-16 08:54:29 +05:30
rohitwaghchaure
09483d3c0f [fix] Numeric keypad not displaying after creation of new customer (#8797) 2017-05-16 08:51:24 +05:30
Makarand Bauskar
5886aafbae [minor] removed cur_frm and added frappe.ui.form.on (#8803) 2017-05-16 08:35:39 +05:30
Charles-Henri Decultot
156eef1907 Description correction (#8811) 2017-05-16 08:34:33 +05:30
Faris Ansari
74e2e4672c Fix for duplicated project dependencies (#8817)
- skip when task is not found
2017-05-16 08:32:45 +05:30
Saurabh
f4ee682400 [fix] pass company filter as string in get_value (#8823) 2017-05-16 08:30:27 +05:30
Makarand Bauskar
475d140b5c [minor] made items table mandatory for quotation (#8825) 2017-05-16 08:26:21 +05:30
Ishan Loya
bdb2f95957 Show duplicate button in BOM unless in draft stage (#8826) 2017-05-16 08:25:07 +05:30
Makarand Bauskar
3e2c9d00f1 [minor] Corrected field label & placed Expense Claim button in Next Step (#8828) 2017-05-16 08:22:45 +05:30
rohitwaghchaure
d678809939 [fix] Party balance field showing wrong currency symbol (#8832) 2017-05-16 08:06:45 +05:30
Manas Solanki
59472e5449 Changes in the student group creation tool (#8833) 2017-05-16 08:05:14 +05:30
Manas Solanki
c5f79d2ec4 Fix for the student batch-wise attendance report (#8834) 2017-05-16 08:00:24 +05:30
Makarand Bauskar
b0df661e81 [minor] set set_posting_time to 1 while data import (#8835) 2017-05-16 07:59:58 +05:30
Rushabh Mehta
939db36ad4 [fix] copy item variant values on save and make non no_copy fields as not editable. fixes frappe/erpnext#4253 (#8837) 2017-05-16 07:42:44 +05:30
Faris Ansari
4fcd8a6db3 Fix sales funnel legend position (Fixes #5073) (#8838) 2017-05-16 07:40:26 +05:30
Faris Ansari
769b6bada8 [POS] Add Pay menu item in mobile view (#8801) (#8845) 2017-05-16 07:31:10 +05:30
Faris Ansari
125996e21c Increase item cart height in mobile view (Fixes #8827) (#8846) 2017-05-16 07:29:15 +05:30
Nabin Hait
7bf810300e Fixed #8822, active students patch 2017-05-15 11:42:37 +05:30
Prateeksha Singh
edeb4dc7e0 Multiselect dialog for getting items (#8583)
* Concatenate docnames and send to mapper

* Multiselect with checkboxes

* set setters as separate filters

* Map filter fields to target_doc

* Get items from quotation (in SO) working

* [major] Set dialog setters for all forms

* Add date field

* Specify non-default date_fields

* [minor] add test_mapper.py

* [minor] remove cur_frm

* [minor][fix] test

* [minor] fix test with make_test_records
2017-05-15 11:32:06 +05:30
Julian Robbins
62e3e75555 Addition of Imap to description of usable mail accounts (#8806) 2017-05-13 09:55:23 +05:30
Saurabh
154385db1b Merge branch 'develop' 2017-05-13 07:42:03 +05:30
Saurabh
82e303882e bumped to version 8.0.26 2017-05-13 08:12:03 +06:00
Saurabh
b679533f81 Merge pull request #8815 from saurabh6790/activation_status_fix
[fix] rename Student Batch to Student Batch Name in activation check
2017-05-13 07:08:02 +05:30
Saurabh
45540569ff [fix] rename Student Batch to Student Batch Name in activation check 2017-05-13 06:30:41 +05:30
Makarand Bauskar
d4e15ca359 [minor] create student batch if does not exists (#8781)
* [minor] create student batch if does not exists

* [fix] minor fixes in if condition
2017-05-12 11:23:58 +05:30
Makarand Bauskar
e8270fe21c [fix] minor fix in get_context for item variants (#8791) 2017-05-12 11:23:23 +05:30
Saurabh
62c7deee00 [fix] don't allow string values in limits to avoid sql injection (#8779) 2017-05-11 18:03:12 +05:30
Nabin Hait
fcefc601e0 Merge branch 'develop' 2017-05-11 17:06:56 +05:30
Nabin Hait
b579fd7ada bumped to version 8.0.25 2017-05-11 17:36:56 +06:00
Nabin Hait
4f5ad50ecf Item Rate in Sales Return must be less than or equal to reference doc (#8775)
* Item Rate in Sales Return must be less than or equal to reference doc

* Fix as rate field is not there in Packed Item
2017-05-11 16:44:19 +05:30
Nabin Hait
5ad6126832 On saving of Accounts Settings, only save enabled warehouses (#8772) 2017-05-11 13:34:04 +05:30
Nabin Hait
62d27ab7d3 Reload doctype bewfore renaming margin fields (#8771) 2017-05-11 13:26:55 +05:30
KanchanChauhan
f74010d379 Calculations based on working and payment days should be made if salary structure exists (#8770) 2017-05-11 11:42:35 +05:30
Makarand Bauskar
0e4c5c9efb [minor] renamed a Total Margin field to Rate With Margin (#8720)
* [minor] renamed a Total Margin field to Rate With Margin

* [minor] minor fixes in field lable
2017-05-11 11:40:02 +05:30
Faris Ansari
734d7795f8 Show party name in General Ledger print report (#8760) 2017-05-11 11:38:30 +05:30
Makarand Bauskar
464f108586 [minor] added currency in Totals for Trial Balance report (#8757)
* [minor] added currency in Totals for Trial Balance report

* [minor] used erpnext.get_default_currency to fetch the company currency
2017-05-10 19:40:36 +05:30
KanchanChauhan
323e46ba5a Added parent filter to the Salary Structure Employee since it was getting base and variable value from first found Salary Structure Employee (#8756) 2017-05-10 17:46:32 +05:30
Makarand Bauskar
62414565b1 [minor] added the address_html field in company doctype (#8754) 2017-05-10 14:52:03 +05:30
Manas Solanki
426b8a14fd Merge the student group and student batch (#8663)
* deleted student batch creation tool

* Patch for deleting the doctype and config

* Changes in the student attendance

* Patch for renaming the student batch as student group

* Changes in the student attendance

* Change in the student attendance reports

- Absent student report
- Student Batch-wise attendance
- Student monthly attendance sheet

* Changes in the patch

* Changes in the course schedule

* Changes in the course scheduling tool

* Change in the assessment plan

* Changes in the assessment result tool

* Cleanup

* Changes in the api.py

* create student group from student batch

* delete student batch

* add patch

* remove student batch from config/schools.py

* Delete the depricated doctype with patch

* Changes in patch

* Changes as per PR
2017-05-09 15:32:52 +05:30
Nabin Hait
0d0d3bacd7 Merge branch 'develop' 2017-05-09 15:13:32 +05:30
Nabin Hait
70e1778712 bumped to version 8.0.24 2017-05-09 15:43:32 +06:00
Nabin Hait
4e6ff8ccd8 Ignore permission for Bin in warehouse query (#8742) 2017-05-09 15:09:10 +05:30
Rushabh Mehta
95233a62d7 [minor] item route item_name + random string 2017-05-09 07:48:41 +05:30
Nabin Hait
226ea7db88 Filter issue on timesheet calendar view (#8730) 2017-05-08 17:34:07 +05:30
Saurabh
9df45bbc42 [fix] Reference Document is required to create Payment Request (#8729)
* [fix] Referene Document is required to create Payment Request

* Update payment_request.py
2017-05-08 17:24:23 +05:30
Rushabh Mehta
a6bc583daf [minor] item route is item name + code 2017-05-08 11:35:40 +05:30
Nabin Hait
3f7fff04f4 Merge branch 'develop' 2017-05-06 13:40:52 +05:30
Nabin Hait
b5a9822fff bumped to version 8.0.23 2017-05-06 14:10:52 +06:00
Nabin Hait
17179ee83a minor syntax fix 2017-05-06 13:23:12 +05:30
Ishan Loya
120ee275cc Fix typo (#8719) 2017-05-06 12:48:22 +05:30
Makarand Bauskar
486045e1d1 [minor] check if date of joining is available before creating Salary Slip (#8700) 2017-05-06 12:47:42 +05:30
Nabin Hait
3257aeeb55 Price list rate fix multiple uom and validation with prev doc (#8718) 2017-05-06 12:47:14 +05:30
Nabin Hait
7228e1af6e Customer/Supplier Name in sales/purchase analytics (#8717) 2017-05-06 12:45:37 +05:30
Nabin Hait
6e7407962f Get exchange rate only if date and currency is present (#8712)
* Get exchange rate only if date and currency is present

* Update transaction.js
2017-05-06 12:45:16 +05:30
Rushabh Mehta
b7e740ff45 [minor] ignore permissions for bin on warehouse_query (#8713) 2017-05-06 12:44:03 +05:30
Dominik Ottenbreit
51cd2df763 Fix Romanian Translation (#8706) 2017-05-05 17:30:45 +05:30
Pawan Mehta
cac94b9bd5 [fix] #8373 (#8707) 2017-05-05 17:29:57 +05:30
Manas Solanki
65c8466622 check for mandatory field before frappe.call (#8705) 2017-05-05 17:28:09 +05:30
Nabin Hait
42343bbc2c Selling price validation against last purchase rate / valuation rate (#8702) 2017-05-05 17:23:17 +05:30
KanchanChauhan
ed56b8afd8 Website route for item based on name not item name (#8682) 2017-05-05 11:56:55 +05:30
Makarand Bauskar
6b3bc8a8e1 [hotfix] fixed the recursion error while saving the User (#8696) 2017-05-05 11:53:00 +05:30
Makarand Bauskar
c4ec937835 [hotfix] fixed object has no attribute 'delivered_by_supplier' (#8699) 2017-05-05 11:52:17 +05:30
Nabin Hait
d2a966eef3 Update general_ledger.py 2017-05-05 10:41:16 +05:30
rohitwaghchaure
6324987c15 [fix] Company's abbreviation change will not update the warehouse (#8685) 2017-05-04 16:12:29 +05:30
Nabin Hait
c9bfb64cd9 Merge branch 'develop' 2017-05-04 12:20:31 +05:30
Nabin Hait
8470b39d4c bumped to version 8.0.22 2017-05-04 12:50:31 +06:00
Nabin Hait
932423ecba Balance Sheet always shows accumulated values from previous fiscal year (#8668) 2017-05-04 12:12:29 +05:30
Faris Ansari
1c09a991f3 Change beta_version to 8.x-beta (#8673)
* Change beta_version to 8.x-beta

* change to 8.x.x-beta
2017-05-04 12:12:14 +05:30
Nabin Hait
fcc0246b38 Get mobile nos for customer contact (#8674) 2017-05-04 12:11:48 +05:30
Nabin Hait
3ce41d6b1f Fixed related to auto fetching batch nos and date valiation in salary structure (#8666)
* Fixed related to auto fetching batch nos and date valiation in salary structure

* Update get_item_details.py
2017-05-03 18:22:24 +05:30
Javier Wong
470535ae9b Removed set_default_roles
set_default_roles was removed in 7fff0908a4

It is not required anymore. It currently breaks the patch.
2017-05-03 16:44:14 +05:30
rohitwaghchaure
a1923574c6 Merge pull request #8657 from rohitwaghchaure/pos_email_id_issue
[fix] Contact not creating if only email id has entered in the POS
2017-05-03 12:56:13 +05:30
Nabin Hait
ef027e9030 Correct args to the fmt_money function 2017-05-03 11:51:47 +05:30
Aditya Duggal
bd8c7d683b Website related fields now consider show_variant_in_website field as well
-Resolves issue #8635
2017-05-03 10:14:09 +05:30
Rohit Waghchaure
fd37516165 [fix] Contact not creating if only email id has entered in the POS 2017-05-02 18:27:09 +05:30
Nabin Hait
504eba7fb2 Test case fixed for Employee Loan Application 2017-05-02 18:19:48 +05:30
Nabin Hait
e15721df48 Caluculate total interest and payable amount in Loan Application if fixed amount per period 2017-05-02 18:19:48 +05:30
mbauskar
c482aeda1a [fixes] added missing get_linked_material_requests method to buying utils 2017-05-02 14:05:54 +05:30
rohitwaghchaure
8811cc6b5b Merge pull request #8651 from rohitwaghchaure/pos_default_customer_issue
[fix] Default pos profile's customer not working for the POS
2017-05-02 13:18:40 +05:30
Rohit Waghchaure
61165127fc [fix] Default pos profile's customer not working for the POS 2017-05-02 13:04:08 +05:30
Nabin Hait
d71a1c5e67 Merge branch 'develop' 2017-05-02 09:58:48 +05:30
Nabin Hait
fb73621db2 bumped to version 8.0.21 2017-05-02 10:28:48 +06:00
Rohit Waghchaure
3df7eef6cc [fix] Unable to create an asset due to rounding issue 2017-05-02 09:49:02 +05:30
akshay
b674d27285 Test Cleanup 2017-05-02 09:48:51 +05:30
akshay
949fbc559e Serial No Rename 2017-05-02 09:48:51 +05:30
Nabin Hait
1117125841 Update domainify.py 2017-05-01 11:40:13 +05:30
mbauskar
e94c6e7b8e [minor] disabled the instructor role if the company domain is not Education 2017-05-01 11:40:13 +05:30
Rushabh Mehta
c75becc42c [minor] README.md and CONTRIBUTING.md 2017-04-28 16:09:57 +05:30
Rushabh Mehta
ed5543adda [minor] README.md and CONTRIBUTING.md 2017-04-28 16:07:36 +05:30
Nabin Hait
a1c23a584d Merge branch 'develop' 2017-04-28 15:34:59 +05:30
Nabin Hait
589927b37d bumped to version 8.0.20 2017-04-28 16:04:58 +06:00
Nabin Hait
2afb9b96cd pricing rule fix 2017-04-28 15:20:49 +05:30
Nabin Hait
8c9fb76854 Remove pricing rules if 'Ignore Pricing Rule' manually triggered 2017-04-28 15:20:49 +05:30
Manas Solanki
0da9bc6309 Fix for program enrollment 2017-04-28 14:37:25 +05:30
Manas Solanki
5a8a5b7d06 Fixes in Student Group 2017-04-28 14:37:25 +05:30
Manas Solanki
71373a176d Configurable validation setting for the student group 2017-04-28 14:37:25 +05:30
mbauskar
1b6270ef40 [hotfix] error while sending the auto email report of Ordered Items To Be Delivered 2017-04-28 14:35:18 +05:30
Rohit Waghchaure
ac28ffb41e [fix] frappe.db.exists('Series', series) is not working because tabSeries table did not have column modified 2017-04-28 14:34:11 +05:30
Rohit Waghchaure
0e6ac8b9b4 Enabled option User Cannot Search for the gl entry doctype 2017-04-28 10:03:18 +05:30
Rohit Waghchaure
07ef5f42c4 [enhance] Show notification for draft state records if doctype is submittable 2017-04-28 09:59:29 +05:30
Nabin Hait
7b04f092a6 Fixed test cases 2017-04-28 09:58:41 +05:30
Nabin Hait
c98f37f91c Patch for reverting manufacturers table from item 2017-04-28 09:58:41 +05:30
Nabin Hait
b6a8920489 Fixed conflict 2017-04-28 09:58:41 +05:30
Nabin Hait
f26dcbc1a6 Merge branch 'develop' 2017-04-26 14:45:37 +05:30
Nabin Hait
ecd46588ec bumped to version 8.0.19 2017-04-26 15:15:37 +06:00
Nabin Hait
96c247c834 Pick batch autmatically only if batch found 2017-04-26 14:37:33 +05:30
Nabin Hait
db8f41ba55 Added Payment documents as Quick Links in SO/PO 2017-04-26 14:34:41 +05:30
Nabin Hait
f7d81c7a7f Merge branch 'develop' 2017-04-25 20:44:54 +05:30
Nabin Hait
5b73a4864a bumped to version 8.0.18 2017-04-25 21:14:54 +06:00
Nabin Hait
85622f9ccb Update update_status_as_paid_for_completed_expense_claim.py 2017-04-25 20:43:29 +05:30
pawan
c27d9f712b Add Report Links 2017-04-25 20:12:55 +05:30
Umair Sayyed
175646572a updated help pages 2017-04-25 16:27:50 +05:30
Nabin Hait
7cfacb315b Merge branch 'RicardoJohann-accumulated_header_std' into develop 2017-04-25 16:26:53 +05:30
Nabin Hait
d5d8db7a3f Cleanup on financial statement PR 2017-04-25 16:26:33 +05:30
Nabin Hait
39bcb3de4b Merge branch 'accumulated_header_std' of https://github.com/RicardoJohann/erpnext into RicardoJohann-accumulated_header_std 2017-04-25 16:13:54 +05:30
Ishan Loya
09fe8e0522 Add bank guarantee to Accounts module display screen 2017-04-25 16:08:22 +05:30
Ishan Loya
17737e4ab1 Change permissions, change account fieldname and add notes section 2017-04-25 16:08:22 +05:30
Ishan Loya
2fca72ae8e Change owner 2017-04-25 16:08:22 +05:30
Ishan Loya
0dbe8547e7 Add screenshot to documentation, change naming series to BG-#####, make Bank Guarantee number unique 2017-04-25 16:08:22 +05:30
Ishan Loya
e1ed5ba726 Remove commented out code 2017-04-25 16:08:22 +05:30
Ishan Loya
0fc57a7df2 Change doctype owner 2017-04-25 16:08:22 +05:30
Ishan Loya
c7a72684fd Add bank guarantee doctype with documentation 2017-04-25 16:08:22 +05:30
Nabin Hait
e0c34bfd77 Merge branch 'PawanMeh-fixes_8466' into develop 2017-04-25 16:05:28 +05:30
Nabin Hait
020dedd00e Cleaned up and commonified the campaign efficiency and lead owner efficiency report 2017-04-25 16:05:01 +05:30
Nabin Hait
28dad095fa Merge branch 'fixes_8466' of https://github.com/PawanMeh/erpnext into PawanMeh-fixes_8466 2017-04-25 15:00:45 +05:30
Nabin Hait
e7125c0ea2 Merge branch 'develop' 2017-04-25 14:30:50 +05:30
Nabin Hait
8590d5b05d bumped to version 8.0.17 2017-04-25 15:00:50 +06:00
sburanaw
66951e528f Fix an import typo in get_item_details.py 2017-04-25 14:09:51 +05:30
Nabin Hait
9b20e07431 [fix] currency field precision 2017-04-25 14:09:29 +05:30
Manas Solanki
d7afa69c6f fix 2017-04-25 14:08:43 +05:30
Manas Solanki
c61dc9c7ea Change in the assessment tool 2017-04-25 14:08:43 +05:30
mbauskar
9cf6d630e9 [minor] fixes for expense claim status 2017-04-25 13:15:50 +05:30
Faris Ansari
5687e2da9d [ui-fix] POS item list 2017-04-24 19:22:05 +05:30
Nabin Hait
e3c122d8c4 AR report: filter based on customer group and credit days based on field. Fixed #8214 2017-04-24 19:06:07 +05:30
Nabin Hait
4cc5e61f60 Update course_schedule.py 2017-04-24 19:00:49 +05:30
Manas Solanki
6293263095 test case fixed 2017-04-24 19:00:49 +05:30
Manas Solanki
810e483757 Changes in the student group 2017-04-24 19:00:49 +05:30
Nabin Hait
398f144833 Merge branch 'develop' 2017-04-24 18:59:01 +05:30
Nabin Hait
e2741e85fd bumped to version 8.0.16 2017-04-24 19:29:01 +06:00
Rohit Waghchaure
dd70fbfdae [fix] Letter head not showing in the report 2017-04-24 18:57:51 +05:30
Manas Solanki
6eaf281b2b Export and import program enrollments 2017-04-24 18:44:12 +05:30
pawan
134487ab2a Changes after review 2017-04-24 13:48:40 +05:30
pawan
7bd7df3742 Changes after review 2017-04-24 13:19:22 +05:30
Ishan Loya
56c1b2a625 Make proposed corrections 2017-04-24 10:44:36 +05:30
Ishan Loya
b12e15dcc4 Change modified by 2017-04-24 10:44:36 +05:30
Ishan Loya
e5fdd47fd8 Hide 'Qty Transferred for Manufacturing' field if skip material transfer 2017-04-24 10:44:36 +05:30
Ishan Loya
04c69fb46d Minor fix 2017-04-24 10:44:36 +05:30
Ishan Loya
f04ef8dfe0 Update documentation for Production Order skipping material transfer entry option 2017-04-24 10:44:36 +05:30
Ishan Loya
7544904857 Add option to skip material transfer for production orders 2017-04-24 10:44:36 +05:30
Rushabh Mehta
c44910370b [fix] is_sample_item 2017-04-24 10:28:38 +05:30
Rushabh Mehta
551406ab11 [enhance] automatic batch selection in Delivery Note and Stock Entry 2017-04-24 10:28:38 +05:30
Rushabh Mehta
e385b5b97b [enhance] automatic batch creation, move and split 2017-04-24 10:28:38 +05:30
mbauskar
bb2670d57a [fixes] minor fixes in bank reconciliation form and report 2017-04-24 10:23:50 +05:30
mbauskar
0b293133be [minor] fixes for unsupported operand type(s) for +=: 'int' and 'NoneType' 2017-04-21 21:40:30 +05:30
ibi
83c1c3a171 fleet_management: replace references to fleet_management by hr in vehicle_log doctype 2017-04-21 17:57:07 +05:30
mbauskar
c3d642e5d1 [minor] allow bulk edit for doctype 2017-04-21 17:50:40 +05:30
Manas Solanki
8230ce095f [Fix] fixed routing to the assessment result 2017-04-21 17:49:52 +05:30
Nabin Hait
e713a7d840 Merge branch 'develop' 2017-04-21 11:49:09 +05:30
Nabin Hait
557847a5ba bumped to version 8.0.15 2017-04-21 12:19:09 +06:00
mbauskar
9bac58cdc6 [fixes] fixes in setup wizard for education domain 2017-04-21 11:38:28 +05:30
Nabin Hait
5650bf9ba5 Merge branch 'develop' 2017-04-20 08:51:44 +05:30
Nabin Hait
9afb53203f bumped to version 8.0.14 2017-04-20 09:21:44 +06:00
Nabin Hait
825e053e66 Fixed project_copied_from patch 2017-04-20 08:50:37 +05:30
Nabin Hait
3e519770de Merge pull request #8505 from nabinhait/develop
Fixed allow_zero_valuation_rate patch
2017-04-20 08:46:30 +05:30
Nabin Hait
e42fb32f6f Fixed allow_zero_valuation_rate patch 2017-04-20 08:45:18 +05:30
Nabin Hait
00bec1c272 Merge pull request #8504 from nabinhait/allow_on_submit_fix
Fixes allowed on submit
2017-04-19 21:11:13 +05:30
Nabin Hait
68ae9f3f88 Merge branch 'develop' into allow_on_submit_fix 2017-04-19 21:10:23 +05:30
mbauskar
8f3cc81302 [minor] minor fixes in pricing_rule and set_missing_value 2017-04-19 21:05:37 +05:30
mbauskar
9e9d242a24 [minor] fixes in test cases and added the test case for multiple uom in selling 2017-04-19 21:05:37 +05:30
mbauskar
287fe81329 [minor] calculate price list rate based on items uom 2017-04-19 21:05:37 +05:30
Nabin Hait
24053478a1 Merge pull request #8486 from nabinhait/develop
Asset Depreciation Enhancements
2017-04-19 21:01:34 +05:30
Nabin Hait
f382373cf4 Merge branch 'develop' into develop 2017-04-19 21:01:19 +05:30
CH
61f4a8e757 Make the address type translatable in the Address_HTML field 2017-04-19 20:58:53 +05:30
Nabin Hait
eef55185fc Update purchase_receipt_item.json 2017-04-19 20:58:09 +05:30
Nabin Hait
8691e0777b Update purchase_invoice_item.json 2017-04-19 20:58:09 +05:30
Nabin Hait
2de3bf7a0f Fixed indexes on sales and purchase transactions 2017-04-19 20:58:09 +05:30
Julian Robbins
2e6f12b850 Update purchase-details.md 2017-04-19 20:55:04 +05:30
mbauskar
ba41242f1f [fixes] fixed the pricing rule issue https://github.com/frappe/erpnext/issues/8493 2017-04-19 20:54:23 +05:30
Kanchan Chauhan
0633df5872 Item variant searchable in website products 2017-04-19 20:51:43 +05:30
Rohit Waghchaure
f4f774d1df [fix] offline_pos_name is not defined during print from the POS 2017-04-19 20:50:35 +05:30
Faris Ansari
695327a513 Duplicate dependencies when project is duplicated
- fix frappe/erpnext#8274
2017-04-19 20:48:49 +05:30
Rohit Waghchaure
019501e4a0 [fix] Balance Sheet, linking account to general ledger is not working 2017-04-19 20:46:30 +05:30
Nabin Hait
2704162f5a Fixes allowd on submit 2017-04-19 16:25:39 +05:30
Nabin Hait
117be7ddd5 Added a settings in Accounts Settings to disable booking depreciation entry automatically 2017-04-18 14:03:06 +05:30
Nabin Hait
f59920500c Merge branch 'develop' of github.com:nabinhait/erpnext into develop 2017-04-18 13:13:38 +05:30
Nabin Hait
8a01980757 Unlink Journal Entry reference from Asset 2017-04-18 13:11:10 +05:30
mbauskar
5123a8519b [minor] check if joining date is available before validating attandance date 2017-04-18 11:08:57 +05:30
Rohit Waghchaure
d7de3c606b [fix] Pricing rule for pos 2017-04-17 17:32:36 +05:30
Rohit Waghchaure
dc981dc546 [fix] Auto serial no fecthed on the invoice even if stock update is disabled issue 2017-04-17 17:31:32 +05:30
Nabin Hait
ed019123e2 Merge branch 'develop' 2017-04-17 15:36:59 +05:30
Nabin Hait
4d1cf53466 bumped to version 8.0.13 2017-04-17 16:06:58 +06:00
Nabin Hait
e2431fd5e9 minor fix 2017-04-17 15:35:36 +05:30
Nabin Hait
d12a4f5e8c Merge branch 'develop' 2017-04-17 15:12:18 +05:30
Nabin Hait
ad65be8250 bumped to version 8.0.12 2017-04-17 15:42:17 +06:00
Manas Solanki
ae30026005 Calender view fix for course schedule 2017-04-17 14:55:54 +05:30
Manas Solanki
54c4240d9c Changes in the program enrollment 2017-04-17 14:55:54 +05:30
Manas Solanki
79683d0871 Added school setting 2017-04-17 14:55:54 +05:30
Manas Solanki
a6d1876958 Changes in course and program 2017-04-17 14:55:54 +05:30
Manas Solanki
346928f2bc changes in program enrollment and tool 2017-04-17 14:55:54 +05:30
Nabin Hait
310d238d17 Merge pull request #8460 from rohitwaghchaure/client_followup_report
Client followup report
2017-04-17 14:13:38 +05:30
Nabin Hait
5e25731188 Update crm_reports.md 2017-04-17 14:13:20 +05:30
Nabin Hait
83ca262e38 Merge pull request #8453 from StrellaGroup/develop
[fix] Stock Entry - Change "Is Sample Item" to "Allow Zero Valuation Rate"
2017-04-17 14:00:12 +05:30
mbauskar
8a2e6f427b [minor] if address is not found then set the address_field to '' instead of None 2017-04-17 13:58:52 +05:30
Faris Ansari
8371c1c4cd Text overflow fix for product text in portal 2017-04-17 13:57:19 +05:30
Julian Robbins
361e7f6ddc Remove typos and use better English 2017-04-17 13:56:53 +05:30
rohitwaghchaure
798fd3484f Merge pull request #8469 from mbauskar/pos-fixes
[minor] POS & RFQ format_number fixes
2017-04-17 13:04:24 +05:30
mbauskar
22cedeb006 [minor] POS & RFQ format_number fixes 2017-04-17 12:24:24 +05:30
pawan
83c8ed0827 ”[fix] 2017-04-17 01:02:56 +05:30
Rushabh Mehta
e3c117e32c [fix] validate preferred email if set in employee.py 2017-04-15 16:59:39 +05:30
Nabin Hait
68a8b0c2a9 Merge branch 'develop' 2017-04-14 17:32:37 +05:30
Nabin Hait
307543f968 bumped to version 8.0.11 2017-04-14 18:02:37 +06:00
Rohit Waghchaure
6681b0d2aa Documentation 2017-04-14 17:14:03 +05:30
Javier Wong
54d9c9eaf4 Merge branch 'develop' into develop 2017-04-14 18:33:44 +08:00
Javier Wong
9b11d9b45d [fix] Stock Entry - Change "Is Sample Item" to "Allow Zero Valuation Rate" 2017-04-14 18:24:04 +08:00
mbauskar
cca55ddc33 [minor][hot] fixes for KeyError: from_date for stock balance report 2017-04-14 14:54:11 +05:30
Rohit Waghchaure
1c68509426 [enhance] Report for prospects engaged but not converted 2017-04-14 12:28:59 +05:30
mbauskar
1e05077b1f [minor] sales register report fixes 2017-04-14 09:59:49 +05:30
joezsweet
b81244342f Create en-GB.csv
- added for compatibility with frappe languages
2017-04-13 19:09:06 +05:30
CH
8e92250798 Correction of issue #8354 2017-04-13 18:59:51 +05:30
CH
d20ec25c92 Removal of double brackets to setup the chart of accounts in the setup wizard 2017-04-13 18:59:06 +05:30
Nabin Hait
25bcb14c1d Merge pull request #8440 from mbauskar/cart-fixes
[minor] fides for add to card button issue
2017-04-13 18:49:22 +05:30
Nabin Hait
f6149f1507 Merge pull request #8429 from ckosiegbu/payroll_updates
Statistical Components for Salary Structure
2017-04-13 18:48:47 +05:30
Nabin Hait
2f3585f949 Update salary_slip.js 2017-04-13 18:47:25 +05:30
mbauskar
ed8ad9cfee [minor] fides for add to card button issue 2017-04-13 18:45:09 +05:30
Nabin Hait
3a2727c9eb Merge pull request #8430 from mbauskar/stock-entry-supplier-address
[minor] fetch supplier address, address_display on supplier trigger
2017-04-13 18:45:09 +05:30
Nabin Hait
16d92e7270 Update update_supplier_address_in_stock_entry.py 2017-04-13 18:44:33 +05:30
Nabin Hait
8c7eb444ef Merge pull request #8439 from mbauskar/subsciption-fixes
[minor] validate email address before get update button click
2017-04-13 18:41:49 +05:30
mbauskar
9a0efc7710 [minor] validate email address before get update button click 2017-04-13 18:18:18 +05:30
mbauskar
3ddfce4f17 [patch] move supplier_address to address_display and set supplier_address in SE 2017-04-13 16:46:41 +05:30
ckosiegbu
a236f4e586 Space to Tabs on salary_slip.py 2017-04-13 10:28:10 +01:00
Nabin Hait
0b62c6ebd4 Merge pull request #8432 from mbauskar/bom-tree-fixes
[minor] fixes in bom tree view template
2017-04-13 14:36:45 +05:30
mbauskar
40ca4c3bbb [minor] fixes in bom tree view template 2017-04-13 14:29:19 +05:30
Nabin Hait
c454dc7af5 Merge pull request #8420 from netchampfaris/pos
[POS] Show stock quantity of items
2017-04-13 13:26:58 +05:30
Rushabh Mehta
994cef5ee3 [minor] fix imports in old patches 2017-04-13 13:14:05 +05:30
Faris Ansari
185762aeeb update label 2017-04-13 12:36:08 +05:30
mbauskar
1b32d913a2 [minor] fetch supplier address, address_display on supplier trigger 2017-04-13 11:55:20 +05:30
ckosiegbu
64f29f819a Introduce the ability to specify in a Salary Structure that a component is statistical. This allows components to be used in calculations without being added/deducted from earnings deductions. 2017-04-13 00:00:37 +01:00
Nabin Hait
2efe05c1ce Merge pull request #8263 from frappe/revert-8126-issue8094
Revert "Add link field Package Code (fixes #8094)"
2017-04-12 19:50:43 +05:30
Nabin Hait
17c675547d Merge branch 'develop' 2017-04-12 19:00:52 +05:30
Nabin Hait
a220e96867 bumped to version 8.0.10 2017-04-12 19:30:52 +06:00
mbauskar
e471b02172 [minor] if packed item warehouse not found then set the parent item warehouse to packed items 2017-04-12 18:51:01 +05:30
Faris Ansari
19f90e984e [POS] Show stock quantity of items
- frappe/erpnext#8247
2017-04-12 16:06:31 +05:30
Faris Ansari
b5608f9b14 [fix] Default Print Format for Sales Invoice (#8419)
- frappe/erpnext#8416
2017-04-12 15:31:01 +05:30
rohitwaghchaure
5adce495aa Merge pull request #8417 from rohitwaghchaure/due_date_issue
[fix] POS, Due Date cannot be before Posting Date
2017-04-12 14:43:21 +05:30
Rushabh Mehta
66272a168d [minor] README.md + encode query parameter in search 2017-04-12 14:32:07 +05:30
Rohit Waghchaure
2192c244c0 [fix] POS, Due Date cannot be before Posting Date 2017-04-12 13:19:05 +05:30
Makarand Bauskar
141c244ece [minor] added order by args to get_*_list methods (#8413) 2017-04-12 13:02:28 +05:30
Nabin Hait
a57b020620 Merge branch 'develop' 2017-04-11 19:14:12 +05:30
Nabin Hait
d1fda1ff2b bumped to version 8.0.9 2017-04-11 19:44:12 +06:00
mbauskar
b9d0e7622a [translation] translation updates for - erpnext on 2017-04-04 2017-04-11 18:57:48 +05:30
mbauskar
2f9703c20e [minor] set company_currency as account_currency in general ledger if party type is employee 2017-04-11 18:56:41 +05:30
Khairil Zhafri
46b6d4ea47 Update student.json
Less binary gender option for Student
2017-04-11 18:55:31 +05:30
Khairil Zhafri
417145bec5 Update employee.json
Less binary gender options for Employee
2017-04-11 18:55:20 +05:30
Rohit Waghchaure
1ff1368280 [fix] Vehicle expense report not working 2017-04-11 18:54:32 +05:30
joezsweet
768a888bf2 [fix] validate supplier invoice
- modified to check for the selected supplier only
2017-04-11 18:52:46 +05:30
Julian Robbins
8037a0e3d5 Update assignment.md
A typo and improvement tom English
2017-04-11 18:51:34 +05:30
mbauskar
0b665ac791 [minor] don't throw error for buying transactions if price list is not selected 2017-04-11 18:51:12 +05:30
Rohit Waghchaure
87ad6d074a [enhance] Stock qty added in purchase invoice 2017-04-11 18:29:52 +05:30
Kanchan Chauhan
95108ac80b [Minor] Party validation for Employee 2017-04-11 18:29:27 +05:30
Dominik Ottenbreit
9b9777be3f Fix mistranslation "Lieferantennauftrag" -> "Bestellung"
There is the strange term of "Lieferantenauftrag" that has been used for
"Purchase Order" which translates to "Supplier Order". This is not
standard at all and should be fixed to "Bestellung".

A Google search for "Bestellung" returns 97 million results, a search
for "Lieferantenauftrag" returns 972 results so it should be clear what
is standard.
2017-04-11 18:28:35 +05:30
Nabin Hait
075b299673 bom traversing: argument mutable issue 2017-04-11 18:27:34 +05:30
mbauskar
e0271a8331 [minor] ReferenceError:doc fixes for delivery note 2017-04-11 17:54:22 +05:30
Nabin Hait
3fc3305251 bom traversing: argument mutable issue 2017-04-11 16:00:48 +05:30
mbauskar
236f7aac7f [minor] track changes for transaction documents 2017-04-10 14:48:54 +05:30
Manas Solanki
29ee263093 Fix in student attendacne tool 2017-04-10 14:33:35 +05:30
Makarand Bauskar
4782e8b751 [minor] added safe_eval for status_updater and added getdate and nowdate (#8365) 2017-04-07 17:16:16 +05:30
Rushabh Mehta
b58979fd3e [added] frappe.safe_eval 2017-04-06 18:58:39 +05:30
Rushabh Mehta
9365641777 [added] frappe.safe_eval 2017-04-06 18:24:34 +05:30
Nabin Hait
5e9d72d57b Merge branch 'develop' 2017-04-06 16:32:04 +05:30
Nabin Hait
0d230afd22 bumped to version 8.0.8 2017-04-06 17:02:03 +06:00
Makis Etzoglou
a906b3f11c add delivery date to print format Fix #8111 2017-04-06 15:47:52 +05:30
Kanchan Chauhan
aa6f00c403 Added default 'All' option to filters to differentiate all and empty filter 2017-04-06 15:22:18 +05:30
Nabin Hait
d681c88d79 validate returned qty only if there is reference qty 2017-04-06 15:20:45 +05:30
Javier Wong
fc11fce990 [enhancement] Changed Issue Description and Resolution to Text Editor (#8346) 2017-04-06 14:56:44 +05:30
Rohit Waghchaure
faf51d91b6 [fix] stock qty issue in purchase trends report 2017-04-05 14:53:26 +05:30
Rushabh Mehta
08a42e00ae [fix] salary slip eval, remove access to globals, #8313 2017-04-05 14:52:22 +05:30
Nabin Hait
549a2827e5 Merge pull request #8300 from rohitwaghchaure/customer_edit_issue_v8
[fix] Customer edit issue in offline POS
2017-04-05 14:51:44 +05:30
Rushabh Mehta
9264313f0e [fix] ordering for Edit Posting Time check 2017-04-05 12:49:01 +05:30
Nabin Hait
8013d1813a Merge pull request #8320 from manassolanki/newsl
Route to newsletter listview
2017-04-05 12:33:14 +05:30
Rushabh Mehta
ffc807cd57 [minor] check below posting date in delivery note 2017-04-05 12:27:41 +05:30
Manas Solanki
ba6559c2e9 Route to newsletter listview 2017-04-05 11:52:23 +05:30
Nabin Hait
7eea52d4e9 Merge branch 'develop' 2017-04-04 11:46:47 +05:30
Nabin Hait
93a990f006 bumped to version 8.0.7 2017-04-04 12:16:47 +06:00
Rohit Waghchaure
2861955632 [fix] Customer edit issue in offline POS 2017-04-04 09:59:29 +05:30
Nabin Hait
099163b16d Merge pull request #8296 from netchampfaris/customer-list-fix
Add `image` field to fetch in Customer List
2017-04-04 09:39:22 +05:30
Faris Ansari
0d114b4c31 Add image field to fetch in Customer List 2017-04-03 21:21:50 +05:30
Nabin Hait
fcf34dc570 Merge pull request #8295 from saurabh6790/demo_fix
[fix] demo script for setup data
2017-04-03 17:56:47 +05:30
Nabin Hait
6f038bc1f3 Validate total advance against grand total considering write off amount 2017-04-03 17:56:05 +05:30
Nabin Hait
9300013acc Validate total advance against grand total considering write off amount 2017-04-03 17:35:58 +05:30
Nabin Hait
8d8cba7faa Validate total advance against grand total considering write off amount 2017-04-03 17:26:32 +05:30
Nabin Hait
2d132e32aa Function name changed in company 2017-04-03 17:26:32 +05:30
Saurabh
2e47654f43 [fix] demo script for setup data 2017-04-03 17:25:55 +05:30
Nabin Hait
9bfa0ab7eb Merge branch 'develop' 2017-04-03 13:18:14 +05:30
Nabin Hait
17ddd8f389 bumped to version 8.0.6 2017-04-03 13:48:13 +06:00
Nabin Hait
c469f2c954 Get POS profile fix 2017-04-03 13:01:11 +05:30
Nabin Hait
731efe3a95 Minor fix in gross profit report 2017-04-03 12:11:36 +05:30
Nabin Hait
2c892c7e7f Indentation fixed in gross profit report 2017-04-03 12:05:35 +05:30
Nabin Hait
e6b5843a1f Merge branch 'develop' 2017-04-01 19:02:55 +05:30
Nabin Hait
31334328ed bumped to version 8.0.5 2017-04-01 19:32:55 +06:00
Rushabh Mehta
0d6db6c42c [fix] add user default role 2017-03-31 23:02:19 +05:30
Nabin Hait
ed0422a8d9 Merge branch 'develop' 2017-03-31 18:19:57 +05:30
Nabin Hait
d991c8666c bumped to version 8.0.4 2017-03-31 18:49:57 +06:00
Nabin Hait
85d1c07519 Merge pull request #8269 from rohitwaghchaure/v8_documentation
[Documentation] Added for custom roles for page and report, fixed some broken images
2017-03-31 18:04:44 +05:30
Nabin Hait
04ab7dfd2f Update role-permisison-for-page-and-report.md 2017-03-31 18:04:15 +05:30
Faris Ansari
eae30e5642 [fix] Show project title in kanban view (#8268)
- frappe/erpnext#8232
2017-03-31 17:46:12 +05:30
Nabin Hait
065302298f Merge pull request #8261 from rohitwaghchaure/pull_project_from_bom_to_po
[enhance] Get project from bom on production order
2017-03-31 17:40:43 +05:30
Nabin Hait
9f84a99158 Merge pull request #8258 from rohitwaghchaure/gross_profit_issue_v_8
[fix] get_valuation_rate takes 4 arguments 3 given in gross profit report
2017-03-31 17:39:58 +05:30
Nabin Hait
b15d999147 Merge branch 'develop' into gross_profit_issue_v_8 2017-03-31 17:39:45 +05:30
Rushabh Mehta
4b0381c820 [fix] tests 2017-03-31 17:36:48 +05:30
Rushabh Mehta
f0b4562a95 [refactor] move purchase_common.js -> public/js/controllers/buying.js 2017-03-31 17:36:48 +05:30
Rushabh Mehta
cc8b2b2fdb [fix] [refactor] demo for v8 and remove purchase common 2017-03-31 17:36:48 +05:30
Rohit Waghchaure
67a3e65f08 [Documentation] Added for custom roles for page and report, fixed some broken images 2017-03-31 17:22:58 +05:30
Rushabh Mehta
dc89916aa9 [fix] salary component fix for abbr 2017-03-31 17:20:57 +05:30
Rushabh Mehta
9d9cb8b7b1 Revert "Add link field Package Code (fixes #8094)" 2017-03-31 14:35:23 +05:30
Rohit Waghchaure
e7c0188732 [enhance] Get project from bom on production order 2017-03-31 13:40:06 +05:30
Rohit Waghchaure
34b1dba9aa [fix] get_valuation_rate takes 4 arguments 3 given in gross profit report 2017-03-31 12:44:10 +05:30
Nabin Hait
c040015bb5 Used db_update in patch to bypass validate and on_update method 2017-03-31 11:58:19 +05:30
Rushabh Mehta
b66edd19ca [minor] refactor transaction.js 2017-03-31 10:50:58 +05:30
Ricardo Johann
033e2fa8b6 changed accumulated header 2017-03-31 02:18:54 -03:00
Nabin Hait
b596deb57d Merge branch 'hotfix' 2017-03-30 23:50:27 +05:30
Nabin Hait
79fddcfac1 bumped to version 8.0.3 2017-03-31 00:20:27 +06:00
Revant Nandgaonkar
3d5bdeb90d [Fix] patch v7_2.contact_address_links 2017-03-30 23:14:58 +05:30
Revant Nandgaonkar
d07c041125 [Fix] Addresses linked back to Lead 2017-03-30 23:14:58 +05:30
Nabin Hait
e64b75153a Merge branch 'hotfix' 2017-03-30 19:52:42 +05:30
Nabin Hait
b207a0542a bumped to version 8.0.2 2017-03-30 20:22:42 +06:00
Nabin Hait
620bde7144 Updated modified date to reload sales uom 2017-03-30 19:50:45 +05:30
Nabin Hait
a8b2cdf65a Merge branch 'hotfix' 2017-03-30 19:35:51 +05:30
Nabin Hait
896fd1aca7 bumped to version 8.0.1 2017-03-30 20:05:51 +06:00
Nabin Hait
e503f68ec7 Merge pull request #8229 from rohitwaghchaure/pos_highlight_issue
[fix] POS cart item's highlighted issue
2017-03-30 19:26:33 +05:30
Rohit Waghchaure
a86bb69adf [fix] POS cart item's highlighted issue 2017-03-30 19:16:38 +05:30
Nabin Hait
80b3cf22eb Merge branch 'develop' 2017-03-30 18:28:22 +05:30
Nabin Hait
3b5b081ac4 bumped to version 8.0.0 2017-03-30 18:58:20 +06:00
Nabin Hait
d00218ece3 Merge pull request #8227 from manassolanki/contact_report
Addition of few more fields in student contact report
2017-03-30 17:43:33 +05:30
Nabin Hait
93c15383b8 [translations] 2017-03-30 16:57:19 +05:30
Nabin Hait
3c2be33adf Merge pull request #8226 from mbauskar/item-varient-fix
[minor] make varient fixes in item.js
2017-03-30 16:05:34 +05:30
Manas Solanki
4be52d8a20 Addition of few more fields in student contact report 2017-03-30 16:04:26 +05:30
Nabin Hait
6bd791742f Change log for version 8 2017-03-30 16:00:43 +05:30
mbauskar
90d82be966 [minor] make varient fixes in item.js 2017-03-30 15:36:46 +05:30
Nabin Hait
eb6fa5b70c Update attendance.py 2017-03-30 14:11:47 +05:30
Nabin Hait
1f6bd0ad37 Fixed merge conflict 2017-03-30 13:15:22 +05:30
Nabin Hait
c4894a5287 Merge branch 'hotfix' 2017-03-30 13:14:34 +05:30
Nabin Hait
a9bef56a94 bumped to version 7.2.32 2017-03-30 13:44:34 +06:00
Nabin Hait
f90a3295c4 Merge pull request #8213 from KanchanChauhan/update-disbursment-date
Disbursement Date fetched from JV - Employee Loan
2017-03-30 13:06:40 +05:30
Nabin Hait
a24f8dbb8f Merge branch 'develop' into update-disbursment-date 2017-03-30 13:06:28 +05:30
Kanchan Chauhan
37d8f643cc Read permissions to Employee on Employee Loan and Loan Type 2017-03-30 13:05:49 +05:30
Kanchan Chauhan
400c6f5aef Disbursement Date fetched from JV - Employee Loan 2017-03-30 13:04:05 +05:30
mbauskar
07e6bdd4f2 [minor] check employee date of joining before marking the employee attendance 2017-03-30 12:52:29 +05:30
Kanchan Chauhan
b87c174898 Employee Loan Dashboard 2017-03-30 12:51:46 +05:30
CH
99752e58ec VAT rates update for France 2017-03-30 12:45:08 +05:30
Kanchan Chauhan
5ac740b3cb [Fix] From Date and To Date not to be auto calculated for Timesheet Salary 2017-03-30 12:44:28 +05:30
Manas Solanki
3528d08178 [Fix] Fix in program enrollment tool and report 2017-03-30 12:21:49 +05:30
Nabin Hait
f912317fae Stock Balance: Show records based on all child item groups if filters set based on group node 2017-03-29 18:08:10 +05:30
Nabin Hait
e2fef16d78 Made join_table query optional based on item group filter 2017-03-29 17:51:05 +05:30
Javier Wong
41bf1ba7b3 [enhancement] Stock Balance Report - Added Item Group Filter 2017-03-29 17:51:05 +05:30
Ricardo Johann
3d1434afe7 Export total labels 2017-03-29 17:44:17 +05:30
addymuliady
0dd00eb418 Update accounts-settings.md 2017-03-29 17:40:01 +05:30
Nabin Hait
64e9c4abf4 Changed label of hide_tax_id field 2017-03-29 17:39:08 +05:30
Makis Etzoglou
82e6bc45e4 tax_id add to Sales Order, Delivery Note, and Sales Invoice 2017-03-29 17:39:08 +05:30
Saurabh
a5ddeb44e7 [fix] remove integraton service reference from documentation 2017-03-29 17:32:04 +05:30
Kanchan Chauhan
35b12e2ea6 Company in Leave Control Panel 2017-03-29 17:30:56 +05:30
mbauskar
de98ff6bb9 [minor] hide the stock details section if update_stock is unchecked 2017-03-29 17:29:58 +05:30
rohitwaghchaure
afa93c624b [fix] Reserved qty is not calculating properly in BIN for multi sales UOM (#8203) 2017-03-29 17:29:20 +05:30
Manas Solanki
8519b4bfe4 Changes in Program Enrollment and Report for Student Contact Details (#8176)
* Added the student house name in the program enrollment

* added report for the student contact details

* Enabled tag in Student master and fix in student enrollment tool

* [Fix] School House and Report
2017-03-29 16:07:31 +05:30
Nabin Hait
79731360ed Merge pull request #8126 from kickapoo/issue8094
Add link field Package Code (fixes #8094)
2017-03-28 20:48:39 +05:30
Nabin Hait
fede6d8fbe Updated modified date for production order 2017-03-28 20:42:42 +05:30
Stavros Anastasiadis
b9bbb3c3db Add link field Package Code (fixes #8093) 2017-03-28 16:09:52 +03:00
Nabin Hait
11812db5e8 Merge pull request #8183 from neilLasrado/minor-fix
Fixed issue with misleading error message on Stock Entry creation of Serialized Items
2017-03-28 18:08:42 +05:30
Neil Trini Lasrado
193c8919b9 Fixed issue with misleading error message on Stock Entry creation of Serialized Items 2017-03-28 17:43:23 +05:30
Nabin Hait
d1f6cc88f2 Required items table in Production order 2017-03-28 17:08:40 +05:30
Nabin Hait
dac525433c Merge pull request #8178 from nabinhait/develop
Patch order changed for multiple uoms in sales cycle
2017-03-28 16:55:57 +05:30
rohitwaghchaure
e313c09fd7 Merge pull request #8182 from frappe/netchampfaris-patch-1
Update POS screenshot
2017-03-28 16:35:16 +05:30
Faris Ansari
49a3d6d8f6 Update POS screenshot 2017-03-28 16:17:30 +05:30
Nabin Hait
580682d6a2 Merge pull request #8136 from dottenbr/customs_tariff_number
Add Customs Tariff Number
2017-03-28 13:51:52 +05:30
Nabin Hait
6c3eb36c35 Merge branch 'develop' into customs_tariff_number 2017-03-28 13:51:44 +05:30
Nabin Hait
da749f716b Merge pull request #8172 from rohitwaghchaure/credit_note_serial_no_issue
[fix] During making credit note from sales invoice, system fetching new serial no instead of old serial no from the sales invoice
2017-03-28 13:49:32 +05:30
Nabin Hait
2cf5ca28f6 Merge pull request #8173 from nabinhait/hotfix
In gross profit report, if incoming rate not found from last sle, consider average valuation rate
2017-03-28 13:49:09 +05:30
Nabin Hait
95db9f9e09 Merge pull request #8175 from rohitwaghchaure/production_planning_issue
[fix] sales order with status closed fetching on production planning tool
2017-03-28 13:48:42 +05:30
Nabin Hait
621dcc3c84 Patch order changed for multiple uoms in sales cycle 2017-03-28 13:45:56 +05:30
Nabin Hait
010d9cd796 Merge branch 'dottenbr-manufacturer_childtable' into develop 2017-03-28 13:39:43 +05:30
Nabin Hait
77b2fef41e Fixed test cases 2017-03-28 13:39:26 +05:30
Nabin Hait
d20f8585ae Merge branch 'manufacturer_childtable' of https://github.com/dottenbr/erpnext into dottenbr-manufacturer_childtable 2017-03-28 13:31:28 +05:30
Rohit Waghchaure
d7908f8e3a [fix] sales order with status closed fetching on production planning tool 2017-03-28 12:30:23 +05:30
Nabin Hait
77c970549b In gross profit report, if incoming rate not found from last sle, consider average valuation rate 2017-03-28 12:20:31 +05:30
Rohit Waghchaure
5ecbaa408b [fix] During making credit note from sales invoice, system fetching new serial no instead of old serial no from the sales invoice 2017-03-28 12:09:07 +05:30
Nabin Hait
46e108b34e Merge pull request #8166 from nabinhait/pro_order_multi_level_bom_operations
Fetch operations from all sub-assembly BOMs in Pro Order if multi-level BOM is checked
2017-03-27 21:36:28 +05:30
Rushabh Mehta
fe5c95e360 Update CONTRIBUTING.md 2017-03-27 20:41:51 +05:30
Nabin Hait
0329c0ffab Test case fixed for production order 2017-03-27 19:11:45 +05:30
Nabin Hait
5b60ef2dce Fetch operations from all sub-assembly BOMs in Pro Order if multi-level BOM is checked 2017-03-27 16:29:51 +05:30
Nabin Hait
8bf58367b8 Fixed merge conflict 2017-03-27 12:30:01 +05:30
Nabin Hait
3e43f275a0 Merge branch 'hotfix' 2017-03-27 12:27:38 +05:30
Nabin Hait
70c3f79d12 bumped to version 7.2.31 2017-03-27 12:57:38 +06:00
Nabin Hait
9c8159be8f Merge pull request #8129 from rohitwaghchaure/pos_v8_enhance_and_issue
[fix] customer edit, numeric keypad visibility, on selection of item highlight the background issue in the pos
2017-03-27 12:25:18 +05:30
Nabin Hait
68fb20b811 Merge pull request #8131 from rohitwaghchaure/purchase_analytics_issue
[fix] Purchase analytics report not loading
2017-03-27 12:24:46 +05:30
Nabin Hait
a4f838b6b4 Merge pull request #8135 from dottenbr/de_translation_fix
Fix German Translation
2017-03-27 12:24:20 +05:30
Dominik Ottenbreit
fc9ed4da24 Add Customs Tariff Number 2017-03-24 15:53:03 +01:00
Dominik Ottenbreit
ea617da277 fix translations that have to do with term 'close' which was not well translated 2017-03-24 15:24:55 +01:00
Dominik Ottenbreit
6eb202ef3a fix patch after test, fix variant based on manufacturer, add json for item_manufacturer 2017-03-24 14:49:52 +01:00
Dominik Ottenbreit
3938c61996 migrate from manufacturer to manufacturer childtable 2017-03-24 14:24:34 +01:00
Rohit Waghchaure
f74b02140c [fix] Purchase analytics report not loading 2017-03-24 17:37:02 +05:30
Rohit Waghchaure
b719dc53fc [fix] customer edit and numeric keypad visibility issue in the pos 2017-03-24 17:03:50 +05:30
Nabin Hait
00b04ed61e Merge pull request #8076 from KanchanChauhan/qty-in-shopping-cart
Show qty in Shopping Cart
2017-03-24 13:14:03 +05:30
Nabin Hait
bf2a7efca4 Account name changed in standard chart of accounts 2017-03-24 13:01:35 +05:30
Nabin Hait
214ea8f2c8 Merge pull request #8119 from robulik/develop
[minor] fixes of translatable strings in web pages
2017-03-24 12:59:02 +05:30
Kanchan Chauhan
a844040781 Show qty in Shopping Cart 2017-03-23 18:22:02 +05:30
Robert Kirschner
b8f5148a44 [minor] fix: translatable title, h1, button on product_search page. Address row in web view has translatable address type 2017-03-23 13:43:26 +01:00
Nabin Hait
9ba1be60b7 Merge pull request #8039 from netchampfaris/pos-ui-fix
[pos] ui fix for small screens frappe/erpnext#8029
2017-03-23 17:14:39 +05:30
Nabin Hait
2aafdd622b Merge pull request #8047 from KanchanChauhan/warehouse-for-dropship
[Fix] Warehouse not required for Dropship
2017-03-23 17:06:18 +05:30
Nabin Hait
b6b97f25d0 Merge pull request #8048 from KanchanChauhan/bom-based-on-project
Project filter in BOM selection in Production Order
2017-03-23 17:04:53 +05:30
Nabin Hait
4a8a62a202 Merge pull request #8053 from umairsy/video-pages
updated erpnext-learn pages
2017-03-23 17:02:34 +05:30
Nabin Hait
d25e314ccb Merge pull request #8054 from rohitwaghchaure/purchase_return_issue_invoice
[fix] Quantity is not copying in the Received Qty during making of debit note from the purchase invoice
2017-03-23 17:01:58 +05:30
Nabin Hait
f44f04e33a Merge pull request #8063 from khrlzhfr/patch-1
Update standard_chart_of_accounts.py
2017-03-23 17:01:34 +05:30
Nabin Hait
b40efe34e3 Merge pull request #8067 from KanchanChauhan/issue-webview-fixed
[Fix] Issue web view fixed
2017-03-23 17:00:47 +05:30
Nabin Hait
691a34c924 Merge branch 'develop' into issue-webview-fixed 2017-03-23 17:00:30 +05:30
Robert Kirschner
db068ac6c4 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2017-03-23 12:29:43 +01:00
Nabin Hait
c7dc838306 Merge pull request #8068 from rohitwaghchaure/asset_depreciation_issue
[fix] Precision issue during making of depreciation schedule
2017-03-23 16:59:12 +05:30
Nabin Hait
5168286ea0 Merge pull request #8072 from lb-/patch-1
Update the-champion.md - grammar
2017-03-23 16:58:19 +05:30
Nabin Hait
8373b8e50d Merge pull request #8075 from netchampfaris/asset-image-fix
[fix] asset image in image view
2017-03-23 16:58:05 +05:30
Nabin Hait
33f2b659e4 Merge pull request #8079 from robulik/develop
[fix] selecting new address in cart webpage unchecks previously checked
2017-03-23 16:52:39 +05:30
Nabin Hait
8de911b5b4 Merge pull request #8086 from KanchanChauhan/read-perm-to-guest
[Minor] Guest should have read permissions on Job Openings
2017-03-23 16:50:45 +05:30
Robert Kirschner
d162eb367c [minor] fix translation strings in cart web view 2017-03-23 12:18:24 +01:00
Robert Kirschner
0af93a782d Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2017-03-23 12:10:46 +01:00
Nabin Hait
46bccb55c5 Merge pull request #8080 from rmehta/item-variants-by-mfg
[feature] ability to have variants based on manufacturer
2017-03-23 16:29:41 +05:30
Nabin Hait
422ef584fa Merge pull request #8090 from KanchanChauhan/date-span-in-salary-slip
[Minor] From date, To date based on Payroll Frequency
2017-03-23 16:16:51 +05:30
Nabin Hait
b132428184 Merge pull request #8091 from mbauskar/cart-address-fixes
[minor] fixed shipping and billing address issue in cart
2017-03-23 16:16:11 +05:30
Nabin Hait
a90ff97782 Merge pull request #8096 from frappe/netchampfaris-documentation
Update Workflows
2017-03-23 16:15:40 +05:30
Nabin Hait
1775a3db38 Merge pull request #8115 from rohitwaghchaure/setup_wizard_unpickle_issue
[fix] UnpickleError, removed _ method from the argument of the function
2017-03-23 16:14:52 +05:30
Rohit Waghchaure
57f35a25a1 [fix] UnpickleError, removed _ method from the argument of the function 2017-03-23 14:55:52 +05:30
Faris Ansari
3011006ff2 Merge pull request #8097 from frappe/netchampfaris-documentation-1
Add new screenshots for Workflows documentation
2017-03-22 17:50:17 +05:30
Faris Ansari
1e7f739c84 Add new screenshots for Workflows documentation 2017-03-22 17:48:51 +05:30
Faris Ansari
7fbc1c2161 Update Workflows
Add new images
2017-03-22 17:45:52 +05:30
mbauskar
67e3e32dd6 [minor] fixed shipping and billing address issue in cart 2017-03-22 16:14:43 +05:30
Kanchan Chauhan
076e9d6af8 [Minor] From date, To date based on Payroll Frequency 2017-03-22 16:07:03 +05:30
Robert Kirschner
c6b52a321e update on cart.js pull request feedback 2017-03-22 08:10:30 +01:00
Kanchan Chauhan
730ad5a507 [Minor] Guest should have read permissions on Job Openings 2017-03-22 12:37:38 +05:30
Rushabh Mehta
43583d6497 Update item.js 2017-03-21 17:49:53 +01:00
Rushabh Mehta
a07c43fd68 [feature] ability to have variants based on manufacturer 2017-03-21 17:48:34 +01:00
Robert Kirschner
0a33d4ffc5 [fix] selecting new address in cart web page unchecks previously checked address 2017-03-21 14:52:59 +01:00
Rohit Waghchaure
6ee91ec9c6 on selection of row highlight the background in the cart 2017-03-21 15:55:09 +05:30
Faris Ansari
e1acb766ac [fix] asset image in image view 2017-03-21 14:18:30 +05:30
LB (Ben Johnston)
71f4fbf467 Update the-champion.md - grammar 2017-03-21 12:50:17 +07:00
Rohit Waghchaure
b69d311268 [fix] precision issue during making of depreciation schedule 2017-03-20 16:30:34 +05:30
Kanchan Chauhan
6514e051be [Fix] Issue web view fixed 2017-03-20 15:31:54 +05:30
Khairil Zhafri
4d6d456a0d Update standard_chart_of_accounts.py
Minor spelling edits
2017-03-20 00:15:34 +08:00
Rohit Waghchaure
414c0ab3bb [fix] Quantity is not copying in the Received Qty during making of debit note 2017-03-17 17:19:17 +05:30
Umair Sayyed
024896d806 updated erpnext-learn pages 2017-03-17 12:55:01 +05:30
rohitwaghchaure
2b9c95a940 Merge pull request #8043 from rohitwaghchaure/pos_issue_v8
[fix] POS, amount not updating on change of price, on zero of discount rate has not reset, pricing rule not working for brand
2017-03-16 17:56:20 +05:30
Kanchan Chauhan
7cf1a1d84b Project filter in BOM selection in Production Order 2017-03-16 17:09:37 +05:30
Kanchan Chauhan
6f7457a1b0 [Fix] Warehouse not required for Dropship 2017-03-16 16:03:41 +05:30
Rohit Waghchaure
75177c0e35 [fix] POS, amount not updating on change of price, on zero of discount rate has not reset, pricing rule not working for brand 2017-03-16 15:47:25 +05:30
Faris Ansari
d79f239001 [pos] ui fix for small screens frappe/erpnext#8029 2017-03-16 12:18:35 +05:30
Nabin Hait
c26ae0036d Merge pull request #8033 from manassolanki/student_applicant
[Fix] Enrolling the student
2017-03-15 19:40:46 +05:30
Nabin Hait
f494626ce4 Merge pull request #8034 from mbauskar/hotfix
[minor] make item code mandatory if update_stock is selected
2017-03-15 19:40:20 +05:30
mbauskar
27efc91db0 [minor] make item code mandatory if update_stock is selected 2017-03-15 18:57:18 +05:30
Manas Solanki
ad2dc2c747 [Fix] Enrolling the student 2017-03-15 18:22:57 +05:30
Rushabh Mehta
f340e19ea7 [minor] field re-arrangements in sales invoice, purchase invoice, stock reco 2017-03-15 15:12:43 +05:30
Nabin Hait
56f650f342 Merge branch 'master' into develop 2017-03-15 11:28:07 +05:30
Nabin Hait
c1a5b348b5 Merge branch 'hotfix' 2017-03-15 11:28:06 +05:30
Nabin Hait
1157ee365b bumped to version 7.2.30 2017-03-15 11:58:06 +06:00
Nabin Hait
ee7b4f2882 Merge pull request #8016 from rmehta/posting-date-option
[feature] posting date, time is always current unless explicitly set
2017-03-15 11:22:04 +05:30
Nabin Hait
505ed25f10 Merge pull request #8017 from nabinhait/develop
Field order changed for 'Qty as per Stock UOM'
2017-03-14 22:39:36 +05:30
Nabin Hait
1ba71a0b3a Merge pull request #8018 from mbauskar/develop
[minor] custom script to create issue, lead, opportunity from email
2017-03-14 22:39:26 +05:30
Nabin Hait
79bce2a71d Merge pull request #8019 from rohitwaghchaure/pos_serial_no_issue
[fix] User sales one serial number multiple time from the POS
2017-03-14 22:38:28 +05:30
Rushabh Mehta
4f3da42b75 [fixes] for tests 2017-03-14 21:29:55 +05:30
Rushabh Mehta
131866a11a [fixes] for tests 2017-03-14 21:06:15 +05:30
Rushabh Mehta
82c258948d [fixes] for recurring and tests 2017-03-14 19:13:39 +05:30
Rohit Waghchaure
e259a9b068 [fix] User sales one serial number multiple time from the POS 2017-03-14 19:05:21 +05:30
mbauskar
f54b1047b8 [minor] custom script to create issue, lead, opportunity from email 2017-03-14 17:57:47 +05:30
Nabin Hait
3d731df7e3 Field order changed for 'Qty as per Stock UOM' 2017-03-14 17:24:57 +05:30
Nabin Hait
f86d73fdc8 Merge pull request #8015 from rohitwaghchaure/gross_profit_issue
[fix] Gross profit report permission issue
2017-03-14 17:24:18 +05:30
Rushabh Mehta
f6dee248ee Update company.json 2017-03-14 17:10:01 +05:30
Rushabh Mehta
6d4a52562b [fix] posting date, time is always current unless explicitly set 2017-03-14 17:06:51 +05:30
Rushabh Mehta
6b53792aea [fix] posting date, time is always current unless explicitly set 2017-03-14 17:06:51 +05:30
Rohit Waghchaure
faedf8274c [fix] gross profit permission issue 2017-03-14 14:56:24 +05:30
Nabin Hait
6a053a989e Merge pull request #8014 from rohitwaghchaure/contact_issue_for_website_generator
[fix] Removed customer, supplier and added link_name from website_list_for_contact file
2017-03-14 14:46:48 +05:30
Saurabh
0d47d51407 [fix] modified payment request to cope with new payment structure (#7957)
* [fix] modified payment request to cope with new payment structure

* [fix] moved payment gateway doctype from accounts to core
2017-03-14 14:46:05 +05:30
Nabin Hait
468726320c Merge pull request #8013 from manassolanki/shishuv
[Fix] Student attendance tool- Handling double-click on button
2017-03-14 14:28:58 +05:30
Rohit Waghchaure
11fa7a9311 [fix] Removed customer, supplier and added link_name from website_list_for_contact file 2017-03-14 13:26:10 +05:30
Manas Solanki
2922660b34 [Fix] Student attendance tool- Handling double-click on button 2017-03-14 12:50:58 +05:30
rohitwaghchaure
27e86201fc Merge pull request #8007 from rohitwaghchaure/pos_profile_issue
[fix] Value assignment issue for country field in pos profile
2017-03-14 00:22:23 +05:30
Rohit Waghchaure
cc034a8983 [fix] Value assignment issue for country in the pos profile 2017-03-13 22:44:48 +05:30
rohitwaghchaure
0216f6e6eb Merge pull request #7995 from saurabh6790/restrict_negative_qty_in_pr
[fix] validate negative quantity while creating purchase receipt
2017-03-13 18:24:24 +05:30
Nabin Hait
26ed675240 Merge pull request #7996 from netchampfaris/ui-fixes
[ui] show assignees in gantt popup frappe/erpnext#6916
2017-03-13 17:22:56 +05:30
Saurabh
4f4d0a8369 [fix] validate negative quantity while creating purchase receipt 2017-03-13 15:37:47 +05:30
Faris Ansari
df65d21225 [ui] show assignees in gantt popup frappe/erpnext#6916 2017-03-13 14:52:56 +05:30
Nabin Hait
86cb0cc010 Merge pull request #7991 from mbauskar/develop
[minor] display campaign field only if source is Campaign
2017-03-13 11:19:59 +05:30
mbauskar
7f42e90832 [minor] display campaign field only if source is Campaign 2017-03-12 21:57:52 +05:30
Nabin Hait
0afbee9441 Merge pull request #7988 from nabinhait/develop
Multiple version 8 fixes
2017-03-12 17:41:17 +05:30
Nabin Hait
1ed8bc4c36 Gross Profit report: Consider Sales team table only if grouped by sales person 2017-03-12 17:10:41 +05:30
Nabin Hait
b2a8482cc5 In Student Sibling table, the current student id should not appear as sibling. 2017-03-12 16:55:05 +05:30
Nabin Hait
fb4b8d926f Company based on exising company fix 2017-03-12 16:55:05 +05:30
Nabin Hait
ae205f878a Set default taxes and charges while creating quotation from opportunity 2017-03-12 16:55:05 +05:30
Nabin Hait
d0d22ff203 copy letter head from invoice to payment entry 2017-03-12 16:55:05 +05:30
Nabin Hait
6923397ef6 Show net total in salary slip log in Process Payroll. Fixed #7986 2017-03-12 16:55:05 +05:30
Nabin Hait
c5204f56e2 Merge pull request #7909 from KanchanChauhan/employee-loan-jv
JV on submitting Employee Loan
2017-03-12 16:50:48 +05:30
Nabin Hait
132193309c Merge pull request #7952 from KanchanChauhan/multiple-salary-fixes
Multiple Salary Fixes
2017-03-12 16:48:11 +05:30
Nabin Hait
d402829d17 Merge pull request #7980 from rohitwaghchaure/target_bounty_redesign
[Enhancement] POS Redesign and new features
2017-03-12 16:47:26 +05:30
Nabin Hait
fd9b2467d6 Merge pull request #7966 from rohitwaghchaure/item_variant_issue_for_nuermic
[Fix] Item variants broken when using naming series for items and vriants of numeric value
2017-03-12 16:34:40 +05:30
Nabin Hait
3e22a11a16 Merge pull request #7985 from mbauskar/develop
[minor] ignore lead addresses delete query if address against lead no…
2017-03-12 15:16:01 +05:30
mbauskar
124cf14429 [minor] ignore lead addresses delete query if address against lead not found 2017-03-11 16:02:20 +05:30
Rohit Waghchaure
0169341917 [Fix] Item variants broken when using naming series for items and vriants of numeric value 2017-03-10 19:40:08 +05:30
Rohit Waghchaure
87fa59a710 [Fix] Customer delete, customer edit functionality, added country field in the pos profile 2017-03-10 19:37:02 +05:30
Faris Ansari
1fe1518398 [pos] ui cleanup 2017-03-10 17:00:43 +05:30
Rohit Waghchaure
6068aecc2e minor fix 2017-03-10 17:00:43 +05:30
Faris Ansari
07c9f35779 ui cleanup 2017-03-10 17:00:42 +05:30
Faris Ansari
45510109b6 [pos] cleanup 2017-03-10 17:00:42 +05:30
Rohit Waghchaure
017f5005e0 fixed pos numeric keypad functionality 2017-03-10 17:00:42 +05:30
Faris Ansari
339d9c954a minor changes 2017-03-10 17:00:42 +05:30
Rohit Waghchaure
1312fe31a9 Provision to edit customer and address details 2017-03-10 17:00:42 +05:30
Faris Ansari
adcb3c62fa wip 2017-03-10 17:00:42 +05:30
Rohit Waghchaure
3b5a412a9c offline email for POS 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
56a7974b58 added event on numeric keypad 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
86ab6a93b4 [Enhancement] POS, numeric keypad 2017-03-10 17:00:41 +05:30
Faris Ansari
1f261a8695 UI changes 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
b5097ec161 offline email for POS 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
f0c7ba4b1f added event on numeric keypad 2017-03-10 17:00:40 +05:30
Rohit Waghchaure
e30f83a8af [Enhancement] POS, numeric keypad 2017-03-10 17:00:40 +05:30
Nabin Hait
e7e82fe477 Merge pull request #7970 from rmehta/sample-tasks
Descriptions on sample tasks
2017-03-10 14:58:52 +05:30
Rushabh Mehta
83aa5ee3df [messages] cleanup 2017-03-10 12:47:29 +05:30
Rushabh Mehta
db206f2d10 [minor] develop_version 2017-03-10 09:39:31 +05:30
Rushabh Mehta
868bb26e24 [sample] add help for sample tasks and make them into notifications 2017-03-09 18:11:11 +05:30
Kanchan Chauhan
37a57813fa Multiple Salary Fixes 2017-03-09 13:00:35 +05:30
Rushabh Mehta
aea1c2a1e3 [minor] allow sales order delivery date before order date 2017-03-09 12:46:51 +05:30
Kanchan Chauhan
ffd1f112e6 JV on submitting Employee Loan 2017-03-09 12:21:37 +05:30
Nabin Hait
733855a4c3 Merge pull request #7956 from manassolanki/sibling
[Fixes] School
2017-03-09 11:04:38 +05:30
Nabin Hait
d22bb682a5 Merge pull request #7960 from rohitwaghchaure/material_request_issue_for_po
[Fix] Material Request to Production Order not working
2017-03-09 10:57:26 +05:30
Nabin Hait
f73a44aa8d Update material_request.py 2017-03-09 10:57:00 +05:30
Nabin Hait
1fde71b3c0 Merge pull request #7959 from KanchanChauhan/expense-claim-fix
[Minor] Label change in Expense Claim
2017-03-09 10:53:13 +05:30
Rohit Waghchaure
02fb5880fe [Fix] Material Request to Production Order not working 2017-03-08 18:38:12 +05:30
Kanchan Chauhan
a64f53801b [Minor] Label change in Expense Claim 2017-03-08 16:59:49 +05:30
Manas Solanki
631fab012f [Fix] Student attendance tool 2017-03-08 14:44:52 +05:30
Manas Solanki
d41836b386 [Fix] Student Sibling 2017-03-08 14:44:52 +05:30
Nabin Hait
52daaca885 Fixed merge conflict 2017-03-08 14:30:38 +05:30
Nabin Hait
89d494fbf5 Merge branch 'hotfix' 2017-03-08 14:30:12 +05:30
Nabin Hait
27c4fdc2df bumped to version 7.2.29 2017-03-08 15:00:12 +06:00
Nabin Hait
804c4fc4a7 Merge pull request #7951 from rohitwaghchaure/purchase_return_issue
[Fix] Purchase return issue
2017-03-08 14:28:55 +05:30
Nabin Hait
842d4fcf53 Merge pull request #7954 from mbauskar/hotfix
removed the test_clear_blank_rows test case from JE
2017-03-08 14:19:04 +05:30
mbauskar
02198ec8b0 removed the test_clear_blank_rows test case from JE 2017-03-08 12:34:36 +05:30
Rushabh Mehta
b9cdb05934 [minor] renamed portal hook 2017-03-08 12:34:03 +05:30
Nabin Hait
33fb6ae323 Fixed merge conflict 2017-03-08 11:18:15 +05:30
Rohit Waghchaure
d05a8737f9 [Fix] Purchase return issue 2017-03-08 10:30:23 +05:30
Nabin Hait
1af471a16f Merge pull request #7938 from netchampfaris/task-list
[gantt] show task project in popup
2017-03-07 19:41:52 +05:30
Nabin Hait
f822b875ba Merge pull request #7941 from nabinhait/v8_fixes
Set new name in warehouse_name on rename of warehosue
2017-03-07 17:16:44 +05:30
Nabin Hait
229764b7bf Merge pull request #7939 from hereabdulla/patch-2
Only enabled user to be fetched
2017-03-07 17:16:31 +05:30
Nabin Hait
961bdc3743 Set new name in warehouse_name on rename of warehosue 2017-03-07 15:02:34 +05:30
Abdulla P I
cbe035b08a Only enabled user to be fetched 2017-03-07 13:34:08 +05:30
Faris Ansari
0e4b924f59 [gantt] show task project in popup 2017-03-07 12:01:39 +05:30
Nabin Hait
1a735f2f5a Merge pull request #7933 from rohitwaghchaure/minor_fix_patch
minor fix in patch
2017-03-06 20:32:47 +05:30
Rohit Waghchaure
0bb434af3f minor fix in patch 2017-03-06 18:52:34 +05:30
Nabin Hait
b3ffd6b282 Merge pull request #7828 from rohitwaghchaure/update_user_roles_to_roles
Changed userrole to has role, commonify role editor of the user
2017-03-06 18:44:53 +05:30
Nabin Hait
439a39bbbb Merge pull request #7922 from nabinhait/uom-conversion-in-selling
Uom conversion in selling
2017-03-06 17:28:41 +05:30
Nabin Hait
fe876c0805 Test case fixed for multiple uom in selling 2017-03-06 16:41:13 +05:30
Nabin Hait
e68f32cf19 UOM Conversion in selling 2017-03-06 16:41:13 +05:30
Kanchan Chauhan
5a980ac87a UOM Conversion in Selling 2017-03-06 16:41:12 +05:30
Nabin Hait
0697d62603 Merge pull request #7931 from KanchanChauhan/job-applicant-fix
[Fix] Candidate can apply to multiple jobs
2017-03-06 16:38:00 +05:30
Rohit Waghchaure
611a70a12a changes in the report roles 2017-03-06 16:36:46 +05:30
Kanchan Chauhan
8411be7720 [Fix] Candidate can apply to multiple jobs 2017-03-06 14:40:43 +05:30
Nabin Hait
8981ecf170 Merge pull request #7926 from svigneux/patch-2
Update batch.md
2017-03-06 14:37:39 +05:30
Rohit Waghchaure
e7485150a1 added roles in the report 2017-03-06 14:26:09 +05:30
Rohit Waghchaure
312498060f changed doctype name userrole to has role 2017-03-06 14:24:39 +05:30
Rohit Waghchaure
d59f8b32cd changed user_roles to roles 2017-03-06 14:24:39 +05:30
S. Vigneux
ff2d5d8ad9 Update batch.md
The practice=> The practice
2017-03-05 12:44:03 -05:00
Nabin Hait
a07c3193cf Merge pull request #7889 from rohitwaghchaure/sales_return_issue_for_pos
[Fix] Sales Return Invoice (Is POS) doesn't show correct payment data
2017-03-04 18:32:40 +05:30
Nabin Hait
feb45727e5 Merge pull request #7912 from mbauskar/develop
[minor] fixes contact field set query for opportunity
2017-03-04 18:31:09 +05:30
Rohit Waghchaure
a31ffbc745 [Fix] Sales Return Invoice (Is POS) doesn't show correct payment data 2017-03-03 16:28:49 +05:30
mbauskar
91c6ffde86 [minor] fixes contact field set query for opportunity 2017-03-02 17:29:16 +05:30
Nabin Hait
78a650062c Update company.json 2017-03-02 14:48:49 +05:30
Nabin Hait
57a47a83a0 Merge pull request #7887 from rohitwaghchaure/capacity_planning
[Fix] Pull operation on production order, when making from sales order
2017-03-02 14:17:09 +05:30
Nabin Hait
a0fb3e5128 Merge pull request #7888 from KanchanChauhan/payroll-fix
[Fix] JV entry for Employee Loan only if Loan exists
2017-03-02 14:15:59 +05:30
Nabin Hait
42bc399f2a Merge pull request #7890 from KanchanChauhan/hr-page
[Minor] Employee Loan Management moved up in  HR Page
2017-03-02 14:14:04 +05:30
Nabin Hait
bc10ea897d Merge pull request #7893 from pratu16x7/crm-docs
CRM docs update
2017-03-02 14:13:19 +05:30
Nabin Hait
17cf220cbc Merge pull request #7908 from KanchanChauhan/removed-paid-status
[Minor] Removed Paid status from Salary Slip
2017-03-02 14:12:34 +05:30
Kanchan Chauhan
cfb0adff98 [Minor] Removed Paid status from Salary Slip 2017-03-02 12:59:35 +05:30
Nabin Hait
834d616c60 Merge branch 'master' into develop 2017-03-02 12:38:15 +05:30
Saurabh
e95b6e75ac Merge pull request #7905 from saurabh6790/demo_data_setup_fix
[fix] add from date field to salary structure in setup demo data
2017-03-02 08:53:27 +05:30
Saurabh
b3134d34fa [fix] add from date field to salary structure in setup demo data 2017-03-02 08:43:08 +05:30
Nabin Hait
258c8199fb Merge pull request #7842 from superlack/develop
Add Sales Orders to Project costing and billing section
2017-03-01 17:20:23 +05:30
pratu16x7
4e71337f3d fix lead, customer, opportunity pages 2017-03-01 04:02:50 +05:30
Nabin Hait
18b7364a81 Merge branch 'master' into develop 2017-02-28 18:56:26 +05:30
Kanchan Chauhan
639eebdae5 [Minor] Employee Loan Management moved up in HR Page 2017-02-28 18:01:07 +05:30
Kanchan Chauhan
e6254b96c4 [Fix] JV entry for Loan only if Loan exists 2017-02-28 17:42:09 +05:30
Rohit Waghchaure
2c2ce8c557 [Fix] Pull operation on production order, when making from sales order 2017-02-28 17:12:18 +05:30
Nabin Hait
8312f1cd64 Merge pull request #7671 from bcornwellmott/link_mrs
Created button to link buying items to material requests
2017-02-28 15:56:06 +05:30
Nabin Hait
6bbf141d57 Merge branch 'develop' into link_mrs 2017-02-28 15:55:35 +05:30
Nabin Hait
38c7ad2c69 Update supplier_quotation.json 2017-02-28 15:53:10 +05:30
Nabin Hait
491d2ad140 Update request_for_quotation.json 2017-02-28 15:52:43 +05:30
Nabin Hait
365ed5dea9 Update purchase_order.json 2017-02-28 15:51:00 +05:30
Nabin Hait
fd37395995 Merge pull request #7878 from netchampfaris/lead-fix
fix date compare in contact_date
2017-02-28 15:37:42 +05:30
Faris Ansari
0ded707397 fix date compare in contact_date 2017-02-27 21:51:46 +05:30
superlack
62d7ba0afd Update project.py 2017-02-27 07:00:30 -08:00
Nabin Hait
cda28ceeec [translations] 2017-02-27 17:46:47 +05:30
Nabin Hait
409062b8a4 Merge pull request #7869 from KanchanChauhan/dependent-tasks
Dependent task dates gets updated with parent dates
2017-02-27 17:34:09 +05:30
Nabin Hait
631ecad985 Merge pull request #7875 from KanchanChauhan/employee-loan-fixes
[Fix] Multiple fixes in Employee Loan
2017-02-27 17:28:20 +05:30
Nabin Hait
3ddc26060a Merge pull request #7876 from KanchanChauhan/salary-slip-fix
[Fix] Update totals on salary component deletion
2017-02-27 17:26:39 +05:30
Kanchan Chauhan
c02745c826 [Fix] Update totals on salary component deletion 2017-02-27 17:21:41 +05:30
Kanchan Chauhan
a13adc0e6b [Fix] Multiple fixes in Employee Loan 2017-02-27 16:56:00 +05:30
Nabin Hait
b9741b6ed5 Merge branch 'master' into develop 2017-02-27 15:41:44 +05:30
Kanchan Chauhan
e76685d925 Dependent task dates gets updated with parent dates 2017-02-27 14:55:03 +05:30
Nabin Hait
c642f76a4d Fixed merge conflict 2017-02-27 14:40:53 +05:30
Nabin Hait
c238016aff Merge pull request #7871 from KanchanChauhan/add-serial-no
[Fix] Add Serial No fix for other langauges
2017-02-27 13:14:57 +05:30
Kanchan Chauhan
6981870a40 [Fix] Add Serial No fix for other langauges 2017-02-27 12:54:13 +05:30
Nabin Hait
7e15afbf45 Merge pull request #7868 from RobertSchouten/patch-34
[fix] typo on get product bundle
2017-02-27 12:27:03 +05:30
robert schouten
4766562ff0 fix typo on get product bundle 2017-02-27 13:30:18 +08:00
Ben Cornwell-Mott
08c1e86b1c Moved link button. Creates new row for unlinked quantities 2017-02-25 23:16:54 -08:00
Nabin Hait
72c7e73ce0 Merge pull request #7852 from rohitwaghchaure/production_order_issue
[Fix] Production order operations scheduling issue
2017-02-25 11:03:43 +05:30
Nabin Hait
7553e72014 Merge pull request #7860 from nabinhait/develop
Leave application overlap validation for half day and test cases
2017-02-25 11:02:53 +05:30
superlack
c95ebdb4e4 Update sales_order.py 2017-02-24 12:35:10 -08:00
superlack
f800892ec3 Update project.py 2017-02-24 12:33:59 -08:00
Rohit Waghchaure
94c30d81b1 [Fix] Production order operations scheduling issue 2017-02-24 19:21:40 +05:30
Nabin Hait
697150f339 Leave application overlap validation for half day and test cases 2017-02-24 18:53:34 +05:30
Nabin Hait
a8d02bfd4a Merge pull request #7850 from manassolanki/shishuvan
Patch for making All Assessment Group parent in assessment group tree
2017-02-24 17:01:05 +05:30
Manas Solanki
d77fac113f Make All Assessment Group parent in assessment group tree 2017-02-24 15:30:22 +05:30
Nabin Hait
da73e1b806 Merge pull request #7851 from rohitwaghchaure/account_paid_to_payment_entry
[Fix] Payment entry account Paid To Show receivable accounts for supplier
2017-02-24 15:18:50 +05:30
Kanchan Chauhan
26b79f108a Leave Application Enchancement 2017-02-24 15:13:06 +05:30
Rohit Waghchaure
b983f26b98 [Fix] Payment entry account Paid To Show receivable accounts for supplier 2017-02-24 15:07:54 +05:30
Nabin Hait
8ad26c7d26 Merge pull request #7848 from manassolanki/neilLasrado-ass-redesign
Neil lasrado assessment redesign
2017-02-24 14:14:22 +05:30
Neil Trini Lasrado
c15b5db030 Added 'All Assessment Group' to fixtures 2017-02-24 13:16:46 +05:30
Neil Trini Lasrado
e4903b77b6 Added New Doctype - Assessment Code 2017-02-24 13:16:46 +05:30
Neil Trini Lasrado
15944b9ecf Added Academic Term to Assessment Group 2017-02-24 13:16:46 +05:30
Nabin Hait
2bcacec5c6 Merge pull request #7576 from RobertSchouten/compact_dev
[fix] compact print format not longer ignores format builder
2017-02-24 13:09:18 +05:30
Nabin Hait
d3d2daab4b Merge pull request #7838 from manassolanki/shishuvan
[Fix] Student Doctype
2017-02-24 12:53:21 +05:30
Manas Solanki
230df2c9d3 Link the sibling child table with the student doctype 2017-02-24 12:09:55 +05:30
Manas Solanki
53259fb91f Change in student master should reflect in every linked doctype and child doctype 2017-02-24 11:25:04 +05:30
superlack
868ef7738f Update project.json 2017-02-23 17:46:07 -08:00
superlack
23e5d40374 Update sales_order.py 2017-02-23 17:43:50 -08:00
superlack
c4587d2945 Update project.py 2017-02-23 17:39:05 -08:00
Nabin Hait
5278da8901 Merge pull request #7830 from mbauskar/develop
[minor] eval conditions for recurring sections and lead fields
2017-02-23 16:54:20 +05:30
Nabin Hait
8ec1b565f5 Merge pull request #7823 from KanchanChauhan/payroll-currency
[Minor] Company default currency in Salary Slip and Structure
2017-02-23 16:52:23 +05:30
Nabin Hait
89f7767b51 Merge pull request #7818 from KanchanChauhan/product-bundle-fix
[Fix] Disappearing Dropdown fixed
2017-02-23 16:49:49 +05:30
Nabin Hait
60db08fd7f Merge pull request #7817 from KanchanChauhan/loan-management-fix
[Minor] Field label rename
2017-02-23 16:09:11 +05:30
Kanchan Chauhan
951e31667b [Minor] Company default currency in Salary Slip and Structure 2017-02-23 11:16:53 +05:30
Nabin Hait
97b3be6f9d Update salary_structure_employee.json 2017-02-23 11:10:05 +05:30
KanchanChauhan
90b42c4fa2 Merge pull request #7826 from KanchanChauhan/landed-cost-voucher-test
[Minor] Landed Cost Voucher test case fixed
2017-02-23 09:58:40 +05:30
Kanchan Chauhan
1d45a4312e [Minor] Landed Cost Voucher test case fixed 2017-02-23 08:44:02 +05:30
mbauskar
ddb9f0bf78 [minor] lead hide/unhide campain_name, customer field depending on source 2017-02-22 18:54:47 +05:30
mbauskar
d6e409ea92 [minor] hide recurring section if document is in __local state 2017-02-22 18:22:14 +05:30
Kanchan Chauhan
fe61c314b7 [Minor] Landed Cost Voucher test case fixed 2017-02-22 17:25:26 +05:30
Manas Solanki
7a61f12572 Fixes for attendance reports 2017-02-22 16:19:57 +05:30
Kanchan Chauhan
b249a6e6f7 [Fix] Disappearing Dropdown fixed 2017-02-22 15:39:07 +05:30
Nabin Hait
5079c9ef47 Fixed merge conflict 2017-02-22 15:31:31 +05:30
Kanchan Chauhan
6af7140763 [Minor] Field label rename 2017-02-22 14:58:34 +05:30
Nabin Hait
79dd816359 Merge branch 'manassolanki-shishu' into develop 2017-02-22 13:06:01 +05:30
Nabin Hait
08847bd06a minor fix 2017-02-22 13:05:46 +05:30
Nabin Hait
1e3a0b4632 Merge branch 'shishu' of https://github.com/manassolanki/erpnext into manassolanki-shishu 2017-02-22 12:12:58 +05:30
Nabin Hait
753c8dedde Update api.py 2017-02-22 11:53:13 +05:30
Nabin Hait
2d8047837c Merge pull request #7802 from KanchanChauhan/multiple-items-purchase
[Fix] Throw error if item is added multiple time
2017-02-22 11:43:17 +05:30
Kanchan Chauhan
f2803ac427 [Fix] Throw error if item is added multiple time 2017-02-22 10:40:38 +05:30
Manas Solanki
47aba953e2 Added student language doctype 2017-02-21 18:49:00 +05:30
Manas Solanki
f869a679ae Fixed Student Attendence 2017-02-21 18:49:00 +05:30
Nabin Hait
293158db6e Merge pull request #7808 from KanchanChauhan/attendance-rename-field
[Patch] Attendance Date field renamed
2017-02-21 16:01:50 +05:30
Nabin Hait
0142fdc0d7 Update rename_att_date_attendance.py 2017-02-21 16:01:21 +05:30
Kanchan Chauhan
42f55cf4b1 [Patch] Attendance Date rename field 2017-02-21 13:44:01 +05:30
Nabin Hait
d5442b5544 Merge pull request #7791 from nabinhait/pro_order_stock_qty
Build Qty considering quantity for which bom is created
2017-02-21 09:58:13 +05:30
Nabin Hait
16a4b58676 Merge branch 'pratu16x7-bom-view' into develop 2017-02-20 19:38:36 +05:30
Nabin Hait
391eca18c7 Fixed merge conflict 2017-02-20 19:38:22 +05:30
Nabin Hait
6fd8cca135 Merge pull request #7587 from noussh/develop
updated missing navigation links in Docs - Accounts
2017-02-20 19:33:55 +05:30
Nabin Hait
de7d7ba7d9 Merge pull request #7768 from mbauskar/develop
[minor] auto close opportunity after 7 days
2017-02-20 19:23:22 +05:30
Nabin Hait
0d66579e83 Merge branch 'develop' into develop 2017-02-20 19:22:03 +05:30
Nabin Hait
aa968cd12e Merge pull request #7751 from nick9822/patch-3
Next Depreciation Date is entered as past date
2017-02-20 19:11:31 +05:30
Nabin Hait
af6e41b637 Merge pull request #7467 from suyashphadtare/develop
[minor] Show Actual Item quantity in warehouse set query
2017-02-20 19:10:43 +05:30
Nabin Hait
cd837ecbac Merge branch 'develop' into develop 2017-02-20 19:09:20 +05:30
Nabin Hait
5422329b84 Merge branch 'KanchanChauhan-accrual-payroll-system' into develop 2017-02-20 19:01:27 +05:30
Nabin Hait
8bb69ff8bf Fixed merge conflict 2017-02-20 19:01:04 +05:30
Nabin Hait
e49d901907 Update process_payroll.py 2017-02-20 18:36:12 +05:30
Nabin Hait
afd8df8a20 Build Qty considering quantity for which bom is created 2017-02-20 18:06:50 +05:30
Nabin Hait
78ef086b00 Merge branch 'bcornwellmott-prod_ana' into develop 2017-02-20 17:42:07 +05:30
Nabin Hait
6ffd77660b Changed module for Production Analytics 2017-02-20 17:41:44 +05:30
Nabin Hait
3cdb65f782 Merge branch 'prod_ana' of https://github.com/bcornwellmott/erpnext into bcornwellmott-prod_ana 2017-02-20 17:25:01 +05:30
Nabin Hait
b44ae54813 Merge pull request #7785 from nabinhait/in_global_search
Added fields in global search
2017-02-20 15:05:01 +05:30
Nabin Hait
589f4656ad Merge branch 'develop' into in_global_search 2017-02-20 15:04:52 +05:30
Nabin Hait
9f4cb0c097 Fixed merge conflict 2017-02-20 15:00:04 +05:30
Nabin Hait
e6a5d5dc64 Merge pull request #7784 from mbauskar/minor-fixes
[minor] minor fixes for contact us page
2017-02-20 14:43:24 +05:30
Nabin Hait
da098222d7 Merge pull request #7780 from rohitwaghchaure/minor_fix_payment_entry
[Fix] Removed employee party type from the payment entry
2017-02-20 14:43:14 +05:30
Nabin Hait
fd3ec066ce Added fields in global search 2017-02-20 13:38:31 +05:30
Makarand Bauskar
98f9427ba1 [minor] minor fixes for contact us page 2017-02-20 12:41:48 +05:30
bcornwellmott
97ab1d2eb3 Merge pull request #7691 from bcornwellmott/stock_reports
Stock reports
2017-02-19 14:36:35 -08:00
bcornwellmott
568dac3aad Fixed Link Option for Warehouse 2017-02-19 14:04:20 -08:00
Rohit Waghchaure
f73d459c80 [Fix] Removed employee party type from the payment entry 2017-02-19 17:46:05 +05:30
Nabin Hait
02d987ed13 Minor fix for common tree view 2017-02-17 15:50:53 +05:30
Nabin Hait
83ba5c1319 Merge pull request #7770 from rohitwaghchaure/minor_issue_develop
[Fix] Payment entry fields issue, added total billed hours in timesheet
2017-02-17 15:20:06 +05:30
mbauskar
90818080b1 [minor] Configured Auto Close days for Opportunity and Issue 2017-02-17 14:56:00 +05:30
mbauskar
e1e25a0c9d [minor] auto close opportunity after 7 days 2017-02-17 14:54:50 +05:30
Rohit Waghchaure
a020e4eba4 Payment entry fields issue, added total billed hours in timesheet 2017-02-17 14:51:57 +05:30
Kanchan Chauhan
1b204c8e4e Accrual Payroll System 2017-02-16 16:30:51 +05:30
nick9822
23e174c270 Validation for purchase_date
Separate validation for purchase date.
2017-02-16 16:26:38 +05:30
Nabin Hait
de45b0eddc Merge branch 'master' into develop 2017-02-16 15:59:59 +05:30
Nabin Hait
d13d198dc8 Merge pull request #7747 from KanchanChauhan/item-name-asset
[Minor] Item Name in Asset
2017-02-16 15:15:23 +05:30
Nabin Hait
92c52f4623 Merge pull request #7732 from neilLasrado/student-left
Added ability to send newsletter to Student batch Guardians and Student Group Guardians
2017-02-16 14:40:14 +05:30
Nabin Hait
ea1cb68fe7 Merge branch 'master' into develop 2017-02-16 14:37:50 +05:30
Nabin Hait
507e6fa46e Merge pull request #7749 from KanchanChauhan/leave-application-cleanup
Rejected leave application can be submitted
2017-02-16 14:19:11 +05:30
Neil Trini Lasrado
fa2023d3da Added ability to send newsletter to Student batch Guardians and Student Group Guardians 2017-02-16 13:33:09 +05:30
pratu16x7
86415f394d [minor] duration bar 2017-02-16 09:27:53 +05:30
Kanchan Chauhan
11f159193e Rejected leave application can be submitted 2017-02-15 19:09:21 +05:30
Nabin Hait
2f7697d1bd Merge pull request #7746 from pratu16x7/minor-search-presets
Preset doctypes fields to Search
2017-02-15 18:46:03 +05:30
Nabin Hait
d9068497cb Merge pull request #7736 from KanchanChauhan/serial-no-status-report
[Fix] Serial No Status
2017-02-15 17:56:50 +05:30
Nabin Hait
b8624efe3a Merge pull request #7750 from KanchanChauhan/territory-filter-opportunity
[Minor] Is group filter removed from Territory in Opportunity
2017-02-15 17:41:31 +05:30
Nabin Hait
afef62c887 Merge pull request #7737 from KanchanChauhan/project-percentage
[Fix] Project % Completed set to 0 if no tasks
2017-02-15 17:28:53 +05:30
Nabin Hait
e827104a52 Merge pull request #7738 from KanchanChauhan/appraisal-fix
[Fix] Empty row in Goals of Appraisal fixed
2017-02-15 17:26:40 +05:30
nick9822
e5cb3e34fe nowdate changed to purchase_date
next depreciation date should be compared with purchase_date instead of nowdate.
2017-02-15 15:32:50 +05:30
Kanchan Chauhan
7118b5a2bd [Minor] Is group filter removed from Territory in Opportunity 2017-02-15 14:46:08 +05:30
Kanchan Chauhan
2307f57f19 [Minor] Item Name in Asset 2017-02-15 11:52:29 +05:30
pratu16x7
349ed568ed Add task and item 2017-02-15 09:23:26 +05:30
pratu16x7
ca56ad0bfc [minor] fix test 2017-02-14 18:49:26 +05:30
pratu16x7
462e89e452 [minor] margin fix 2017-02-14 17:18:10 +05:30
pratu16x7
0e94b4bec4 Mobile view fixes 2017-02-14 17:18:09 +05:30
pratu16x7
60fe77cc90 Website data from existing child tables, layout, images 2017-02-14 17:18:09 +05:30
pratu16x7
dee36e10ae Add operations and items to website 2017-02-14 17:18:09 +05:30
pratu16x7
aad8257e20 Add template 2017-02-14 17:18:09 +05:30
Kanchan Chauhan
ecdcac1fdf [Fix] Empty row in Goals of Appraisal fixed 2017-02-14 15:32:06 +05:30
KanchanChauhan
993358d5d7 Update install.md 2017-02-14 15:12:07 +05:30
Kanchan Chauhan
bab6c9c006 [Fix] Project perecentage set 0 if no tasks 2017-02-14 14:30:00 +05:30
Kanchan Chauhan
79cd59303a [Fix] Serial No Status 2017-02-14 12:49:36 +05:30
Nabin Hait
d8812020aa Merge pull request #7735 from mbauskar/develop
[minor] fetched tickets to closed using sql instead of get_all
2017-02-14 11:35:37 +05:30
mbauskar
2ecfd9be5d [minor] fetched tickets to closed using sql instead of get_all 2017-02-14 08:41:09 +05:30
Nabin Hait
7877b0ec1b Merge pull request #7730 from KanchanChauhan/minor-enhancement
[Minor] List of Contacts
2017-02-13 16:09:43 +05:30
Kanchan Chauhan
779c581a92 [Minor] List of Contacts 2017-02-13 16:01:52 +05:30
Neil Trini Lasrado
a388352171 Merge pull request #7719 from neilLasrado/student-left
Removed Nationality in Student Applicant as a link field to Country
2017-02-12 01:31:02 +05:30
Neil Trini Lasrado
1ab8554d15 Removed Nationality in Student Applicant as a link feild to Country 2017-02-12 01:29:24 +05:30
Neil Trini Lasrado
b2fdc131e8 Merge pull request #7718 from neilLasrado/student-left
Added Exit Section to Student master
2017-02-12 01:19:39 +05:30
Neil Trini Lasrado
c1bf70dc75 Added Exit Section to Student master 2017-02-12 01:17:52 +05:30
suyashphadtare
34ab136b46 [fix] Remove un-necessary Whitespace 2017-02-10 19:14:43 +05:30
suyashphadtare
750a067688 [minor][fix] Show all warehouses with item actual qty in warehouse set query 2017-02-10 19:14:43 +05:30
suyashphadtare
049a88cc40 [minor] Show item quantity in warehouse set query 2017-02-10 19:14:43 +05:30
KanchanChauhan
cc2c7649a8 [Minor] Stock Entry Fix (#7715) 2017-02-10 17:47:49 +05:30
Nabin Hait
29dfb9479b Merge pull request #7710 from joolsr/patch-1
Update customer.md
2017-02-10 13:23:06 +05:30
Ben Cornwell-Mott
67a13972fb Added warehouse to BOM Stock Report, fixed bugs with buildable qty 2017-02-09 23:21:52 -08:00
Nabin Hait
5a69f24dfe Merge pull request #7705 from rmehta/stock-entry-fix
[minor] added make material request from Stock Entry and removed cur_frm
2017-02-10 12:51:09 +05:30
Nabin Hait
b41b10976f Merge pull request #7644 from mbauskar/develop
[docs] Feedback triggers
2017-02-10 12:13:31 +05:30
mbauskar
edaa43d9b8 [docs] manual feedback request and minor fixes 2017-02-10 11:28:45 +05:30
bcornwellmott
630882787a Added buildable qty
The field indicates how many can be built.
2017-02-09 20:41:12 -08:00
bcornwellmott
fc41bb6afd Fixed code issues
Also changed qty to Quantity left to build
2017-02-09 20:37:11 -08:00
joolsr
f9fdbe2853 Update customer.md 2017-02-09 23:10:39 +00:00
Rushabh Mehta
cf99dc0e77 [fix] for setup wizard tests and demo; 2017-02-09 18:06:11 +05:30
Rushabh Mehta
e6aa3b435a [minor] added make material request from Stock Entry and removed cur_frm 2017-02-09 17:47:22 +05:30
Nabin Hait
2b5fa7647a Merge pull request #7662 from nick9822/patch-2
Sales analytics error after upgrade
2017-02-09 11:45:30 +05:30
Nabin Hait
e27a0d25bc Merge pull request #7654 from rohitwaghchaure/lead_tax_issue
[Fix] Set default tax on quotation when it's making from the lead
2017-02-09 11:43:22 +05:30
Nabin Hait
fafa3748f1 Merge pull request #7696 from khatrijitendra/patch-1
[Fix] "type" and "rate" fields
2017-02-08 16:26:08 +05:30
khatrijitendra
d262eb1a1c issue in type and rate
1. there is not such field, "type" it is "margin_type"
2. there is not such field,  "rate" it is "margin_rate_or_amount"
2017-02-08 14:59:59 +05:30
Nabin Hait
6ff0caa87a Fixed merge conflict 2017-02-08 11:33:33 +05:30
Ben Cornwell-Mott
05dca985e6 Fixed stock query and corrected with suggestions from rohit 2017-02-07 09:15:33 -08:00
mbauskar
1df0b9bfed [minor] minor fixes in feedback index.md 2017-02-07 15:20:08 +05:30
mbauskar
298acd3d1a [docs] Feedback triggers 2017-02-07 15:20:08 +05:30
Nabin Hait
70fd8546ce Merge pull request #7677 from KanchanChauhan/serial-no-in-return
[Fix] Serial No if is_return
2017-02-07 13:28:30 +05:30
Nabin Hait
555279b6e6 Merge pull request #7680 from bcornwellmott/patch-7
Duplicate "title" field
2017-02-07 13:27:46 +05:30
Nabin Hait
ddcb514b65 Merge pull request #7685 from KanchanChauhan/employee-details-in-salary-preview
[Fix] Employee Details in Salary Slip preview
2017-02-07 13:27:24 +05:30
Nabin Hait
401ac7a5e5 Merge pull request #7686 from mbauskar/fixes
[minor] auto close issue using ORM (document save method)
2017-02-07 13:26:14 +05:30
mbauskar
9c0bf73d25 [minor] auto close issue using ORM (document save method) 2017-02-07 12:50:05 +05:30
Kanchan Chauhan
842ad55235 [Fix] Employee Details in Salary Slip preview 2017-02-07 12:07:55 +05:30
Kanchan Chauhan
4f3b0aa249 [Fix]Serial No if is_return 2017-02-07 11:28:34 +05:30
Ben Cornwell-Mott
02c02bc572 Fixed counting to correctly reflect all status at each month 2017-02-06 20:58:25 -08:00
bcornwellmott
92b6ceec41 Duplicate "title" field
The title field was duplicated - removed first one.
2017-02-06 10:51:02 -08:00
Neil Trini Lasrado
2160638f36 Merge pull request #7679 from neilLasrado/stud-group
Added validation to check if Student in a student group exists in the…
2017-02-07 00:17:24 +05:30
Neil Trini Lasrado
c28598ae8b Merge pull request #7678 from neilLasrado/stud-att
Added validations to Student Attendance
2017-02-07 00:17:14 +05:30
Neil Trini Lasrado
3ade874f9e Added validations to Student Attendance 2017-02-06 20:07:02 +05:30
Neil Trini Lasrado
05dec9a880 Added validation to check if Studnet in a student group exists in the student batch specified 2017-02-06 20:05:16 +05:30
Rushabh Mehta
50862039dc [minor] fixes to schools 2017-02-06 14:28:52 +05:30
Rohit Waghchaure
ade06f940c [Fix] Set default tax on quotation when it's making from the lead 2017-02-06 12:14:09 +05:30
Nabin Hait
259489572d Merge pull request #7657 from rmehta/po-from-so
[enhance] production order from sales order
2017-02-06 11:41:56 +05:30
Ben Cornwell-Mott
28945438f2 Created button to link buying items to material requests 2017-02-05 18:55:57 -08:00
Ben Cornwell-Mott
36d04fda37 Fixed filter dates and date comparisons 2017-02-05 14:00:46 -08:00
Ben Cornwell-Mott
b4a2c2f047 Got proper cumulative data working 2017-02-05 13:39:39 -08:00
Ben Cornwell-Mott
943124275d Production Analytics 2017-02-04 14:25:53 -08:00
rohitwaghchaure
ac65e956e8 Merge pull request #7659 from saurabh6790/demo_user_perm_fix
[minor][fix] demo user perm fix
2017-02-03 16:51:33 +05:30
Rushabh Mehta
e92a740b53 [minor] school patch fix 2017-02-03 16:05:53 +05:30
nick9822
acb5e9a11b Sales analytics error after upgrade
Hi Team,

We were getting errors in sales analytics report after the upgrade. 
https://discuss.erpnext.com/t/sales-analytics-report-hangs-on-erpnext-v7/17951/6

With the efforts of @Tropicalrambler into the report we made it work by putting checkpoint for item.
Please see whether its good or there is better solution for it.

Thanks,
Nick
2017-02-03 12:31:54 +05:30
Saurabh
9ca3f2847a a[minor][fix] demo user perm fix 2017-02-02 19:22:36 +05:30
Rushabh Mehta
6ede4a3809 [enhance] production order from sales order 2017-02-02 17:42:01 +05:30
KanchanChauhan
ed94aa4798 Merge pull request #7624 from neilLasrado/eval-group
Code Refractor.
2017-02-02 17:39:08 +05:30
Neil Trini Lasrado
f37d329cf5 Merge branch 'develop' into eval-group 2017-02-02 17:30:10 +05:30
rohitwaghchaure
3f10c7f4fc Merge pull request #7609 from rmehta/remove-party-status
Remove Party Status
2017-02-02 16:10:26 +05:30
KanchanChauhan
6575a0a7e2 [Minor]ROI fix in Employee Loan (#7643) 2017-02-02 16:01:43 +05:30
Rushabh Mehta
a3d0bea375 Merge branch 'develop' into remove-party-status 2017-02-02 15:42:04 +05:30
Nabin Hait
c62362f064 Merge pull request #7649 from KanchanChauhan/salary-struct-fix
[Fix] Employee name fixes in Salary Structure
2017-02-02 13:30:05 +05:30
Kanchan Chauhan
a0314f19ca [Fix] Employee name fixes in Salary Structure 2017-02-02 12:56:56 +05:30
Neil Trini Lasrado
4aabe61197 Patch for renaming evaluation criteria 2017-02-01 19:32:28 +05:30
Saurabh
10eb123b49 Merge pull request #7645 from rohitwaghchaure/pos_minor_fix
Minor fix
2017-02-01 19:26:47 +05:30
Rohit Waghchaure
69060a8177 Minor fix 2017-02-01 19:14:53 +05:30
Neil Trini Lasrado
749516c22d Renamed Evaluation Criteria to Assessment Criteria 2017-02-01 18:47:36 +05:30
Rushabh Mehta
3714626dd0 [minor] enhance BOM view 2017-02-01 18:35:53 +05:30
KanchanChauhan
98595dff0b Merge pull request #7642 from frappe/revert-7641-employee-loan-fix
Revert "[Fix] Rate of Interest Fix"
2017-02-01 18:17:18 +05:30
KanchanChauhan
b499fe91fa Revert "[Fix] Rate of Interest Fix" 2017-02-01 18:16:35 +05:30
rohitwaghchaure
c13dbd408f [Enhancement] POS Redesign (#7639)
* item group, discount

* POS Redesign

* offline customer

* removed offline records from modal view
2017-02-01 18:07:22 +05:30
KanchanChauhan
929c3890a4 Merge pull request #7641 from KanchanChauhan/employee-loan-fix
[Fix] Rate of Interest Fix
2017-02-01 18:06:32 +05:30
KanchanChauhan
0e995adc44 Salary Structure Employee custom field can be used in Formula and Condition (#7615) 2017-02-01 18:05:57 +05:30
Kanchan Chauhan
f01c1c2a9d [Fix] Rate of Interest Fix 2017-02-01 18:05:26 +05:30
KanchanChauhan
3dc96cf71e Merge pull request #7640 from KanchanChauhan/remove-date-validation-salary-structure
[Minor] From Date validation removed from Salary Structure
2017-02-01 17:42:18 +05:30
Kanchan Chauhan
e67e2e6fee [Minor] From Date validation removed from Salary Structure 2017-02-01 17:41:36 +05:30
rohitwaghchaure
ea092a7b24 [Enhancement] Booking of an employee's expense claim (#7267)
* [Enhancement] Auto book of an employee's expense claim

* test cases

* documentation

* fixes and changes

* removed payable from employee and added into the company

* Added party in account, patch to update party type for customer and supplier accounts

* added party type in erpnext, fix patch

* fixed travis
2017-02-01 12:02:08 +05:30
Rushabh Mehta
587dd90182 [minor] removed customer status 2017-02-01 12:01:24 +05:30
Rushabh Mehta
99ce531beb [minor] css for team updates 2017-02-01 11:46:47 +05:30
Neil Trini Lasrado
d408553b93 Merge pull request #7623 from neilLasrado/guardian
Added Student table in Guardian (Only rendered for display purpose)
2017-01-31 18:18:50 +05:30
Neil Trini Lasrado
ebfb7ff027 Merge pull request #7625 from neilLasrado/student-batch
Added Mark Assessment Result Button in assessment plan
2017-01-31 18:18:32 +05:30
Neil Trini Lasrado
879a2d84dc Added Evaluation Criteria Group 2017-01-31 17:03:37 +05:30
Neil Trini Lasrado
477c88450f UI fixes for Guardian Doctype 2017-01-31 16:49:39 +05:30
Neil Trini Lasrado
9071bcbfa8 Added Student table in Guardian (Only rendered for display purpose) 2017-01-31 16:36:29 +05:30
Rushabh Mehta
7ec4b717ed [feature] added team updates page 2017-01-31 11:42:58 +05:30
Rohit Waghchaure
d9a265fab1 Merge branch 'develop' of github.com:frappe/erpnext into develop 2017-01-31 11:34:07 +05:30
Neil Trini Lasrado
1947aca2a8 Added Mark Assessment Result Button in assessment plan 2017-01-30 18:34:25 +05:30
Neil Trini Lasrado
ba96ce7dd5 Merge pull request #7616 from neilLasrado/assessment-validations
Patch fix for Update Assessment Module Patch
2017-01-30 17:50:37 +05:30
Neil Trini Lasrado
fd1767d2ea Patch fix for Update Assessment Module Patch 2017-01-30 17:50:05 +05:30
Rushabh Mehta
4500f7b4d6 [cleanup] remove unused LMS (#7612) 2017-01-30 17:04:38 +05:30
Neil Trini Lasrado
455824235a Merge pull request #7613 from neilLasrado/assessment-validations
Patch fix for Update Assessment Module Patch
2017-01-30 16:41:46 +05:30
Neil Trini Lasrado
ab1ee1e6fc Patch fix for Update Assessment Module Patch 2017-01-30 16:40:14 +05:30
Neil Trini Lasrado
dbd95936ea Merge pull request #7610 from neilLasrado/assessment-validations
Validations for Assessment Plan
2017-01-30 15:51:08 +05:30
Neil Trini Lasrado
80ca65c166 Added validation to ensure that the Sum of Scores of evaluation Criteras is equal to the max assessment score. 2017-01-30 15:28:41 +05:30
KanchanChauhan
fbaa6197f9 Employee Loan Management (#7126)
* [WIP] Employee Loan Management

* EMI calculation

* Fixing PR
2017-01-30 15:15:58 +05:30
Rushabh Mehta
364f48aad2 [minor] fix patch 2017-01-30 13:23:09 +05:30
Rushabh Mehta
87037bdd56 [minor] remove party status as it leads to duplicate notifications fixes #7346, also fix for #7568 2017-01-30 13:22:51 +05:30
Makarand Bauskar
d893efd0a9 [minor] replace object values in translations (#7602) 2017-01-30 12:35:34 +05:30
rohitwaghchaure
3b40098738 Merge pull request #7571 from RicardoJohann/projectfilter
added project filter to gl and carry project filter from P&L
2017-01-30 12:24:36 +05:30
rohitwaghchaure
0bdffa8130 Merge pull request #7533 from mbauskar/minor-fixes
[WIP] Address and Contact Fixes
2017-01-30 11:13:10 +05:30
mbauskar
16ce3623bc [fixes] set lead to Null on delete company transaction & other minor fixes 2017-01-30 10:45:28 +05:30
mbauskar
51b1d6de48 [minor] moved the address_and_contact utils to frappe 2017-01-30 10:45:28 +05:30
mbauskar
7fa039f15c [fixes] delete company transaction and other minor fixes 2017-01-30 10:45:28 +05:30
mbauskar
83f4780f74 [Fixes] Address and Contact fixes 2017-01-30 10:45:28 +05:30
mbauskar
8271b4c564 [minor] fixes in address filters 2017-01-30 10:45:28 +05:30
mbauskar
cbc49e2989 [WIP] Address and Contact Fixes 2017-01-30 10:45:28 +05:30
rohitwaghchaure
531b49f6c7 Merge pull request #7590 from KanchanChauhan/rename-task
[Minor]Task rename now possible
2017-01-30 09:29:10 +05:30
KanchanChauhan
2dfb90a922 Merge pull request #7565 from KanchanChauhan/leave-balance-report-fix
[Fix] Permissions to view Leave Balance Report
2017-01-29 21:07:02 +05:30
Rohit Waghchaure
92c9ad8c72 Merge branch 'master' into develop 2017-01-28 14:14:33 +05:30
KanchanChauhan
ecc44e506b Merge pull request #7597 from neilLasrado/guarding-name
Fixes to update student guardian name patch
2017-01-27 17:45:57 +05:30
Neil Trini Lasrado
6d0da98a78 Fixes to update student guardian name patch 2017-01-27 17:44:28 +05:30
KanchanChauhan
4db5dd3cc2 Merge pull request #7591 from neilLasrado/guarding-name
Added Guardian Name to Student Master
2017-01-27 17:31:22 +05:30
Neil Trini Lasrado
7ff5682193 Merge branch 'develop' into guarding-name 2017-01-27 16:54:50 +05:30
Neil Trini Lasrado
f36ff488c0 Added Guardian Name to Student Master 2017-01-27 16:53:55 +05:30
Rushabh Mehta
e239d4dfe9 Merge branch 'master' into develop 2017-01-27 16:18:26 +05:30
Rushabh Mehta
b5eaf324b3 Merge branch 'master' into develop 2017-01-27 16:03:30 +05:30
Rushabh Mehta
710dc5392f [merge] 2017-01-27 15:48:31 +05:30
KanchanChauhan
173fe24ef4 Merge pull request #7594 from neilLasrado/student-batch
Added 'Active' checkbox in list view for Student Batch and Student Group
2017-01-27 14:56:58 +05:30
Neil Trini Lasrado
7326217ab5 Added 'Active' checkbox in list view for Student Batch and Student Group 2017-01-27 14:50:48 +05:30
KanchanChauhan
6c85ad9726 Merge pull request #7593 from neilLasrado/student-batch
Fix- Student batch strength in Batch Wise attendance report
2017-01-27 14:18:40 +05:30
Neil Trini Lasrado
8c3fb43d8a Fix- Student batch strength in Batch Wise attendance report 2017-01-27 14:13:25 +05:30
Kanchan Chauhan
3dd85a0e9e Task rename now possible 2017-01-27 12:34:06 +05:30
Kanchan Chauhan
e877ecfb7b [Fix] Permissions to view Leave Balance Report 2017-01-27 11:53:56 +05:30
noussh
425d7adcdd Update recurring-orders-and-invoices.md 2017-01-26 15:38:57 +04:00
noussh
0350db6a4e added next link 2017-01-26 15:35:01 +04:00
noussh
1e86546e2c added the link 2017-01-26 12:53:45 +04:00
noussh
6396c90956 Update multi-currency-accounting.md 2017-01-26 12:52:29 +04:00
noussh
47fbc7efa5 adde the next page link 2017-01-26 12:50:34 +04:00
noussh
8b62626cec Wrong path updated 2017-01-25 19:44:32 +04:00
Nabin Hait
57e4ab70be Merge pull request #7580 from KanchanChauhan/calendar-manual-screenshots
New screenshots for Calendar user manual
2017-01-25 17:35:01 +05:30
Kanchan Chauhan
ce116417e1 New screenshots for Calendar user manual 2017-01-25 15:38:35 +05:30
robert schouten
67eff49516 [fix] compact print format not longer ignores format builder 2017-01-25 08:20:43 +08:00
Ricardo Johann
34354237fd added project filter to gl and carry project filter from P&L 2017-01-24 06:46:07 -03:00
vrms
1f1f56225c Update warehouse.md (#7544)
added some detail about link between Warehouse & Warehouse account & machanics of sub-warehousese (Warehouse >Room >Row > Shelf >box
2017-01-24 11:29:27 +05:30
KanchanChauhan
4333ce0fd8 Merge pull request #7569 from neilLasrado/assessment
Fix for update assessment modules patch
2017-01-24 10:52:50 +05:30
rohitwaghchaure
8452e60204 Merge pull request #7566 from KanchanChauhan/naming-series-fix
[Fix] Naming series issue fix
2017-01-24 10:31:33 +05:30
Neil Trini Lasrado
15c5ae0918 Fix for update assessment modules patch 2017-01-24 10:28:49 +05:30
Kanchan Chauhan
679cc23abb [Fix] Naming series issue fix 2017-01-23 17:20:55 +05:30
rohitwaghchaure
ab65f6d8b1 Merge pull request #7547 from mnatalia/develop
Added translations to the web page and item dashboard.
2017-01-23 15:57:33 +05:30
KanchanChauhan
d825409226 Merge pull request #7564 from neilLasrado/patch-fix
Fix for update assessment modules patch
2017-01-23 15:46:57 +05:30
Neil Trini Lasrado
d471ad2c45 Fix for update assessment modules patch 2017-01-23 14:59:19 +05:30
Rushabh Mehta
397e508fc0 [fix] sales_partner.js, fixes #7553 2017-01-21 16:58:57 +05:30
Nabin Hait
2a660fb695 Merge pull request #7551 from neilLasrado/assessment
Added ability to disable a student in student group/student batch
2017-01-20 20:10:38 +05:30
Nabin Hait
1f9d1bb877 Merge branch 'develop' into assessment 2017-01-20 20:09:44 +05:30
Neil Trini Lasrado
16d40cf0a3 Added ability to disable a student in student group/studnet batch 2017-01-20 19:33:09 +05:30
Nabin Hait
349d520ae2 Fixed merge conflict 2017-01-20 15:44:35 +05:30
mnatalia
e09407571c Added translations to the web page and item dashboard. 2017-01-20 12:00:25 +02:00
Nabin Hait
188f9da160 Merge pull request #7530 from KanchanChauhan/website-default-warehouse
[Minor] Set website warehouse as default warehouse
2017-01-20 12:11:42 +05:30
Kanchan Chauhan
03dc695c77 [Minor] Set website warehouse as default warehouse 2017-01-19 14:57:05 +05:30
Rushabh Mehta
c81621d3ce [minor] add progress bar in patch 2017-01-19 14:32:36 +05:30
Rushabh Mehta
00d3cd6d64 [fix] contact address link patch 2017-01-19 14:27:02 +05:30
Rushabh Mehta
818af75575 [patch] add patch for contact_address_update 2017-01-19 13:08:46 +05:30
Rushabh Mehta
d69fd1b8c0 [fix] update_salary_slip.py 2017-01-19 12:51:37 +05:30
Rushabh Mehta
683d98fd54 [fix] update_salary_slip.py 2017-01-19 12:48:03 +05:30
Rushabh Mehta
35e4d8b152 [fix] update_salary_slip.py 2017-01-19 12:47:27 +05:30
Rushabh Mehta
60908f4a08 [fix] update_salary_slip.py 2017-01-19 12:46:11 +05:30
Rushabh Mehta
26fdb113a8 [fix] update_salary_slip.py 2017-01-19 12:44:54 +05:30
Nabin Hait
eb80fdef82 Merge pull request #7520 from RobertSchouten/heatmap_limit_dev
[fix] accounts heatmaps now covering 366 days not 20
2017-01-19 09:15:20 +05:30
Nabin Hait
6b3670848e Merge pull request #7477 from rmehta/custom-perms
[minor] fix for custom perms
2017-01-18 17:03:58 +05:30
Rushabh Mehta
a0c41b70c4 [fix] tax rule test 2017-01-18 14:14:20 +05:30
robert schouten
c0888637cc [fix] accounts heatmaps now covering 366 days not 20 2017-01-18 15:25:58 +08:00
Rushabh Mehta
8f55d6bf3a [fix] test_shopping_cart.py 2017-01-17 22:15:17 +05:30
Rushabh Mehta
d14a6c058a [fix] stop recursion while adding role 2017-01-17 18:46:37 +05:30
Rushabh Mehta
982be9f11b [tests] fixed for shopping cart 2017-01-17 17:57:38 +05:30
Rushabh Mehta
7385b73449 [fix] test 2017-01-17 17:57:38 +05:30
Nabin Hait
dd839055e3 Fixed merge conflict 2017-01-17 15:52:56 +05:30
Nabin Hait
f8676b2058 Create Material Requests considering projected qty of items 2017-01-17 14:11:43 +05:30
Ben Cornwell-Mott
5597f6a830 Fixes counting of in stock parent assemblies and formatting of csv 2017-01-17 14:11:43 +05:30
Nabin Hait
1c91dc4589 Merge pull request #7475 from RobertSchouten/profitability_order
[fix] profiability analasyis orderby name
2017-01-17 12:39:24 +05:30
Nabin Hait
9e294ee454 Merge branch 'rfq_supplier_pull' into develop 2017-01-17 12:26:09 +05:30
Nabin Hait
2ad62c2892 In RFQ, get items from material requests based on possible supplier 2017-01-17 12:25:33 +05:30
Rushabh Mehta
592104ef68 [fix] tests 2017-01-17 12:06:53 +05:30
Nabin Hait
7c7b3c0ab4 Merge pull request #7465 from KanchanChauhan/attendance-enhancement
[Enhancement] Attendance Module
2017-01-17 11:47:02 +05:30
Nabin Hait
2dab8809e7 Merge pull request #7509 from kickapoo/develop
Add Full Name as option in HR Setting Employee creation option
2017-01-17 11:26:25 +05:30
Nabin Hait
bf01958b85 Merge pull request #7510 from dalwadani/develop
fix string translation
2017-01-17 11:12:15 +05:30
Nabin Hait
2f2b6df781 Merge pull request #7411 from KanchanChauhan/fleet-moved-to-hr
Fleet management moved to HR
2017-01-17 11:06:00 +05:30
Nabin Hait
b064cf39c2 Merge branch 'develop' into fleet-moved-to-hr 2017-01-17 11:05:39 +05:30
Nabin Hait
03f82240fa Merge pull request #7222 from neilLasrado/assessment
Redesign Assessment Module
2017-01-17 11:04:02 +05:30
Dhaifallah Alwadani
9375d1dfeb fix string translation 2017-01-16 04:05:40 -08:00
Stavros Anastasiadis
241e478dc0 Add Full Name as option in HR Setting Employee creation option 2017-01-16 14:02:28 +02:00
Rushabh Mehta
ffd80a6061 [fix] warehouse test cases 2017-01-16 17:23:20 +05:30
Rushabh Mehta
6695830f3f [fix] warehouse test cases 2017-01-16 16:57:53 +05:30
Kanchan Chauhan
f80c2b9606 Fleet management moved to HR 2017-01-16 14:38:24 +05:30
Rushabh Mehta
8d39fd9790 [fix] address queries + tests 2017-01-16 13:06:15 +05:30
Nabin Hait
120461efef Merge branch 'master' into develop 2017-01-16 13:04:54 +05:30
KanchanChauhan
b89be1e193 [Minor] Demo fixes (#7499) 2017-01-16 12:57:14 +05:30
Neil Trini Lasrado
38bd62d82d Merge branch 'develop' into assessment 2017-01-16 12:23:51 +05:30
Rushabh Mehta
4ad121e1a4 [minor] fixes for Contact 2017-01-16 12:19:21 +05:30
ci2014
820abd3ba4 Fix missing comma (#7495)
Fixed missing comma after method set_contact_link
2017-01-16 11:57:34 +05:30
Rushabh Mehta
95439db53f [fixes] address and contact 2017-01-14 00:25:22 +05:30
Rushabh Mehta
c0bfb0ba56 [fix] contact and address for demo 2017-01-13 23:05:56 +05:30
Rushabh Mehta
b92087cb2d [cleanup] move contact, address to frappe 💥 2017-01-13 18:54:47 +05:30
Nabin Hait
448acf6f46 Merge branch 'master' into develop 2017-01-13 17:30:46 +05:30
Nabin Hait
26ac85be5b Merge branch 'master' into develop 2017-01-13 17:10:52 +05:30
robert schouten
7a3d418aa5 Email inbox based off of frappe email inbox pr (#7308)
* email inbox

* inbox fixes

* separate email-inbox to pass tests

* separate email-inbox to pass tests

* fix import

* add more info to contact and address
2017-01-13 14:51:09 +05:30
Rushabh Mehta
af077dc616 [minor] fix for custom perms 2017-01-13 14:47:37 +05:30
Nabin Hait
b251cd4ccb Fixed merge conflict 2017-01-13 14:34:54 +05:30
robert schouten
1a92d54dcb [fix] profiability analasyis orderby cost center name 2017-01-13 14:52:11 +08:00
Nabin Hait
ba2a76cfb7 Merge pull request #7453 from KanchanChauhan/salary-register-report
Changes to Salary Register
2017-01-13 11:51:48 +05:30
Nabin Hait
007c87ea63 Merge pull request #7440 from nabinhait/gle_repost_optimization
Optimization to reduce GLE reposting time for future stock transactions
2017-01-13 11:33:42 +05:30
Nabin Hait
4440ac037f Merge pull request #7470 from frappe/forellana-digithinkit-patch-1
[FIX] Contact form breaks on existing lead
2017-01-13 11:29:10 +05:30
robert schouten
d56627f2b7 [fix] profiability analasyis orderby project name 2017-01-13 11:53:43 +08:00
Felipe Orellana
ac81440a81 [FIX] Contact form breaks on existing lead
When an email address from the contacts form is from a existing lead utils.py tries to set new_lead(an undefined var) as the lead reference if a lead is found.
2017-01-12 12:08:20 -05:00
Kanchan Chauhan
7933eb685c [Enhancement] Attendance Module 2017-01-12 17:24:53 +05:30
bcornwellmott
5dfffe7586 Merge pull request #7449 from RicardoJohann/rename_ss
allowed rename salary structure
2017-01-11 09:15:03 -08:00
Kanchan Chauhan
2f3ae914a6 Changes to Salary Register 2017-01-11 19:45:01 +05:30
Ben Cornwell-Mott
1cd7e54822 Adds button to find MRs linked to Supplier 2017-01-11 03:05:49 -08:00
RicardoJohann
7182de7684 allowed rename salary structure 2017-01-11 06:28:59 -02:00
Ben Cornwell-Mott
3d491f90cc Created 2 reports for stock details 2017-01-10 14:14:18 -08:00
Neil Trini Lasrado
2a9e0f6fd8 Added assessment result tool 2017-01-10 17:32:02 +05:30
Nabin Hait
9e08ccdf39 Merge pull request #7425 from KanchanChauhan/sync-projecttask-task
Sync Project Task and Task
2017-01-10 17:26:51 +05:30
Kanchan Chauhan
4a15fa4c86 Sync Project Task and Task 2017-01-10 16:01:38 +05:30
Rushabh Mehta
d40e661ebd [style] better demo start page 2017-01-10 14:46:54 +05:30
Nabin Hait
51d45d8bce Fixed merge conflict 2017-01-10 12:32:01 +05:30
Nabin Hait
b083591164 Merge pull request #7418 from frappe/revert-7409-daterangecontrol
Revert "proposed usage of daterange picker"
2017-01-10 12:20:14 +05:30
Nabin Hait
01baceb74e Revert "proposed usage of daterange picker" 2017-01-10 12:19:48 +05:30
Neil Trini Lasrado
5a30467ae5 Added test case 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
a56224c03a Rename Assessment to Assessment Plan 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
233ecfdd9c Renamed min_score to threshold in Grading Scale 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
577cfd559f Removed LMS code in Course master 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
5c87455918 Patch for assessment module redesign 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
06ed74dc7c Redesign Assessment Module 2017-01-09 18:26:02 +05:30
Nabin Hait
6e9d2a3c1f fixed conflict 2017-01-09 17:21:34 +05:30
Nabin Hait
23b836dcdb Merge pull request #7386 from arvindstutzen/patch-1
Update step-8-customer-names.md
2017-01-09 15:55:38 +05:30
Nabin Hait
297ae85c31 Merge pull request #7409 from RobertSchouten/daterangecontrol
proposed usage of daterange picker
2017-01-09 15:55:17 +05:30
nick9822
6f48d4be1c whitelisted erpnext.stock.utils.get_stock_balance (#7402)
whitelisted erpnext.stock.utils.get_stock_balance with respect to
https://github.com/frappe/erpnext/issues/7364
2017-01-09 12:12:36 +05:30
robert schouten
81130e848e proposed usage of daterange picker 2017-01-09 08:38:27 +08:00
Rushabh Mehta
8b133ac087 [minor] [tests] fix, tests will fail on the 5th of a month! 2017-01-06 17:21:04 +05:30
Nabin Hait
7b4bdffea2 Merge pull request #7385 from bhupennewalkar1337/quot
Fix#6590  Now you can make quotation from supplier quotation
2017-01-05 14:58:52 +05:30
Nabin Hait
59a67c3586 Update supplier_quotation.py 2017-01-05 14:58:30 +05:30
Arvind Subramanian
efc9372f46 Update step-8-customer-names.md 2017-01-05 08:34:58 +05:30
bhupen
107099aac9 you can make quotation from supplier quotation 2017-01-04 17:04:12 +05:30
Nabin Hait
d08c248642 Merge pull request #7354 from Scheercuzy/enlarge-item-image-website
Hyperlink on item image on website
2017-01-04 15:58:44 +05:30
britlog
35cefb1275 fix success_list if http status == 200 + utf-8 support + optional success message 2017-01-04 15:53:26 +05:30
Nabin Hait
8281b36a26 Merge pull request #7380 from KanchanChauhan/emailid-to-emailaddress
Email ID renamed to Email Address
2017-01-04 15:46:48 +05:30
Nabin Hait
f45851c245 Merge pull request #7379 from KanchanChauhan/accounts-reports
[Enhancement] Summary link on Accounts Payable and Accounts Receivable
2017-01-04 15:45:39 +05:30
Nabin Hait
96562e3eb7 Merge pull request #7362 from rmehta/minor-fixes
[minor] dont get warehouse in opening entry #7353
2017-01-04 15:42:23 +05:30
Nabin Hait
3051a3dd97 Fixed test case for margin 2017-01-04 15:11:58 +05:30
Kanchan Chauhan
b7cc393eb8 Email ID renamed to Email Address 2017-01-03 16:45:38 +05:30
Kanchan Chauhan
f4832cf2b9 [Enhancement] Summary link on Accounts Payable and Accounts Receivable 2017-01-03 16:29:41 +05:30
Scheercuzy
7c161cfff2 Merge remote-tracking branch 'frappe/develop' into enlarge-item-image-website 2017-01-03 16:03:43 +06:30
Nabin Hait
ab42fc006f Merge branch 'master' into develop 2017-01-02 17:26:55 +05:30
KanchanChauhan
4601fdd98d Better Salary Slip logs in Process Payroll (#7322) 2016-12-30 16:26:55 +05:30
Nabin Hait
9784d27317 Optimization to reduce GLE reposting time for future stock transactions 2016-12-30 16:21:35 +05:30
Nabin Hait
ce5f942678 Merge branch 'master' into develop 2016-12-30 15:54:32 +05:30
Rushabh Mehta
985cb8226d [minor] dont get warehouse in opening entry #7353 2016-12-30 15:06:54 +05:30
Nabin Hait
e97d40806f Merge branch 'master' into develop 2016-12-30 14:56:20 +05:30
Rushabh Mehta
a8326de4d0 [fix] on_update in item.py 2016-12-30 06:17:45 +05:30
Rushabh Mehta
2097ccfaea [fix] item_group.py #7358 2016-12-30 06:09:41 +05:30
Scheercuzy
f483582957 Hyperlink Item Image
added hyperlink on item image
2016-12-29 18:56:44 +06:30
Nabin Hait
f327a58b7f Merge branch 'master' into develop 2016-12-29 11:04:05 +05:30
Nabin Hait
2469f247df Merge pull request #7341 from StrellaGroup/develop
Fixed spelling errors on Production Planning Tool and manual.
2016-12-28 17:12:01 +05:30
Nabin Hait
392806c0d4 Merge pull request #7342 from neilLasrado/develop
Added Guardian to school module
2016-12-28 16:26:16 +05:30
Neil Trini Lasrado
986927ca98 Added Guardian to school module 2016-12-28 16:15:35 +05:30
Muhammad Huzaifah Bin Ismail
465da8ce09 Fixed spelling errors on Production Planning Tool and manual. 2016-12-28 18:15:45 +08:00
Nabin Hait
340c9d327a Merge pull request #7339 from neilLasrado/develop
[Fix] Student Monthly Attendance Sheet
2016-12-28 13:42:18 +05:30
Neil Trini Lasrado
0152516ba4 [Fix] Student Monthly Attendance Sheet 2016-12-28 13:01:14 +05:30
Rushabh Mehta
5cb1b6bf3f [minor] translation fix 2016-12-27 16:30:20 +05:30
Nabin Hait
3bcf9b5e70 Fixed merge conflict 2016-12-27 14:30:17 +05:30
Rushabh Mehta
512b85e040 [minor] replace autocomplete with awesomplete 2016-12-27 12:14:37 +05:30
Rushabh Mehta
e60c2c7b7a [minor] dashboard cleanups 2016-12-27 12:14:37 +05:30
Nabin Hait
9007815ddc Merge pull request #7326 from neilLasrado/develop
Improved Student Dashboard
2016-12-26 18:33:19 +05:30
Neil Trini Lasrado
22239ac610 Improved Student Dashboard 2016-12-26 17:14:16 +05:30
Nabin Hait
88817b40df Merge pull request #7284 from mntechnique/develop
Report : Batch Item Expiry Status
2016-12-26 16:10:46 +05:30
Nabin Hait
4573029a5e Merge pull request #7292 from frappe/bcornwellmott-patch-1
Add hours to calendar labels
2016-12-26 16:09:11 +05:30
Nabin Hait
0631d516ce Merge pull request #7290 from netchampfaris/pos-item-area-scroll
pos item area scrollable
2016-12-26 16:07:38 +05:30
Nabin Hait
488ad54bbc Merge pull request #7280 from neilLasrado/leave
Added mark as present to student leave application
2016-12-26 16:06:44 +05:30
Nabin Hait
0d49cdf024 Merge pull request #7324 from nabinhait/lcv_testcase
[test] Fixed test cases for LCV
2016-12-26 15:52:40 +05:30
Neil Trini Lasrado
df4b9ab630 Optimised code for Student Monthly Attendance Report 2016-12-26 15:40:01 +05:30
Nabin Hait
7b2177a544 [test] Fixed test cases for LCV 2016-12-26 15:31:05 +05:30
Neil Trini Lasrado
94f42ea145 Added from date and to date to student leave application 2016-12-26 12:09:27 +05:30
Neil Trini Lasrado
9a7cb6ce92 Added mark as present to student leave application 2016-12-26 12:09:27 +05:30
Nabin Hait
61a190dd69 Merge branch 'master' into develop 2016-12-24 11:01:26 +05:30
Nabin Hait
ba95fc4fa0 Fixed version conflict 2016-12-23 17:44:05 +05:30
Nabin Hait
c2d66bdfb2 Merge branch 'master' into develop 2016-12-23 16:45:09 +05:30
Nabin Hait
aa2d949f61 Merge pull request #7295 from bhupennewalkar1337/lcv
Fix#3717  entering amount in lcv is enabled
2016-12-23 15:49:07 +05:30
Nabin Hait
1e1e28b0ae Update landed_cost_voucher.js 2016-12-23 15:48:57 +05:30
Nabin Hait
06c6628481 Merge pull request #7279 from KanchanChauhan/automate-user-creation
Create User button in Employee if no User ID selected
2016-12-23 15:31:55 +05:30
Nabin Hait
0177c02c0f Merge pull request #7286 from rohitwaghchaure/pos_letter_head_issue
minor fix
2016-12-23 15:19:32 +05:30
bhupen
a83de5eac1 applicabe charges field is now editable 2016-12-22 16:24:14 +05:30
bhupen
914ae77a22 Limit instead of Allowance in stock settings 2016-12-22 16:24:14 +05:30
bhupen
5bb85e7a95 partially orderd status will be shown in material request 2016-12-22 16:24:14 +05:30
bcornwellmott
e549984a42 Grabs title from SQL
Gets a concatenated title label for the Calendar event that includes the number of hours
2016-12-21 12:36:45 -08:00
bcornwellmott
3385bd4921 Add hours to label in calendar view
Adds a label for the number of hours to each calendar event
2016-12-21 12:33:32 -08:00
Faris Ansari
0822e41f96 pos item area scrollable 2016-12-21 18:17:00 +05:30
Revant Nandgaonkar
1c00b1fb21 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2016-12-21 18:01:35 +05:30
Rushabh Mehta
0632ee3da9 Merge branch 'v7.2.0-beta' into develop 2016-12-21 17:31:09 +05:30
Rushabh Mehta
c6bd7ade2f [fix] inclusive tax + total bug and cleanup in stock entry get_uom, fixes #7253 2016-12-21 17:30:29 +05:30
Kanchan Chauhan
58ed0c6efa Create User button in Employee if no User ID selected 2016-12-21 16:18:59 +05:30
Revant Nandgaonkar
00e65cb70b Report - Batch Item Expiry Status
Changed column name `Expiry Status` to `Expiry (In Days)`
Changed column type from Data to Int
2016-12-21 14:21:53 +05:30
Rohit Waghchaure
d567e57f82 minor fix 2016-12-21 13:18:36 +05:30
Revant Nandgaonkar
c30ae28422 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2016-12-21 12:52:23 +05:30
Revant Nandgaonkar
0766d3e67e Report : Batch Item Expiry Status
Select From Date and To Date
Lists Items about to expire or already expired
Expiry Status column shows number of days in which item/batch will expire
2016-12-21 12:32:12 +05:30
Nabin Hait
e7939fd87b Merge branch 'master' into develop 2016-12-21 12:18:38 +05:30
Nabin Hait
2b8aafb08d Merge pull request #7276 from neilLasrado/develop
Allow Data Import for Student Guardian
2016-12-21 11:17:13 +05:30
rohitwaghchaure
34e820d02d [Enhancement] Added letter head for the report (#7250) 2016-12-20 16:54:24 +05:30
Rushabh Mehta
17d05b4fd7 Merge branch 'v7.2.0-beta' into develop 2016-12-20 12:59:29 +05:30
Rushabh Mehta
89af62a680 Merge branch 'v7.2.0-beta' into develop 2016-12-20 12:21:03 +05:30
Neil Trini Lasrado
8979e1c7a5 Allow Data Import for Student Guardian 2016-12-20 11:53:52 +05:30
Nabin Hait
f573d43b90 fixed version conflict 2016-12-20 11:40:15 +05:30
Rushabh Mehta
f944fb9e46 Merge branch 'v7.2.0-beta' into develop 2016-12-19 17:06:56 +05:30
Rushabh Mehta
688f2284af [minor] [patch] 2016-12-19 13:15:52 +05:30
Rushabh Mehta
a320b1a494 Merge branch 'v7.2.0-beta' into develop 2016-12-19 12:32:44 +05:30
Rushabh Mehta
e80208e6e5 Merge branch 'v7.2.0-beta' into develop 2016-12-19 12:02:14 +05:30
Rushabh Mehta
6fc6670a25 Delete zh-tw.csv (#7260) 2016-12-19 11:57:59 +05:30
Nabin Hait
c9b6a07732 [fix] Remove recurring id on amendment only if it is same as amended_from 2016-11-16 18:43:44 +05:30
1155 changed files with 135791 additions and 97776 deletions

View File

@@ -1,61 +1,36 @@
##General Overview
### Introduction (first timers)
We have three branches where all the work happens:
Thank you for your interest in raising an Issue with ERPNext. An Issue could mean a bug report or a request for a missing feature. By raising a bug report, you are contributing to the development of ERPNext and this is the first step of participating in the community. Bug reports are very helpful for developers as they quickly fix the issue before other users start facing it.
* **master** - This is the stable branch based on which we do releases. This branch is for production.
* **develop** - This is an unstable branch for development purposes, it has bleeding edge features and fixes, but it's not recommended for production. Bug fixes and new features go here.
* **hotfix** - This is a branch dedicated to hotfixes on the master branch. Urgent bug fixes go here.
Feature requests are also a great way to take the product forward. New ideas can come in any user scenario and the issue list also acts a roadmap of future features.
When you are raising an Issue, you should keep a few things in mind. Remember that the developer does not have access to your machine so you must give all the information you can while raising an Issue. If you are suggesting a feature, you should be very clear about what you want.
Once we deem the develop branch to be stable, we merge it into the master and do a major release. The hotfix branch is solely for making urgent bug fixes on the current master branch, which we then merge into master.
The Issue list is not the right place to ask a question or start a general discussion. If you want to do that , then the right place is the forum [https://discuss.erpnext.com](https://discuss.erpnext.com).
We almost never push directly to master.
### Reply and Closing Policy
If your issue is not clear or does not meet the guidelines, then it will be closed. If it is closed, please supply the information asked and re-open it.
***
### General Issue Guidelines
1. **Search existing Issues:** Before raising a Issue, search if it has been raised before. Maybe add a 👍 or give additional help by creating a mockup if it is not already created.
1. **Report each issue separately:** Don't club multiple, unreleated issues in one note.
1. **Brief:** Please don't include long explanations. Use screenshots and bullet points instead of descriptive paragraphs.
##Workflow
### Bug Report Guidelines
Contributing to ERPNext is not very different from the usual Pull Request workflow on GitHub.
1. **Steps to Reproduce:** The bug report must have a list of steps needed to reproduce a bug. If we cannot reproduce it, then we cannot solve it.
1. **Version Number:** Please add the version number in your report. Often a bug is fixed in the latest version
1. **Clear Title:** Add a clear subject to your bug report like "Unable to submit Purchase Order without Basic Rate" instead of just "Cannot Submit"
1. **Screenshots:** Screenshots are a great way of communicating the issues. Try adding annotations or using LiceCAP to take a screencast in `gif`.
###Prerequisites :
### Feature Request Guidelines
* You need to know [Git and Github basics](https://try.github.io/levels/1/challenges/1)
* You need to have a Fork of the [ERPNext repo](https://github.com/frappe/erpnext) in your personal Github account
* You need to add a [remote](#glossary) for your Forked repository. `git remote add origin [your-erpnext-repo-url]`
1. **Clarity:** Clearly specify how do you want the feature to behave. Don't just say "I would like multiple PDF formats", say that "Ability to add multiple print formats for customers with different languages".
1. **Solution:** Try and identify how the feature should look like.
1. **Mockups:** Mockups are a great way to explain your requirement.
### What if my Issue is closed
###The Process:
1. Make sure you're in the right branch. **develop** for adding features / fixing issues and **hotfix** for urgent bug fixes
2. Make your changes
3. Create and checkout a new branch for the changes you've made. `git checkout -b [branch-name]`
4. Add and commit your changes `git commit -am "[commit-message]"
5. If you have been working on sometime for a long time, you should [rebase](#glossary) your branch with our develop branch. `git pull upstream develop --rebase` where `upstream` is the remote name of our repo
6. Now, push your changes to your fork. `git push origin [branch-name]`
If you rebased your commits, you will have to [force push](http://vignette2.wikia.nocookie.net/starwars/images/e/ea/Yodapush.png/revision/latest?cb=20130205190454) `git push origin [branch-name] --force`
7. You should now be able to see your pushed branch on Github, now create a pull request against the branch that you want to merge to.
8. Wait for us to review it
###Common Problems:
* During rebase you might face _merge conflicts_. A merge conflict occurs when you have made changes to the same file that someone else has, in the commits you're pulling. You need to resolve these conflicts by picking which code you want to keep, yours or theirs. You can use `git mergetool` for help.
* Sometimes you don't have a local branch to which you want to make changes to. In that case you first run `git fetch` followed by `git checkout --track -b upstream/[branch-name]`
###Good practices:
* You should rebase your branch with the branch you plan to make a Pull Request to as often as you can.
* Your commit messages should be precise and explain exactly what the commit does. Same goes for the Pull Request title.
* When making a PR make sure that all your code is committed properly by checking the diffs.
* If you're working on different things at the same time, make sure you make separate branches for each.
* Don't create new DocTypes unless absolutely necessary. If you find that there is a another DocType with a similar functionality, then please try and extend that functionality.
* DRY. Don't Repeat Yourself. Before writing up a similar function /feature make sure it doesn't exist in the codebase already.
* Tabs, not spaces.
###Glossary
* remote - A remote is a connection to a Github repo. You should have two remotes, one that points to your repo and one to ours.
* rebase - When you rebase a branch, you pull commits from your remote branch and move your commits on top of it. This allows you to update your branch with the latest changes without losing your changes.
Don't worry, take the feedback, supply the correct information and re-open it!

View File

@@ -13,6 +13,7 @@ before_install:
install:
- sudo apt-get purge -y mysql-common mysql-server mysql-client
- nvm install v7.10.0
# - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
# - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

View File

@@ -38,6 +38,15 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document
---
## Contributing
1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines)
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
1. [Translations](https://translate.erpnext.com)
1. [Chart of Accounts](https://charts.erpnext.com)
---
## Logo and Trademark
The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd.

View File

@@ -2,7 +2,8 @@
from __future__ import unicode_literals
import frappe
__version__ = '7.2.28'
__version__ = '8.0.44'
def get_default_company(user=None):
'''Get default company for user'''
@@ -19,8 +20,37 @@ def get_default_company(user=None):
return default_company
def get_default_currency():
'''Returns the currency of the default company'''
company = get_default_company()
if company:
return frappe.db.get_value('Company', company, 'default_currency')
def get_company_currency(company):
'''Returns the default company currency'''
if not frappe.flags.company_currency:
frappe.flags.company_currency = {}
if not company in frappe.flags.company_currency:
frappe.flags.company_currency[company] = frappe.db.get_value('Company', company, 'default_currency')
return frappe.flags.company_currency[company]
def set_perpetual_inventory(enable=1):
accounts_settings = frappe.get_doc("Accounts Settings")
accounts_settings.auto_accounting_for_stock = enable
accounts_settings.save()
def encode_company_abbr(name, company):
'''Returns name encoded with company abbreviation'''
company_abbr = frappe.db.get_value("Company", company, "abbr")
parts = name.rsplit(" - ", 1)
if parts[-1].lower() != company_abbr.lower():
parts.append(company_abbr)
return " - ".join(parts)

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -76,7 +78,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account Name",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Group",
@@ -134,7 +138,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Root Type",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Report Type",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -278,6 +287,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Parent Account",
@@ -308,7 +318,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Account Type",
@@ -340,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate",
@@ -370,6 +382,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frozen",
@@ -400,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -428,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Balance must be",
@@ -456,6 +471,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lft",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rgt",
@@ -510,6 +527,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Old Parent",
@@ -538,7 +556,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:43:50.121671",
"modified": "2017-02-17 16:22:49.249075",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
@@ -554,7 +572,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -575,7 +592,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -596,7 +612,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -617,7 +632,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -638,7 +652,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -654,6 +667,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "",
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -3,11 +3,12 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint
from frappe.utils import cint, fmt_money
from frappe import throw, _
from frappe.model.document import Document
class RootNotEditable(frappe.ValidationError): pass
class BalanceMismatchError(frappe.ValidationError): pass
class Account(Document):
nsm_parent_field = 'parent_account'
@@ -162,23 +163,38 @@ class Account(Document):
throw(_("Report Type is mandatory"))
def validate_warehouse_account(self):
'''If perpetual inventory is set, and warehouse is linked,
the account balance and stock balance as of now must always match.
'''
from erpnext.accounts.utils import get_balance_on
from erpnext.stock.utils import get_stock_value_on
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
return
if self.account_type == "Stock" and not cint(self.is_group):
if not self.warehouse:
throw(_("Warehouse is mandatory"))
old_warehouse = cstr(frappe.db.get_value("Account", self.name, "warehouse"))
if old_warehouse != cstr(self.warehouse):
if old_warehouse and frappe.db.exists("Warehouse", old_warehouse):
self.validate_warehouse(old_warehouse)
if self.warehouse:
self.validate_warehouse(self.warehouse)
if self.account_type == "Stock":
if self.is_group == 0 and not self.warehouse:
frappe.throw(_("Warehouse is mandatory for non group Accounts of type Stock"))
if self.warehouse:
# company must be same
if frappe.get_value('Warehouse', self.warehouse, 'company') != self.company:
frappe.throw(_("Warehouse company must be same as Account company"))
# balance must be same
stock_balance = get_stock_value_on(self.warehouse)
if self.is_new():
account_balance = 0.0
else:
account_balance = get_balance_on(self.name)
if account_balance != stock_balance:
frappe.throw(_('Account balance ({0}) for {1} and stock value ({2}) for warehouse {3} must be same')
.format(fmt_money(account_balance, currency=self.account_currency), self.name,
fmt_money(stock_balance, currency=self.account_currency), self.warehouse))
elif self.warehouse:
self.warehouse = None
def validate_warehouse(self, warehouse):
lft, rgt = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt"])

View File

@@ -117,7 +117,7 @@ def get_charts_for_country(country):
def get_account_tree_from_existing_company(existing_company):
all_accounts = frappe.get_all('Account',
filters={'company': existing_company},
filters={'company': existing_company, "warehouse": ""},
fields = ["name", "account_name", "parent_account", "account_type",
"is_group", "root_type", "tax_rate"],
order_by="lft, rgt")
@@ -125,14 +125,14 @@ def get_account_tree_from_existing_company(existing_company):
account_tree = {}
# fill in tree starting with root accounts (those with no parent)
build_account_tree(account_tree, None, all_accounts)
if all_accounts:
build_account_tree(account_tree, None, all_accounts)
return account_tree
def build_account_tree(tree, parent, all_accounts):
# find children
parent_account = parent.name if parent else None
children = [acc for acc in all_accounts if acc.parent_account == parent_account]
parent_account = parent.name if parent else ""
children = [acc for acc in all_accounts if cstr(acc.parent_account) == parent_account]
# if no children, but a group account
if not children and parent.is_group:

View File

@@ -88,10 +88,7 @@
"Items Delivered to Customs on temprary Base": {}
},
"Stock in Hand": {
"All Warehouses": {
"account_type": "Stock",
"is_group": 1
},
"is_group": 1,
"account_type": "Stock"
}
},
@@ -341,9 +338,7 @@
"Post Dated Cheques Paid": {
"account_type": "Payable"
},
"Staff Payable": {
"account_type": "Payable"
},
"Staff Payable": {},
"Suppliers Price Protection": {
"account_type": "Payable"
},

View File

@@ -22,20 +22,10 @@
},
"1120.000 Bank ": {
"1121.000 Bank Rupiah": {
"1121.0010 Bank 1": {
"account_type": "Bank"
},
"1121.0020 Bank 2": {
"account_type": "Bank"
}
"is_group": 1
},
"1122.000 Bank Other Currency": {
"1122.0010 Bank 1": {
"account_type": "Bank"
},
"1122.0020 Bank 2": {
"account_type": "Bank"
}
"is_group": 1
},
"account_type": "Bank"
},

View File

@@ -136,7 +136,8 @@
"Accounts Payable": {
"Creditors": {
"account_type": "Payable"
}
},
"Payroll Payable": {}
},
"Stock Liabilities": {
"Stock Received But Not Billed": {

View File

@@ -40,10 +40,7 @@
"Rental Deposits": {}
},
"Stock Assets": {
"All Warehouses": {
"account_type": "Stock",
"is_group": 1
},
"is_group": 1,
"account_type": "Stock"
},
"Tax Assets": {
@@ -265,7 +262,8 @@
"Accounts Payable": {
"Creditors": {
"account_type": "Payable"
}
},
"Payroll Payable": {}
},
"Duties and Taxes": {
"Deferred Tax Liabilities-Current": {},

View File

@@ -142,7 +142,8 @@
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
}
},
"Payroll Payable": {}
},
"Duties and Taxes": {
"account_type": "Tax",

View File

@@ -107,7 +107,7 @@ def get():
_("Office Maintenance Expenses"): {},
_("Office Rent"): {},
_("Postal Expenses"): {},
_("Print and Stationary"): {},
_("Print and Stationery"): {},
_("Round Off"): {
"account_type": "Round Off"
},
@@ -137,7 +137,8 @@ def get():
_("Accounts Payable"): {
_("Creditors"): {
"account_type": "Payable"
}
},
_("Payroll Payable"): {},
},
_("Stock Liabilities"): {
_("Stock Received But Not Billed"): {

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@@ -25,7 +26,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Make Accounting Entry For Every Stock Movement",
"length": 0,
"no_copy": 0,
@@ -33,6 +36,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -51,7 +55,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Accounts Frozen Upto",
"length": 0,
"no_copy": 0,
@@ -59,6 +65,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,7 +84,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
"length": 0,
"no_copy": 0,
@@ -86,6 +95,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -103,7 +113,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -111,6 +123,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -129,7 +142,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Credit Controller",
"length": 0,
"no_copy": 0,
@@ -138,6 +153,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -155,7 +171,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Check Supplier Invoice Number Uniqueness",
"length": 0,
"no_copy": 0,
@@ -164,6 +182,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -181,7 +200,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Payment via Journal Entry",
"length": 0,
"no_copy": 0,
@@ -190,6 +211,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -208,7 +230,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unlink Payment on Cancellation of Invoice",
"length": 0,
"no_copy": 0,
@@ -217,6 +241,37 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"fieldname": "book_asset_depreciation_entry_automatically",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Book Asset Depreciation Entry Automatically",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -224,18 +279,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-cog",
"icon": "icon-cog",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2016-10-20 16:12:38.595075",
"modified": "2017-04-18 13:35:59.166250",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -251,7 +306,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -266,6 +320,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_order": "ASC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -21,10 +21,13 @@ class AccountsSettings(Document):
company.save()
# Create account head for warehouses
warehouse_list = frappe.db.sql("select name, company from tabWarehouse", as_dict=1)
warehouse_list = frappe.db.sql("""select name, company from tabWarehouse
where disabled=0""", as_dict=1)
warehouse_with_no_company = [d.name for d in warehouse_list if not d.company]
if warehouse_with_no_company:
frappe.throw(_("Company is missing in warehouses {0}").format(comma_and(warehouse_with_no_company)))
frappe.throw(_("Company is missing in warehouses {0}")
.format(comma_and(warehouse_with_no_company)))
for wh in warehouse_list:
wh_doc = frappe.get_doc("Warehouse", wh.name)
wh_doc.flags.ignore_permissions = True

View File

@@ -45,7 +45,7 @@ frappe.ui.form.on('Asset', {
erpnext.asset.scrap_asset(frm);
});
frm.add_custom_button("Sale Asset", function() {
frm.add_custom_button("Sell Asset", function() {
erpnext.asset.make_sales_invoice(frm);
});

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Name",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Item Code",
@@ -68,6 +70,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_name",
"fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"options": "item_code.item_name",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -79,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Asset Category",
@@ -109,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -138,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -166,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -222,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Warehouse",
@@ -251,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Existing Asset",
@@ -279,6 +318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Date",
@@ -307,6 +347,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -336,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Invoice",
@@ -365,6 +407,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disposal Date",
@@ -393,6 +436,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Journal Entry for Scrap",
@@ -422,6 +466,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -449,6 +494,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gross Purchase Amount",
@@ -479,6 +525,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Value After Useful Life",
@@ -509,6 +556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opening Accumulated Depreciation",
@@ -538,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Value After Depreciation",
@@ -567,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -596,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Method",
@@ -625,6 +676,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Number of Depreciations",
@@ -654,6 +706,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Number of Depreciations Booked",
@@ -682,6 +735,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency of Depreciation (Months)",
@@ -711,6 +765,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Depreciation Date",
@@ -739,6 +794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Schedule",
@@ -767,6 +823,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Schedules",
@@ -796,6 +853,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -825,7 +883,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-18 15:59:19.774500",
"modified": "2017-02-17 16:26:19.111939",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset",
@@ -842,7 +900,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -857,7 +914,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 1,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -32,7 +32,7 @@ class Asset(Document):
self.set_status()
def validate_item(self):
item = frappe.db.get_value("Item", self.item_code,
item = frappe.db.get_value("Item", self.item_code,
["is_fixed_asset", "is_stock_item", "disabled"], as_dict=1)
if not item:
frappe.throw(_("Item {0} does not exist").format(self.item_code))
@@ -42,7 +42,7 @@ class Asset(Document):
frappe.throw(_("Item {0} must be a Fixed Asset Item").format(self.item_code))
elif item.is_stock_item:
frappe.throw(_("Item {0} must be a non-stock item").format(self.item_code))
def set_missing_values(self):
if self.item_code:
item_details = get_item_details(self.item_code)
@@ -50,7 +50,7 @@ class Asset(Document):
if not self.get(field):
self.set(field, value)
self.value_after_depreciation = (flt(self.gross_purchase_amount) -
self.value_after_depreciation = (flt(self.gross_purchase_amount) -
flt(self.opening_accumulated_depreciation))
def validate_asset_values(self):
@@ -59,7 +59,7 @@ class Asset(Document):
if not flt(self.gross_purchase_amount):
frappe.throw(_("Gross Purchase Amount is mandatory"), frappe.MandatoryError)
if not self.is_existing_asset:
self.opening_accumulated_depreciation = 0
self.number_of_depreciations_booked = 0
@@ -70,30 +70,33 @@ class Asset(Document):
if flt(self.opening_accumulated_depreciation) > depreciable_amount:
frappe.throw(_("Opening Accumulated Depreciation must be less than equal to {0}")
.format(depreciable_amount))
if self.opening_accumulated_depreciation:
if not self.number_of_depreciations_booked:
frappe.throw(_("Please set Number of Depreciations Booked"))
else:
self.number_of_depreciations_booked = 0
if cint(self.number_of_depreciations_booked) > cint(self.total_number_of_depreciations):
frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations"))
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(nowdate()):
frappe.msgprint(_("Next Depreciation Date is entered as past date"))
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
frappe.msgprint(_("Next Depreciation Date is entered as past date"), title=_('Warning'), indicator='red')
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(self.purchase_date):
frappe.throw(_("Next Depreciation Date cannot be before Purchase Date"))
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
and not self.next_depreciation_date):
frappe.throw(_("Please set Next Depreciation Date"))
def make_depreciation_schedule(self):
if self.depreciation_method != 'Manual':
self.schedules = []
if not self.get("schedules") and self.next_depreciation_date:
value_after_depreciation = flt(self.value_after_depreciation)
number_of_pending_depreciations = cint(self.total_number_of_depreciations) - \
cint(self.number_of_depreciations_booked)
if number_of_pending_depreciations:
@@ -108,17 +111,26 @@ class Asset(Document):
"schedule_date": schedule_date,
"depreciation_amount": depreciation_amount
})
def set_accumulated_depreciation(self):
accumulated_depreciation = flt(self.opening_accumulated_depreciation)
for d in self.get("schedules"):
accumulated_depreciation += flt(d.depreciation_amount)
d.accumulated_depreciation_amount = accumulated_depreciation
value_after_depreciation = flt(self.value_after_depreciation)
for i, d in enumerate(self.get("schedules")):
depreciation_amount = flt(d.depreciation_amount, d.precision("depreciation_amount"))
value_after_depreciation -= flt(depreciation_amount)
if i==len(self.get("schedules"))-1 and self.depreciation_method == "Straight Line":
depreciation_amount += flt(value_after_depreciation - flt(self.expected_value_after_useful_life),
d.precision("depreciation_amount"))
d.depreciation_amount = depreciation_amount
accumulated_depreciation += d.depreciation_amount
d.accumulated_depreciation_amount = flt(accumulated_depreciation, d.precision("accumulated_depreciation_amount"))
def get_depreciation_amount(self, depreciable_value):
if self.depreciation_method in ("Straight Line", "Manual"):
depreciation_amount = (flt(self.value_after_depreciation) -
flt(self.expected_value_after_useful_life)) / (cint(self.total_number_of_depreciations) -
flt(self.expected_value_after_useful_life)) / (cint(self.total_number_of_depreciations) -
cint(self.number_of_depreciations_booked))
else:
factor = 200.0 / self.total_number_of_depreciations
@@ -129,14 +141,14 @@ class Asset(Document):
depreciation_amount = flt(depreciable_value) - flt(self.expected_value_after_useful_life)
return depreciation_amount
def validate_expected_value_after_useful_life(self):
accumulated_depreciation_after_full_schedule = \
max([d.accumulated_depreciation_amount for d in self.get("schedules")])
asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
flt(accumulated_depreciation_after_full_schedule))
if self.expected_value_after_useful_life < asset_value_after_full_schedule:
frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
.format(asset_value_after_full_schedule))
@@ -153,8 +165,8 @@ class Asset(Document):
if d.journal_entry:
frappe.get_doc("Journal Entry", d.journal_entry).cancel()
d.db_set("journal_entry", None)
self.db_set("value_after_depreciation",
self.db_set("value_after_depreciation",
(flt(self.gross_purchase_amount) - flt(self.opening_accumulated_depreciation)))
def set_status(self, status=None):
@@ -185,6 +197,7 @@ def make_purchase_invoice(asset, item_code, gross_purchase_amount, company, post
pi = frappe.new_doc("Purchase Invoice")
pi.company = company
pi.currency = frappe.db.get_value("Company", company, "default_currency")
pi.set_posting_time = 1
pi.posting_date = posting_date
pi.append("items", {
"item_code": item_code,
@@ -197,7 +210,7 @@ def make_purchase_invoice(asset, item_code, gross_purchase_amount, company, post
})
pi.set_missing_values()
return pi
@frappe.whitelist()
def make_sales_invoice(asset, item_code, company):
si = frappe.new_doc("Sales Invoice")
@@ -214,7 +227,7 @@ def make_sales_invoice(asset, item_code, company):
})
si.set_missing_values()
return si
@frappe.whitelist()
def transfer_asset(args):
import json
@@ -223,23 +236,23 @@ def transfer_asset(args):
movement_entry.update(args)
movement_entry.insert()
movement_entry.submit()
frappe.db.commit()
frappe.msgprint(_("Asset Movement record {0} created").format("<a href='#Form/Asset Movement/{0}'>{0}</a>".format(movement_entry.name)))
@frappe.whitelist()
def get_item_details(item_code):
asset_category = frappe.db.get_value("Item", item_code, "asset_category")
if not asset_category:
frappe.throw(_("Please enter Asset Category in Item {0}").format(item_code))
ret = frappe.db.get_value("Asset Category", asset_category,
ret = frappe.db.get_value("Asset Category", asset_category,
["depreciation_method", "total_number_of_depreciations", "frequency_of_depreciation"], as_dict=1)
ret.update({
"asset_category": asset_category
})
return ret
return ret

View File

@@ -0,0 +1,3 @@
frappe.listview_settings['Asset'] = {
add_fields: ['image']
}

View File

@@ -8,6 +8,10 @@ from frappe import _
from frappe.utils import flt, today, getdate
def post_depreciation_entries(date=None):
# Return if automatic booking of asset depreciation is disabled
if not frappe.db.get_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically"):
return
if not date:
date = today()
for asset in get_depreciable_assets(date):

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import cstr, nowdate, getdate
from frappe.utils import cstr, nowdate, getdate, flt
from erpnext.accounts.doctype.asset.depreciation import post_depreciation_entries, scrap_asset, restore_asset
from erpnext.accounts.doctype.asset.asset import make_sales_invoice, make_purchase_invoice
@@ -166,6 +166,23 @@ class TestAsset(unittest.TestCase):
self.assertEqual(gle, expected_gle)
self.assertEqual(asset.get("value_after_depreciation"), 70000)
def test_depreciation_entry_cancellation(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
asset.submit()
post_depreciation_entries(date="2021-01-01")
asset.load_from_db()
# cancel depreciation entry
depr_entry = asset.get("schedules")[0].journal_entry
self.assertTrue(depr_entry)
frappe.get_doc("Journal Entry", depr_entry).cancel()
asset.load_from_db()
depr_entry = asset.get("schedules")[0].journal_entry
self.assertFalse(depr_entry)
def test_scrap_asset(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
@@ -226,6 +243,23 @@ class TestAsset(unittest.TestCase):
self.assertEqual(frappe.db.get_value("Asset", "Macbook Pro 1", "status"), "Partially Depreciated")
def test_asset_expected_value_after_useful_life(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
asset.depreciation_method = "Straight Line"
asset.is_existing_asset = 1
asset.total_number_of_depreciations = 400
asset.gross_purchase_amount = 16866177.00
asset.expected_value_after_useful_life = 500000
asset.save()
accumulated_depreciation_after_full_schedule = \
max([d.accumulated_depreciation_amount for d in asset.get("schedules")])
asset_value_after_full_schedule = (flt(asset.gross_purchase_amount) -
flt(accumulated_depreciation_after_full_schedule))
self.assertTrue(asset.expected_value_after_useful_life >= asset_value_after_full_schedule)
def tearDown(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
@@ -297,4 +331,7 @@ def set_depreciation_settings_in_company():
company.depreciation_expense_account = "_Test Depreciations - _TC"
company.disposal_account = "_Test Gain/Loss on Asset Disposal - _TC"
company.depreciation_cost_center = "_Test Cost Center - _TC"
company.save()
company.save()
# Enable booking asset depreciation entry automatically
frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1)

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Category Name",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Depreciation Method",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Number of Depreciations",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency of Depreciation (Months)",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -221,7 +228,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:49:42.600981",
"modified": "2017-02-17 16:09:52.955332",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Category",
@@ -238,7 +245,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -259,7 +265,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -274,7 +279,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Asset",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Source Warehouse",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Target Warehouse",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -221,7 +228,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:49:47.558549",
"modified": "2017-02-17 16:09:32.069344",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Movement",
@@ -238,7 +245,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -259,7 +265,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -280,7 +285,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -295,7 +299,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -0,0 +1,30 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Guarantee', {
refresh: function(frm) {
cur_frm.set_query("account", function() {
return {
"filters": {
"account_type": "Bank",
"is_group": 0
}
};
});
cur_frm.set_query("project", function() {
return {
"filters": {
"customer": cur_frm.doc.customer
}
};
});
},
start_date: function(frm) {
end_date = frappe.datetime.add_days(cur_frm.doc.start_date, cur_frm.doc.validity - 1);
cur_frm.set_value("end_date", end_date);
},
validity: function(frm) {
end_date = frappe.datetime.add_days(cur_frm.doc.start_date, cur_frm.doc.validity - 1);
cur_frm.set_value("end_date", end_date);
}
});

View File

@@ -1,34 +1,37 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"autoname": "BG-.#####",
"beta": 0,
"creation": "2016-07-21 15:49:53.776461",
"creation": "2016-12-17 10:43:35.731631",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"document_type": "Document",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "student_batch_name",
"fieldname": "customer",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch Name",
"label": "Customer",
"length": 0,
"no_copy": 0,
"options": "Student Batch Name",
"options": "Customer",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -42,51 +45,24 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_bulk_edit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "academic_year",
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Academic Year",
"length": 0,
"no_copy": 0,
"options": "Academic Year",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"fieldname": "enabled",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Active",
"label": "Project",
"length": 0,
"no_copy": 0,
"options": "Project",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -100,16 +76,79 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_6",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -127,22 +166,23 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "program",
"fieldtype": "Link",
"fieldname": "start_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Program",
"in_standard_filter": 0,
"label": "Start Date",
"length": 0,
"no_copy": 0,
"options": "Program",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -156,141 +196,179 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "academic_term",
"description": "",
"fieldname": "validity",
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Validity in Days",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "end_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_guarantee_number",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Guarantee Number",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 1
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"columns": 0,
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "more_information",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Academic Term",
"length": 0,
"no_copy": 0,
"options": "Academic Term",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students",
"label": "Amended From",
"length": 0,
"no_copy": 0,
"no_copy": 1,
"options": "Bank Guarantee",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "students",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students",
"length": 0,
"no_copy": 0,
"options": "Student Batch Student",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_8",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructors",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "instructors",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructors",
"length": 0,
"no_copy": 0,
"options": "Student Batch Instructor",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
@@ -299,20 +377,20 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-01 13:18:12.024001",
"modified": "2017-04-25 13:31:49.627831",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Batch",
"module": "Accounts",
"name": "Bank Guarantee",
"name_case": "",
"owner": "Administrator",
"permissions": [
@@ -321,49 +399,50 @@
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"delete": 0,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Academics User",
"role": "Accounts User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"submit": 1,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "Instructor",
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "customer",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
"title_field": "customer",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -6,5 +6,5 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class StudentBatchStudent(Document):
class BankGuarantee(Document):
pass

View File

@@ -6,7 +6,7 @@ from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Payment Gateway')
# test_records = frappe.get_test_records('Bank Guarantee')
class TestPaymentGateway(unittest.TestCase):
class TestBankGuarantee(unittest.TestCase):
pass

View File

@@ -3,13 +3,13 @@
frappe.ui.form.on("Bank Reconciliation", {
setup: function(frm) {
frm.get_docfield("payment_entries").allow_bulk_edit = 1;
frm.add_fetch("bank_account", "account_currency", "account_currency");
},
onload: function(frm) {
var default_bank_account = locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"];
let default_bank_account = frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "";
frm.set_value("bank_account", default_bank_account);
frm.set_query("bank_account", function() {

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 1,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@@ -7,11 +8,15 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 0,
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Select account head of the bank where cheque was deposited.",
"fieldname": "bank_account",
"fieldtype": "Link",
@@ -19,7 +24,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
@@ -28,6 +35,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -35,16 +43,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account_currency",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 0,
@@ -53,6 +65,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -60,16 +73,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "From Date",
"length": 0,
"no_copy": 0,
@@ -77,6 +94,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -84,16 +102,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "To Date",
"length": 0,
"no_copy": 0,
@@ -101,6 +123,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -108,16 +131,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "include_reconciled_entries",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Include Reconciled Entries",
"length": 0,
"no_copy": 0,
@@ -125,6 +152,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -132,16 +160,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "get_payment_entries",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Payment Entries",
"length": 0,
"no_copy": 0,
@@ -150,6 +182,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -157,16 +190,20 @@
"unique": 0
},
{
"allow_bulk_edit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_entries",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Entries",
"length": 0,
"no_copy": 0,
@@ -175,6 +212,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -182,16 +220,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "update_clearance_date",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Clearance Date",
"length": 0,
"no_copy": 0,
@@ -200,6 +242,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -207,16 +250,20 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
@@ -225,6 +272,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -232,19 +280,19 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 1,
"hide_toolbar": 1,
"icon": "fa fa-check",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-06-28 13:11:09.396353",
"modified": "2017-04-21 16:58:26.902732",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation",
@@ -274,7 +322,8 @@
"quick_entry": 1,
"read_only": 1,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_order": "ASC",
"track_seen": 0,
"version": 0
"track_changes": 0,
"track_seen": 0
}

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Budget Against",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Cost Center",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Project",
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Fiscal Year",
@@ -169,6 +174,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Action if Annual Budget Exceeded",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Action if Accumulated Monthly Budget Exceeded",
@@ -258,6 +266,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Monthly Distribution",
@@ -287,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -315,6 +325,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Budget Accounts",
@@ -371,7 +383,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:45:31.079107",
"modified": "2017-02-17 16:25:32.342055",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",
@@ -388,7 +400,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -403,7 +414,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Cost Center Name",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Parent Cost Center",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Group",
@@ -194,7 +200,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "lft",
@@ -223,7 +230,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "rgt",
@@ -253,6 +261,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "old_parent",
@@ -285,7 +294,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-01-30 11:27:36.615323",
"modified": "2017-02-17 16:22:27.129572",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -301,7 +310,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -322,7 +330,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -343,7 +350,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -364,7 +370,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -385,7 +390,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -401,6 +405,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_cost_center, is_group",
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -3,24 +3,30 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "field:year",
"beta": 0,
"creation": "2013-01-22 16:50:25",
"custom": 0,
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "For e.g. 2012, 2012-13",
"fieldname": "year",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Year Name",
"length": 0,
"no_copy": 0,
@@ -28,7 +34,9 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -39,19 +47,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "disabled",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -62,12 +76,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "year_start_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Year Start Date",
"length": 0,
"no_copy": 1,
@@ -75,7 +93,9 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -86,18 +106,24 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "year_end_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Year End Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -108,12 +134,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "companies",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Companies",
"length": 0,
"no_copy": 0,
@@ -121,7 +151,9 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -133,13 +165,14 @@
"hide_toolbar": 0,
"icon": "fa fa-calendar",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:47.289982",
"modified": "2017-02-17 16:22:08.431278",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
@@ -266,8 +299,12 @@
"write": 0
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "name",
"sort_order": "DESC"
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -43,11 +43,13 @@ class FiscalYear(Document):
def on_update(self):
check_duplicate_fiscal_year(self)
frappe.cache().delete_value("fiscal_years")
def on_trash(self):
global_defaults = frappe.get_doc("Global Defaults")
if global_defaults.current_fiscal_year == self.name:
frappe.throw(_("You cannot delete Fiscal Year {0}. Fiscal Year {0} is set as default in Global Settings").format(self.name))
frappe.cache().delete_value("fiscal_years")
def validate_overlap(self):
existing_fiscal_years = frappe.db.sql("""select name from `tabFiscal Year`

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "GL.#######",
@@ -12,6 +13,7 @@
"editable_grid": 0,
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -22,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -41,6 +44,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -51,6 +55,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Transaction Date",
@@ -70,6 +75,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -80,6 +86,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Account",
@@ -100,6 +107,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -110,6 +118,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Type",
@@ -128,6 +137,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -138,6 +148,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party",
@@ -156,6 +167,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -166,6 +178,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -186,6 +199,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -196,6 +210,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Debit Amount",
@@ -217,6 +232,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -227,6 +243,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Amount",
@@ -248,6 +265,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -258,6 +276,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -277,6 +296,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -287,6 +307,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Debit Amount in Account Currency",
@@ -306,6 +327,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -316,6 +338,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Amount in Account Currency",
@@ -335,6 +358,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -345,6 +369,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against",
@@ -364,6 +389,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -374,6 +400,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Voucher Type",
@@ -394,6 +421,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -404,6 +432,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Voucher",
@@ -424,6 +453,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -434,6 +464,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Voucher Type",
@@ -454,6 +485,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -464,6 +496,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Voucher No",
@@ -484,6 +517,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -494,6 +528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -513,6 +548,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -523,6 +559,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -542,6 +579,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -552,6 +590,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Opening",
@@ -572,6 +611,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -582,6 +622,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Advance",
@@ -602,6 +643,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -612,6 +654,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fiscal Year",
@@ -632,6 +675,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -642,6 +686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -662,18 +707,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-list",
"idx": 1,
"image_view": 0,
"in_create": 1,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:44:41.098790",
"modified": "2017-04-27 13:18:06.617940",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",
@@ -689,7 +734,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -710,7 +754,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -731,7 +774,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -744,10 +786,12 @@
}
],
"quick_entry": 1,
"read_only": 0,
"read_only": 1,
"read_only_onload": 0,
"search_fields": "voucher_no,account,posting_date,against_voucher",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -2,13 +2,12 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe, erpnext
from frappe import _
from frappe.utils import flt, fmt_money, getdate, formatdate
from frappe.model.document import Document
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
from erpnext.accounts.utils import get_account_currency
from erpnext.setup.doctype.company.company import get_company_currency
from erpnext.accounts.utils import get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency
@@ -18,22 +17,27 @@ class GLEntry(Document):
def validate(self):
self.flags.ignore_submit_comment = True
self.check_mandatory()
self.pl_must_have_cost_center()
self.check_pl_account()
self.validate_cost_center()
self.validate_party()
self.validate_currency()
self.validate_and_set_fiscal_year()
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes'):
self.validate_account_details(adv_adj)
if not self.flags.from_repost:
self.pl_must_have_cost_center()
self.check_pl_account()
self.validate_cost_center()
self.validate_party()
self.validate_currency()
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes', from_repost=False):
if not from_repost:
self.validate_account_details(adv_adj)
check_freezing_date(self.posting_date, adv_adj)
validate_frozen_account(self.account, adv_adj)
check_freezing_date(self.posting_date, adv_adj)
validate_balance_type(self.account, adv_adj)
# Update outstanding amt on against voucher
if self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice'] \
and self.against_voucher and update_outstanding == 'Yes':
and self.against_voucher and update_outstanding == 'Yes' and not from_repost:
update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type,
self.against_voucher)
@@ -51,7 +55,7 @@ class GLEntry(Document):
elif account_type == "Payable":
frappe.throw(_("{0} {1}: Supplier is required against Payable account {2}")
.format(self.voucher_type, self.voucher_no, self.account))
# Zero value transaction is not allowed
if not (flt(self.debit) or flt(self.credit)):
frappe.throw(_("{0} {1}: Either debit or credit amount is required for {2}")
@@ -111,7 +115,7 @@ class GLEntry(Document):
validate_party_frozen_disabled(self.party_type, self.party)
def validate_currency(self):
company_currency = get_company_currency(self.company)
company_currency = erpnext.get_company_currency(self.company)
account_currency = get_account_currency(self.account)
if not self.account_currency:
@@ -119,7 +123,7 @@ class GLEntry(Document):
if account_currency != self.account_currency:
frappe.throw(_("{0} {1}: Accounting Entry for {2} can only be made in currency: {3}")
.format(self.voucher_type, self.voucher_no, self.account,
.format(self.voucher_type, self.voucher_no, self.account,
(account_currency or company_currency)), InvalidAccountCurrency)
if self.party_type and self.party:

View File

@@ -86,9 +86,9 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
};
});
me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
return {
filters: {"name": ["in", ["Customer", "Supplier"]]}
me.frm.set_query("party_type", "accounts", function() {
return{
query: "erpnext.setup.doctype.party_type.party_type.get_party_type"
}
});

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -22,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,7 +82,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Entry Type",
@@ -110,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -140,6 +145,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,7 +173,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -196,7 +203,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -227,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -256,6 +265,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting Entries",
@@ -286,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -312,7 +323,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reference Number",
@@ -342,6 +354,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Date",
@@ -370,7 +383,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "User Remark",
@@ -400,6 +414,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -425,7 +440,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Debit",
@@ -455,7 +471,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Credit",
@@ -487,6 +504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference (Dr - Cr)",
@@ -518,6 +536,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Difference Entry",
@@ -546,6 +565,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Multi Currency",
@@ -574,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount Currency",
@@ -603,6 +624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Amount",
@@ -631,6 +653,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount in Words",
@@ -658,6 +681,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -685,7 +709,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Clearance Date",
@@ -716,6 +741,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remark",
@@ -745,6 +771,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -771,6 +798,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill No",
@@ -800,6 +828,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill Date",
@@ -829,6 +858,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
@@ -859,6 +889,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off",
@@ -889,6 +920,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Based On",
@@ -918,6 +950,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Outstanding Invoices",
@@ -946,6 +979,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -974,6 +1008,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount",
@@ -1002,6 +1037,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -1030,6 +1066,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pay To / Recd From",
@@ -1057,6 +1094,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1084,6 +1122,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1112,6 +1151,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1142,6 +1182,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1171,6 +1212,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1200,7 +1242,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Opening",
@@ -1232,6 +1275,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Entry",
@@ -1261,6 +1305,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1281,19 +1326,19 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-file-text",
"idx": 176,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-11-07 05:53:46.738161",
"modified": "2017-04-10 12:07:44.599804",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -1309,7 +1354,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1330,7 +1374,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1351,7 +1394,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1367,8 +1409,10 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -2,13 +2,14 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, json
import frappe, erpnext, json
from frappe.utils import cstr, flt, fmt_money, formatdate
from frappe import msgprint, _, scrub
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.accounts.utils import get_balance_on, get_account_currency
from erpnext.setup.utils import get_company_currency
from erpnext.accounts.party import get_party_account
from erpnext.hr.doctype.expense_claim.expense_claim import update_reimbursed_amount
from erpnext.hr.doctype.employee_loan.employee_loan import update_disbursement_status
class JournalEntry(AccountsController):
def __init__(self, arg1, arg2=None):
@@ -45,6 +46,7 @@ class JournalEntry(AccountsController):
self.make_gl_entries()
self.update_advance_paid()
self.update_expense_claim()
self.update_employee_loan()
def get_title(self):
return self.pay_to_recd_from or self.accounts[0].account
@@ -68,7 +70,9 @@ class JournalEntry(AccountsController):
self.make_gl_entries(1)
self.update_advance_paid()
self.update_expense_claim()
self.update_employee_loan()
self.unlink_advance_entry_reference()
self.unlink_asset_reference()
def unlink_advance_entry_reference(self):
for d in self.get("accounts"):
@@ -78,6 +82,18 @@ class JournalEntry(AccountsController):
d.reference_type = ''
d.reference_name = ''
d.db_update()
def unlink_asset_reference(self):
for d in self.get("accounts"):
if d.reference_type=="Asset" and d.reference_name:
asset = frappe.get_doc("Asset", d.reference_name)
for s in asset.get("schedules"):
if s.journal_entry == self.name:
s.db_set("journal_entry", None)
asset.value_after_depreciation += s.depreciation_amount
asset.db_set("value_after_depreciation", asset.value_after_depreciation)
asset.set_status()
def validate_party(self):
for d in self.get("accounts"):
@@ -321,11 +337,11 @@ class JournalEntry(AccountsController):
if d.account_currency == self.company_currency:
d.exchange_rate = 1
elif not d.exchange_rate or d.exchange_rate == 1 or \
(d.reference_type in ("Sales Invoice", "Purchase Invoice")
(d.reference_type in ("Sales Invoice", "Purchase Invoice")
and d.reference_name and self.posting_date):
# Modified to include the posting date for which to retreive the exchange rate
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency,
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency,
self.company, d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
if not d.exchange_rate:
@@ -370,7 +386,7 @@ class JournalEntry(AccountsController):
bank_amount = party_amount = total_amount = 0.0
currency = bank_account_currency = party_account_currency = pay_to_recd_from= None
for d in self.get('accounts'):
if d.party_type and d.party:
if d.party_type in ['Customer', 'Supplier'] and d.party:
if not pay_to_recd_from:
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
"customer_name" if d.party_type=="Customer" else "supplier_name")
@@ -431,7 +447,7 @@ class JournalEntry(AccountsController):
if not self.get('accounts'):
msgprint(_("'Entries' cannot be empty"), raise_exception=True)
else:
flag, self.total_debit, self.total_credit = 0, 0, 0
self.total_debit, self.total_credit = 0, 0
diff = flt(self.difference, self.precision("difference"))
# If any row without amount, set the diff on that row
@@ -498,11 +514,15 @@ class JournalEntry(AccountsController):
def update_expense_claim(self):
for d in self.accounts:
if d.reference_type=="Expense Claim":
amt = frappe.db.sql("""select sum(debit) as amt from `tabJournal Entry Account`
where reference_type = "Expense Claim" and
reference_name = %s and docstatus = 1""", d.reference_name ,as_dict=1)[0].amt
frappe.db.set_value("Expense Claim", d.reference_name , "total_amount_reimbursed", amt)
if d.reference_type=="Expense Claim" and d.reference_name:
doc = frappe.get_doc("Expense Claim", d.reference_name)
update_reimbursed_amount(doc)
def update_employee_loan(self):
for d in self.accounts:
if d.reference_type=="Employee Loan" and flt(d.debit) > 0:
doc = frappe.get_doc("Employee Loan", d.reference_name)
update_disbursement_status(doc)
def validate_expense_claim(self):
for d in self.accounts:
@@ -561,7 +581,7 @@ def get_default_bank_cash_account(company, account_type=None, mode_of_payment=No
if account:
account_details = frappe.db.get_value("Account", account,
["account_currency", "account_type"], as_dict=1)
return frappe._dict({
"account": account,
"balance": get_balance_on(account),
@@ -646,9 +666,9 @@ def get_payment_entry(ref_doc, args):
cost_center = frappe.db.get_value("Company", ref_doc.company, "cost_center")
exchange_rate = 1
if args.get("party_account"):
# Modified to include the posting date for which the exchange rate is required.
# Modified to include the posting date for which the exchange rate is required.
# Assumed to be the posting date in the reference document
exchange_rate = get_exchange_rate(ref_doc.get("posting_date") or ref_doc.get("transaction_date"),
exchange_rate = get_exchange_rate(ref_doc.get("posting_date") or ref_doc.get("transaction_date"),
args.get("party_account"), args.get("party_account_currency"),
ref_doc.company, ref_doc.doctype, ref_doc.name)
@@ -682,10 +702,10 @@ def get_payment_entry(ref_doc, args):
bank_account = get_default_bank_cash_account(ref_doc.company, "Bank", account=args.get("bank_account"))
if bank_account:
bank_row.update(bank_account)
# Modified to include the posting date for which the exchange rate is required.
# Modified to include the posting date for which the exchange rate is required.
# Assumed to be the posting date of the reference date
bank_row.exchange_rate = get_exchange_rate(ref_doc.get("posting_date")
or ref_doc.get("transaction_date"), bank_account["account"],
bank_row.exchange_rate = get_exchange_rate(ref_doc.get("posting_date")
or ref_doc.get("transaction_date"), bank_account["account"],
bank_account["account_currency"], ref_doc.company)
bank_row.cost_center = cost_center
@@ -710,8 +730,14 @@ def get_payment_entry(ref_doc, args):
@frappe.whitelist()
def get_opening_accounts(company):
"""get all balance sheet accounts for opening entry"""
accounts = frappe.db.sql_list("""select name from tabAccount
where is_group=0 and report_type='Balance Sheet' and company=%s""", company)
accounts = frappe.db.sql_list("""select
name from tabAccount
where
is_group=0 and
report_type='Balance Sheet' and
ifnull(warehouse, '') = '' and
company=%s
order by name asc""", company)
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
@@ -732,7 +758,7 @@ def get_outstanding(args):
if isinstance(args, basestring):
args = json.loads(args)
company_currency = get_company_currency(args.get("company"))
company_currency = erpnext.get_company_currency(args.get("company"))
if args.get("doctype") == "Journal Entry":
condition = " and party=%(party)s" if args.get("party") else ""
@@ -791,7 +817,7 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
if not frappe.has_permission("Account"):
frappe.msgprint(_("No Permission"), raise_exception=1)
company_currency = get_company_currency(company)
company_currency = erpnext.get_company_currency(company)
account_details = frappe.db.get_value("Account", account, ["account_type", "account_currency"], as_dict=1)
if not account_details:
@@ -809,8 +835,8 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
"party_type": party_type,
"account_type": account_details.account_type,
"account_currency": account_details.account_currency or company_currency,
# The date used to retreive the exchange rate here is the date passed in
# The date used to retreive the exchange rate here is the date passed in
# as an argument to this function. It is assumed to be the date on which the balance is sought
"exchange_rate": get_exchange_rate(date, account, account_details.account_currency,
company, debit=debit, credit=credit, exchange_rate=exchange_rate)
@@ -839,7 +865,7 @@ def get_exchange_rate(posting_date, account=None, account_currency=None, company
if not account_currency:
account_currency = account_details.account_currency
company_currency = get_company_currency(company)
company_currency = erpnext.get_company_currency(company)
if account_currency != company_currency:
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:
@@ -850,7 +876,7 @@ def get_exchange_rate(posting_date, account=None, account_currency=None, company
(account_details.root_type == "Liability" and debit)):
exchange_rate = get_average_exchange_rate(account)
# The date used to retreive the exchange rate here is the date passed
# The date used to retreive the exchange rate here is the date passed
# in as an argument to this function.
if not exchange_rate and account_currency and posting_date:
exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)

View File

@@ -171,20 +171,6 @@ class TestJournalEntry(unittest.TestCase):
})
jv.submit()
def test_clear_blank_rows(self):
je = make_journal_entry("_Test Bank - _TC", "_Test Account Stock Expenses - _TC", 100, save=False)
je.append("accounts", {
"account": "_Test Cash - _TC",
"debit_in_account_currency": 0,
"credit_in_account_currency": 0,
"exchange_rate": 1
})
self.assertEqual(len(je.get("accounts")), 3)
je.save()
self.assertEqual(len(je.get("accounts")), 2)
def make_journal_entry(account1, account2, amount, cost_center=None, posting_date=None, exchange_rate=1, save=True, submit=False, project=None):
if not cost_center:

View File

@@ -8,7 +8,9 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -20,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account",
"length": 0,
"no_copy": 0,
@@ -33,6 +37,7 @@
"print_hide_if_no_value": 0,
"print_width": "250px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -51,7 +56,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Type",
"length": 0,
"no_copy": 0,
@@ -60,6 +67,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,7 +85,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
"length": 0,
"no_copy": 1,
@@ -88,6 +98,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -106,8 +117,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
@@ -119,6 +132,7 @@
"print_hide_if_no_value": 0,
"print_width": "180px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -137,13 +151,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -161,7 +178,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
@@ -170,6 +189,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -187,7 +207,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
@@ -196,6 +218,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -213,7 +236,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Balance",
"length": 0,
"no_copy": 0,
@@ -223,6 +248,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -242,7 +268,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
@@ -251,6 +279,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -268,7 +297,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 1,
@@ -278,6 +309,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -295,7 +327,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -303,6 +337,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -320,7 +355,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
@@ -329,6 +366,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -346,7 +384,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -354,6 +394,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -371,7 +412,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Debit",
"length": 0,
"no_copy": 0,
@@ -381,6 +424,7 @@
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -398,7 +442,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Debit in Company Currency",
"length": 0,
"no_copy": 1,
@@ -410,6 +456,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -427,13 +474,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -451,7 +501,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Credit",
"length": 0,
"no_copy": 0,
@@ -461,6 +513,7 @@
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -478,7 +531,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit in Company Currency",
"length": 0,
"no_copy": 1,
@@ -490,6 +545,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -507,7 +563,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
@@ -515,6 +573,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -532,16 +591,19 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset",
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nEmployee Loan",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -559,7 +621,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
@@ -569,6 +633,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -586,7 +651,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
"length": 0,
"no_copy": 0,
@@ -596,6 +663,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -613,13 +681,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -637,7 +708,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 1,
@@ -648,6 +721,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -665,7 +739,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Account",
"length": 0,
"no_copy": 1,
@@ -675,6 +751,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -692,7 +769,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-08-26 01:54:32.267927",
"modified": "2017-03-02 05:02:10.102039",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
@@ -701,6 +778,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Type",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -111,7 +114,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:54:39.560399",
"modified": "2017-02-17 16:31:34.207683",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
@@ -127,7 +130,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -148,7 +150,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -163,6 +164,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -11,9 +11,8 @@ frappe.ui.form.on('Payment Entry', {
},
setup: function(frm) {
var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable";
frm.set_query("paid_from", function() {
var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable";
var account_types = in_list(["Pay", "Internal Transfer"], frm.doc.payment_type) ?
["Bank", "Cash"] : party_account_type;
@@ -26,7 +25,16 @@ frappe.ui.form.on('Payment Entry', {
}
});
frm.set_query("party_type", function() {
return{
"filters": {
"name": ["in",["Customer","Supplier"]],
}
}
});
frm.set_query("paid_to", function() {
var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable";
var account_types = in_list(["Receive", "Internal Transfer"], frm.doc.payment_type) ?
["Bank", "Cash"] : party_account_type;
@@ -139,6 +147,7 @@ frappe.ui.form.on('Payment Entry', {
var currency_field = (frm.doc.payment_type=="Receive") ? "paid_from_account_currency" : "paid_to_account_currency"
frm.set_df_property("total_allocated_amount", "options", currency_field);
frm.set_df_property("unallocated_amount", "options", currency_field);
frm.set_df_property("party_balance", "options", currency_field);
frm.set_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"],
party_account_currency, "references");

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -22,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Type of Payment",
@@ -50,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -79,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Payment Type",
@@ -97,95 +101,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "Customer\nSupplier",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "",
"fieldname": "party_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -197,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -225,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -253,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -282,6 +200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -300,6 +219,158 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
"fieldname": "party_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment From / To",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.docstatus==0",
"fieldname": "party_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_11",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"description": "",
"fieldname": "party_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -311,6 +382,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -340,6 +412,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Balance",
@@ -369,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Paid From",
@@ -399,6 +473,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -429,6 +504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
@@ -458,6 +534,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -486,6 +563,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Paid To",
@@ -516,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -546,6 +625,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
@@ -577,6 +657,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
@@ -606,6 +687,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount",
@@ -636,6 +718,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -665,6 +748,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount (Company Currency)",
@@ -694,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -722,6 +807,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Amount",
@@ -752,6 +838,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -781,6 +868,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Amount (Company Currency)",
@@ -812,6 +900,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -842,6 +931,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allocate Payment Amount",
@@ -871,6 +961,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment References",
@@ -901,6 +992,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Writeoff",
@@ -930,6 +1022,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Allocated Amount",
@@ -959,6 +1052,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Allocated Amount (Company Currency)",
@@ -988,6 +1082,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Set Exchange Gain / Loss",
@@ -1016,6 +1111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1044,6 +1140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unallocated Amount",
@@ -1073,6 +1170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference Amount (Company Currency)",
@@ -1103,6 +1201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Difference Amount",
@@ -1133,6 +1232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deductions or Loss",
@@ -1161,6 +1261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Deductions or Loss",
@@ -1190,6 +1291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction ID",
@@ -1219,6 +1321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cheque/Reference No",
@@ -1247,6 +1350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1275,6 +1379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cheque/Reference Date",
@@ -1304,6 +1409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Clearance Date",
@@ -1334,6 +1440,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1363,6 +1470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1392,6 +1500,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -1420,6 +1529,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1447,6 +1557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1476,6 +1587,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1505,6 +1617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1533,6 +1646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -1551,17 +1665,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:33:40.371480",
"modified": "2017-04-10 12:06:22.176045",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -1578,7 +1692,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1599,7 +1712,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1614,8 +1726,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -684,6 +684,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
pe.paid_amount = paid_amount
pe.received_amount = received_amount
pe.allocate_payment_amount = 1
pe.letter_head = doc.get("letter_head")
pe.append("references", {
"reference_doctype": dt,

View File

@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Type",
"length": 0,
"no_copy": 0,
@@ -49,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Name",
"length": 0,
"no_copy": 0,
@@ -77,7 +82,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
"length": 0,
"no_copy": 0,
@@ -104,7 +111,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -130,7 +139,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
@@ -157,7 +168,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Outstanding",
"length": 0,
"no_copy": 0,
@@ -184,7 +197,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated",
"length": 0,
"no_copy": 0,
@@ -211,7 +226,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
@@ -238,7 +255,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-14 12:28:51.822341",
"modified": "2017-02-17 16:47:17.156256",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",
@@ -248,7 +265,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -6,12 +6,10 @@ frappe.provide("erpnext.accounts");
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this
this.frm.set_query('party_type', function() {
return {
filters: {
"name": ["in", ["Customer", "Supplier"]]
}
};
this.frm.set_query("party_type", function() {
return{
query: "erpnext.setup.doctype.party_type.party_type.get_party_type"
}
});
this.frm.set_query('receivable_payable_account', function() {

View File

@@ -22,6 +22,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
@@ -30,6 +31,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -48,7 +50,8 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Reference_name",
"in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
"options": "reference_type",
@@ -57,6 +60,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -75,6 +79,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
@@ -82,6 +87,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,6 +106,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 0,
@@ -107,6 +114,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -125,6 +133,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Row",
"length": 0,
"no_copy": 0,
@@ -132,6 +141,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -150,6 +160,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -157,6 +168,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -175,6 +187,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Invoice Number",
"length": 0,
"no_copy": 0,
@@ -183,6 +196,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -201,6 +215,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -208,6 +223,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -226,6 +242,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated amount",
"length": 0,
"no_copy": 0,
@@ -234,6 +251,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -252,6 +270,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -259,6 +278,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -277,6 +297,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Remark",
"length": 0,
"no_copy": 0,
@@ -284,6 +305,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -302,7 +324,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-08-26 02:08:35.879133",
"modified": "2017-01-30 01:04:22.557237",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Payment",
@@ -314,5 +336,6 @@
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -13,6 +14,7 @@
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -23,6 +25,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -42,6 +45,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -52,6 +56,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recipient Message And Payment Details",
@@ -70,6 +75,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -81,6 +87,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Format",
@@ -100,6 +107,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -110,6 +118,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To",
@@ -128,6 +137,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -138,6 +148,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subject",
@@ -156,6 +167,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -166,6 +178,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -183,6 +196,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -193,6 +207,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway Account",
@@ -212,6 +227,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -222,6 +238,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Currency",
@@ -241,6 +258,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -252,6 +270,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
@@ -271,6 +290,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -282,6 +302,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -301,6 +322,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -312,6 +334,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Sales Invoice",
@@ -330,6 +353,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -340,6 +364,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -357,6 +382,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -367,6 +393,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message",
@@ -385,6 +412,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -395,6 +423,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message Examples",
@@ -414,6 +443,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -424,6 +454,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mute Email",
@@ -442,6 +473,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -452,6 +484,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "payment_url",
@@ -470,6 +503,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -481,6 +515,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway Details",
@@ -499,6 +534,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -509,6 +545,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway",
@@ -528,6 +565,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -538,6 +576,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Account",
@@ -557,6 +596,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -567,6 +607,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Details",
@@ -585,6 +626,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -595,6 +637,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Reference Doctype",
@@ -614,6 +657,7 @@
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -624,6 +668,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Reference Name",
@@ -636,13 +681,14 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -653,6 +699,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -671,17 +718,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"in_create": 1,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-02-23 05:03:37.464863",
"modified": "2017-05-18 12:18:39.187714",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",
@@ -698,7 +745,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -719,7 +765,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -734,7 +779,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -10,13 +10,18 @@ from frappe.utils import flt, nowdate, get_url
from erpnext.accounts.party import get_party_account
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry, get_company_defaults
from frappe.integration_broker.doctype.integration_service.integration_service import get_integration_controller
from frappe.integrations.utils import get_payment_gateway_controller
class PaymentRequest(Document):
def validate(self):
self.validate_reference_document()
self.validate_payment_request()
self.validate_currency()
def validate_reference_document(self):
if not self.reference_doctype or not self.reference_name:
frappe.throw(_("To create a Payment Request reference document is required"))
def validate_payment_request(self):
if frappe.db.get_value("Payment Request", {"reference_name": self.reference_name,
"name": ("!=", self.name), "status": ("not in", ["Initiated", "Paid"]), "docstatus": 1}, "name"):
@@ -65,11 +70,11 @@ class PaymentRequest(Document):
data = frappe.db.get_value(self.reference_doctype, self.reference_name,
["company", "customer_name"], as_dict=1)
controller = get_integration_controller(self.payment_gateway)
controller = get_payment_gateway_controller(self.payment_gateway)
controller.validate_transaction_currency(self.currency)
return controller.get_payment_url(**{
"amount": self.grand_total,
"amount": flt(self.grand_total, self.precision("grand_total")),
"title": data.company,
"description": self.subject,
"reference_doctype": "Payment Request",

View File

@@ -35,9 +35,9 @@ class PeriodClosingVoucher(AccountsController):
def validate_posting_date(self):
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year
validate_fiscal_year(self.posting_date, self.fiscal_year, label=_("Posting Date"), doc=self)
validate_fiscal_year(self.posting_date, self.fiscal_year, self.company, label=_("Posting Date"), doc=self)
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year)[1]
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year, company=self.company)[1]
pce = frappe.db.sql("""select name from `tabPeriod Closing Voucher`
where posting_date > %s and fiscal_year = %s and docstatus = 1""",

View File

@@ -11,7 +11,7 @@ from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journ
class TestPeriodClosingVoucher(unittest.TestCase):
def test_closing_entry(self):
year_start_date = get_fiscal_year(today())[1]
year_start_date = get_fiscal_year(today(), company="_Test Company")[1]
make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400,
"_Test Cost Center - _TC", posting_date=now(), submit=True)
@@ -70,7 +70,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
"doctype": "Period Closing Voucher",
"closing_account_head": "_Test Account Reserves and Surplus - _TC",
"company": "_Test Company",
"fiscal_year": get_fiscal_year(today())[0],
"fiscal_year": get_fiscal_year(today(), company="_Test Company")[0],
"posting_date": today(),
"remarks": "test"
})

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Applicable for User",
"length": 0,
"no_copy": 0,
@@ -50,7 +53,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 1,
@@ -81,7 +86,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Stock",
"length": 0,
"no_copy": 0,
@@ -108,7 +115,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -137,7 +146,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
"length": 0,
"no_copy": 0,
@@ -165,7 +176,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -191,7 +204,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
@@ -220,7 +235,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
@@ -238,6 +255,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "country",
"fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Country",
"length": 0,
"no_copy": 0,
"options": "company.country",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -249,7 +296,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
@@ -278,7 +327,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
"length": 0,
"no_copy": 0,
@@ -305,7 +356,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow Delete",
"length": 0,
"no_copy": 0,
@@ -332,7 +385,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow user to edit Rate",
"length": 0,
"no_copy": 0,
@@ -359,7 +414,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -385,7 +442,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Invoice Payment",
"length": 0,
"no_copy": 0,
@@ -413,7 +472,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -439,7 +500,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Groups",
"length": 0,
"no_copy": 0,
@@ -467,7 +530,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -493,7 +558,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Groups",
"length": 0,
"no_copy": 0,
@@ -521,7 +588,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -548,7 +617,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Format",
"length": 0,
"no_copy": 0,
@@ -576,7 +647,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
@@ -605,7 +678,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
"length": 0,
"no_copy": 0,
@@ -634,7 +709,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
"length": 0,
"no_copy": 0,
@@ -663,7 +740,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
@@ -690,7 +769,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Territory",
"length": 0,
"no_copy": 0,
@@ -719,7 +800,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
"length": 0,
"no_copy": 0,
@@ -748,7 +831,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Discount",
"length": 0,
"no_copy": 0,
@@ -777,7 +862,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Discount On",
"length": 0,
"no_copy": 0,
@@ -805,7 +892,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -832,7 +921,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Account",
"length": 0,
"no_copy": 0,
@@ -860,7 +951,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Cost Center",
"length": 0,
"no_copy": 0,
@@ -888,7 +981,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account for Change Amount",
"length": 0,
"no_copy": 0,
@@ -916,7 +1011,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
"length": 0,
"no_copy": 0,
@@ -945,7 +1042,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -971,7 +1070,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Income Account",
"length": 0,
"no_copy": 0,
@@ -1001,7 +1102,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Account",
"length": 0,
"no_copy": 0,
@@ -1028,7 +1131,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
@@ -1047,18 +1152,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "icon-cog",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-28 15:14:59.411457",
"modified": "2017-03-10 16:53:56.390210",
"modified_by": "rohit@erpnext.com",
"module": "Accounts",
"name": "POS Profile",
@@ -1074,7 +1179,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1095,7 +1199,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1110,8 +1213,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "user",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -91,8 +91,8 @@ cur_frm.cscript.buying = function() {
}
//Dynamically change the description based on type of margin
cur_frm.cscript.type = function(doc){
cur_frm.set_df_property('rate', 'description', doc.type=='Percentage'?'In Percentage %':'In Amount')
cur_frm.cscript.margin_type = function(doc){
cur_frm.set_df_property('margin_rate_or_amount', 'description', doc.margin_type=='Percentage'?'In Percentage %':'In Amount')
}
frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){
@@ -112,4 +112,4 @@ frappe.ui.form.on('Pricing Rule', {
}
}
}
})
})

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -49,6 +50,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Apply On",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Code",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Brand",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Group",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Priority",
@@ -249,6 +257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disable",
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -303,6 +313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Selling",
@@ -330,6 +341,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Buying",
@@ -357,6 +369,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -385,6 +398,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable For",
@@ -414,6 +428,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -443,6 +458,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -472,6 +488,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -501,6 +518,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -530,6 +548,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -559,6 +578,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -588,6 +608,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Type",
@@ -616,6 +637,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -643,6 +665,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Min Qty",
@@ -670,6 +693,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -697,6 +721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Qty",
@@ -724,6 +749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -752,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid From",
@@ -779,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid Upto",
@@ -806,6 +834,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -832,6 +861,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -861,6 +891,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin",
@@ -890,6 +921,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Type",
@@ -919,6 +951,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -948,6 +981,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Rate or Amount",
@@ -976,6 +1010,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1004,6 +1039,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price or Discount",
@@ -1032,6 +1068,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1059,6 +1096,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price",
@@ -1087,6 +1125,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -1115,6 +1154,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "For Price List",
@@ -1143,6 +1183,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1171,6 +1212,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule Help",
@@ -1199,7 +1241,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:19:31.478456",
"modified": "2017-02-17 16:21:28.446208",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -1215,7 +1257,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1236,7 +1277,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1257,7 +1297,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1278,7 +1317,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1299,7 +1337,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1314,8 +1351,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -23,6 +23,8 @@ class PricingRule(Document):
self.validate_price_or_discount()
self.validate_max_discount()
if not self.margin_type: self.margin_rate_or_amount = 0.0
def validate_mandatory(self):
for field in ["apply_on", "applicable_for"]:
tocheck = frappe.scrub(self.get(field) or "")
@@ -117,18 +119,19 @@ def apply_pricing_rule(args):
args_copy = copy.deepcopy(args)
args_copy.update(item)
out.append(get_pricing_rule_for_item(args_copy))
if set_serial_nos_based_on_fifo:
if set_serial_nos_based_on_fifo and not args.get('is_return'):
out.append(get_serial_no_for_item(args_copy))
return out
def get_serial_no_for_item(args):
from erpnext.stock.get_item_details import get_serial_no
item_details = frappe._dict({
"doctype": args.doctype,
"name": args.name,
"serial_no": args.serial_no
})
if args.get("parenttype") in ("Sales Invoice", "Delivery Note"):
if args.get("parenttype") in ("Sales Invoice", "Delivery Note") and args.stock_qty > 0:
item_details.serial_no = get_serial_no(args)
return item_details
@@ -143,7 +146,7 @@ def get_pricing_rule_for_item(args):
if args.ignore_pricing_rule or not args.item_code:
if frappe.db.exists(args.doctype, args.name) and args.get("pricing_rule"):
item_details = remove_pricing_rule(args, item_details)
item_details = remove_pricing_rule_for_item(args.get("pricing_rule"), item_details)
return item_details
if not (args.item_group and args.brand):
@@ -177,19 +180,20 @@ def get_pricing_rule_for_item(args):
item_details.margin_rate_or_amount = pricing_rule.margin_rate_or_amount
if pricing_rule.price_or_discount == "Price":
item_details.update({
"price_list_rate": pricing_rule.price/flt(args.conversion_rate) \
"price_list_rate": (pricing_rule.price/flt(args.conversion_rate)) * args.conversion_factor or 1.0 \
if args.conversion_rate else 0.0,
"discount_percentage": 0.0
})
else:
item_details.discount_percentage = pricing_rule.discount_percentage
elif args.get('pricing_rule'):
item_details = remove_pricing_rule(args, item_details)
item_details = remove_pricing_rule_for_item(args.get("pricing_rule"), item_details)
return item_details
def remove_pricing_rule(args, item_details):
pricing_rule = frappe.db.get_value('Pricing Rule', args.get('pricing_rule'), ['price_or_discount', 'margin_type'], as_dict=1)
def remove_pricing_rule_for_item(pricing_rule, item_details):
pricing_rule = frappe.db.get_value('Pricing Rule', pricing_rule,
['price_or_discount', 'margin_type'], as_dict=1)
if pricing_rule and pricing_rule.price_or_discount == 'Discount Percentage':
item_details.discount_percentage = 0.0
@@ -197,8 +201,22 @@ def remove_pricing_rule(args, item_details):
item_details.margin_rate_or_amount = 0.0
item_details.margin_type = None
if item_details.pricing_rule:
item_details.pricing_rule = None
return item_details
@frappe.whitelist()
def remove_pricing_rules(item_list):
if isinstance(item_list, basestring):
item_list = json.loads(item_list)
out = []
for item in item_list:
item = frappe._dict(item)
out.append(remove_pricing_rule_for_item(item.get("pricing_rule"), item))
return out
def get_pricing_rules(args):
def _get_tree_conditions(parenttype, allow_blank=True):
field = frappe.scrub(parenttype)
@@ -267,9 +285,10 @@ def get_pricing_rules(args):
def filter_pricing_rules(args, pricing_rules):
# filter for qty
stock_qty = args.get('qty') * args.get('conversion_factor', 1)
if pricing_rules:
pricing_rules = filter(lambda x: (flt(args.get("qty"))>=flt(x.min_qty)
and (flt(args.get("qty"))<=x.max_qty if x.max_qty else True)), pricing_rules)
pricing_rules = filter(lambda x: (flt(stock_qty)>=flt(x.min_qty)
and (flt(stock_qty)<=x.max_qty if x.max_qty else True)), pricing_rules)
# add variant_of property in pricing rule
for p in pricing_rules:

View File

@@ -5,6 +5,9 @@
from __future__ import unicode_literals
import unittest
import frappe
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.stock.get_item_details import get_item_details
from frappe import MandatoryError
class TestPricingRule(unittest.TestCase):
def test_pricing_rule_for_discount(self):
@@ -203,3 +206,46 @@ class TestPricingRule(unittest.TestCase):
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 17.5)
def test_pricing_rule_for_stock_qty(self):
frappe.db.sql("delete from `tabPricing Rule`")
test_record = {
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule",
"apply_on": "Item Code",
"item_code": "_Test Item",
"selling": 1,
"price_or_discount": "Discount Percentage",
"price": 0,
"min_qty": 5,
"max_qty": 7,
"discount_percentage": 17.5,
"company": "_Test Company"
}
frappe.get_doc(test_record.copy()).insert()
if not frappe.db.get_value('UOM Conversion Detail',
{'parent': '_Test Item', 'uom': 'box'}):
item = frappe.get_doc('Item', '_Test Item')
item.append('uoms', {
'uom': 'Box',
'conversion_factor': 5
})
item.save(ignore_permissions=True)
# With pricing rule
so = make_sales_order(item_code="_Test Item", qty=1, uom="Box", do_not_submit=True)
so.items[0].price_list_rate = 100
so.submit()
so = frappe.get_doc('Sales Order', so.name)
self.assertEquals(so.items[0].discount_percentage, 17.5)
self.assertEquals(so.items[0].rate, 82.5)
# Without pricing rule
so = make_sales_order(item_code="_Test Item", qty=2, uom="Box", do_not_submit=True)
so.items[0].price_list_rate = 100
so.submit()
so = frappe.get_doc('Sales Order', so.name)
self.assertEquals(so.items[0].discount_percentage, 0)
self.assertEquals(so.items[0].rate, 100)

View File

@@ -2,10 +2,13 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.accounts");
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
{% include 'erpnext/public/js/controllers/buying.js' %};
erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
setup: function(doc) {
this.setup_posting_date_time_check();
this._super(doc);
},
onload: function() {
this._super();
@@ -40,35 +43,44 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
}
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
cur_frm.add_custom_button(doc.update_stock ? __('Purchase Return') : __('Debit Note'),
cur_frm.add_custom_button(__('Return / Debit Note'),
this.make_debit_note, __("Make"));
}
}
if(doc.docstatus===0) {
cur_frm.add_custom_button(__('Purchase Order'), function() {
var me = this;
this.frm.add_custom_button(__('Purchase Order'), function() {
erpnext.utils.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
source_doctype: "Purchase Order",
target: me.frm,
setters: {
supplier: me.frm.doc.supplier || undefined,
},
get_query_filters: {
supplier: cur_frm.doc.supplier || undefined,
docstatus: 1,
status: ["!=", "Closed"],
per_billed: ["<", 99.99],
company: cur_frm.doc.company
company: me.frm.doc.company
}
})
}, __("Get items from"));
cur_frm.add_custom_button(__('Purchase Receipt'), function() {
this.frm.add_custom_button(__('Purchase Receipt'), function() {
erpnext.utils.map_current_doc({
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
source_doctype: "Purchase Receipt",
target: me.frm,
date_field: "posting_date",
setters: {
supplier: me.frm.doc.supplier || undefined,
},
get_query_filters: {
supplier: cur_frm.doc.supplier || undefined,
docstatus: 1,
status: ["!=", "Closed"],
company: cur_frm.doc.company
company: me.frm.doc.company,
is_return: 0
}
})
}, __("Get items from"));
@@ -117,7 +129,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
hide_fields(this.frm.doc);
if(cint(this.frm.doc.is_paid)) {
if(!this.frm.doc.company) {
cur_frm.set_value("is_paid", 0)
this.frm.set_value("is_paid", 0)
msgprint(__("Please specify Company to proceed"));
}
}
@@ -205,6 +217,7 @@ function hide_fields(doc) {
cur_frm.cscript.update_stock = function(doc, dt, dn) {
hide_fields(doc, dt, dn);
this.frm.fields_dict.items.grid.toggle_reqd("item_code", doc.update_stock? true: false)
}
cur_frm.fields_dict.cash_bank_account.get_query = function(doc) {
@@ -218,18 +231,6 @@ cur_frm.fields_dict.cash_bank_account.get_query = function(doc) {
}
}
cur_frm.fields_dict['supplier_address'].get_query = function(doc, cdt, cdn) {
return{
filters:{'supplier': doc.supplier}
}
}
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return{
filters:{'supplier': doc.supplier}
}
}
cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
return {
query: "erpnext.controllers.queries.item_query",

View File

@@ -2,10 +2,9 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe, erpnext
from frappe.utils import cint, formatdate, flt, getdate
from frappe import _, throw
from erpnext.setup.utils import get_company_currency
import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
@@ -15,6 +14,7 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import update_bille
from erpnext.controllers.stock_controller import get_warehouse_account
from erpnext.accounts.general_ledger import make_gl_entries, merge_similar_entries, delete_gl_entries
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
from erpnext.buying.utils import check_for_closed_status
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -40,6 +40,7 @@ class PurchaseInvoice(BuyingController):
if not self.is_opening:
self.is_opening = 'No'
self.validate_posting_time()
super(PurchaseInvoice, self).validate()
if not self.is_return:
@@ -92,7 +93,7 @@ class PurchaseInvoice(BuyingController):
super(PurchaseInvoice, self).set_missing_values(for_validate)
def check_conversion_rate(self):
default_currency = get_company_currency(self.company)
default_currency = erpnext.get_company_currency(self.company)
if not default_currency:
throw(_('Please enter default currency in Company Master'))
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):
@@ -112,12 +113,11 @@ class PurchaseInvoice(BuyingController):
def check_for_closed_status(self):
check_list = []
pc_obj = frappe.get_doc('Purchase Common')
for d in self.get('items'):
if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt:
check_list.append(d.purchase_order)
pc_obj.check_for_closed_status('Purchase Order', d.purchase_order)
check_for_closed_status('Purchase Order', d.purchase_order)
def validate_with_previous_doc(self):
super(PurchaseInvoice, self).validate_with_previous_doc({
@@ -156,6 +156,12 @@ class PurchaseInvoice(BuyingController):
super(PurchaseInvoice, self).validate_warehouse()
def validate_item_code(self):
for d in self.get('items'):
if not d.item_code:
frappe.msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
def set_expense_account(self, for_validate=False):
auto_accounting_for_stock = cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
@@ -164,6 +170,7 @@ class PurchaseInvoice(BuyingController):
stock_items = self.get_stock_items()
if self.update_stock:
self.validate_item_code()
self.validate_warehouse()
warehouse_account = get_warehouse_account()
@@ -197,7 +204,7 @@ class PurchaseInvoice(BuyingController):
if frappe.db.get_value("Buying Settings", None, "po_required") == 'Yes':
for d in self.get('items'):
if not d.purchase_order:
throw(_("Purchse Order number required for Item {0}").format(d.item_code))
throw(_("Purchase Order number required for Item {0}").format(d.item_code))
def pr_required(self):
stock_items = self.get_stock_items()
@@ -302,12 +309,12 @@ class PurchaseInvoice(BuyingController):
asset.flags.ignore_validate_update_after_submit = True
asset.save()
def make_gl_entries(self, repost_future_gle=True):
def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
if not self.grand_total:
return
gl_entries = self.get_gl_entries()
if not gl_entries:
gl_entries = self.get_gl_entries()
if gl_entries:
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
@@ -344,7 +351,7 @@ class PurchaseInvoice(BuyingController):
self.make_payment_gl_entries(gl_entries)
self.make_write_off_gl_entry(gl_entries)
return gl_entries
def make_supplier_gl_entry(self, gl_entries):
@@ -621,10 +628,12 @@ class PurchaseInvoice(BuyingController):
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
where
bill_no = %(bill_no)s
and supplier = %(supplier)s
and name != %(name)s
and docstatus < 2
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
"bill_no": self.bill_no,
"supplier": self.supplier,
"name": self.name,
"year_start_date": fiscal_year.year_start_date,
"year_end_date": fiscal_year.year_end_date

View File

@@ -19,6 +19,7 @@ test_ignore = ["Serial No"]
class TestPurchaseInvoice(unittest.TestCase):
def setUp(self):
unlink_payment_on_cancel_of_invoice()
frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
def tearDown(self):
unlink_payment_on_cancel_of_invoice(0)

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
@@ -21,7 +22,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item",
@@ -52,6 +54,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -78,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -107,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -135,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -166,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -194,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -223,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity and Rate",
@@ -250,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Qty",
@@ -278,6 +288,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Qty",
@@ -307,6 +318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Qty",
@@ -324,6 +336,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -335,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -361,6 +404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
@@ -389,6 +433,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Conversion Factor",
@@ -405,6 +450,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Qty",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -416,6 +490,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -442,6 +517,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -471,6 +547,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -498,6 +575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -524,6 +602,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -552,6 +631,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -578,6 +658,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate ",
@@ -608,6 +689,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -638,6 +720,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -664,6 +747,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -694,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -724,6 +809,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -752,6 +838,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -779,6 +866,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -808,6 +896,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -837,6 +926,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -864,6 +954,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -893,6 +984,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -922,6 +1014,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -951,6 +1044,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accepted Warehouse",
@@ -980,6 +1074,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Warehouse",
@@ -1010,6 +1105,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1039,6 +1135,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1068,6 +1165,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1096,6 +1194,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1124,6 +1223,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Serial No",
@@ -1152,6 +1252,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting",
@@ -1179,6 +1280,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Head",
@@ -1211,6 +1313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1236,7 +1339,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1267,6 +1371,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1299,6 +1404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -1316,19 +1422,20 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_sample_item",
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sample Item",
"label": "Allow Zero Valuation Rate",
"length": 0,
"no_copy": 1,
"permlevel": 0,
@@ -1354,6 +1461,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -1383,7 +1491,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1399,7 +1508,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
@@ -1415,6 +1524,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1444,6 +1554,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Amount",
@@ -1473,7 +1584,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order",
@@ -1504,6 +1616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "BOM",
@@ -1533,6 +1646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1559,6 +1673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Fixed Asset",
@@ -1588,6 +1703,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset",
@@ -1616,7 +1732,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order Item",
@@ -1645,7 +1762,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipt",
@@ -1676,6 +1794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1702,7 +1821,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "PR Detail",
@@ -1732,6 +1852,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valuation Rate",
@@ -1760,6 +1881,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied Cost",
@@ -1788,6 +1910,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Landed Cost Voucher Amount",
@@ -1806,17 +1929,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-02-07 01:21:03.737800",
"modified": "2017-04-19 11:54:16.112134",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
@@ -1825,7 +1948,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}
}

View File

@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe, json
from frappe.utils import nowdate
from erpnext.setup.utils import get_exchange_rate
from frappe.core.doctype.communication.email import make
from erpnext.stock.get_item_details import get_pos_profile
from erpnext.accounts.party import get_party_account_currency
from erpnext.controllers.accounts_controller import get_taxes_and_charges
@@ -25,12 +26,15 @@ def get_pos_data():
update_multi_mode_option(doc, pos_profile)
default_print_format = pos_profile.get('print_format') or "Point of Sale"
print_template = frappe.db.get_value('Print Format', default_print_format, 'html')
customers = get_customers_list(pos_profile)
return {
'doc': doc,
'default_customer': pos_profile.get('customer'),
'items': get_items_list(pos_profile),
'customers': get_customers_list(pos_profile),
'item_groups': get_item_groups(pos_profile),
'customers': customers,
'address': get_customers_address(customers),
'serial_no_data': get_serial_no_data(pos_profile, doc.company),
'batch_no_data': get_batch_no_data(),
'tax_data': get_item_tax_data(),
@@ -59,6 +63,8 @@ def get_company_data(company):
def update_pos_profile_data(doc, pos_profile, company_data):
doc.campaign = pos_profile.get('campaign')
if pos_profile and not pos_profile.get('country'):
pos_profile.country = company_data.country
doc.write_off_account = pos_profile.get('write_off_account') or \
company_data.write_off_account
@@ -126,37 +132,68 @@ def get_items_list(pos_profile):
if pos_profile.get('item_groups'):
# Get items based on the item groups defined in the POS profile
for d in pos_profile.get('item_groups'):
item_groups.extend(get_child_nodes('Item Group', d.item_group))
item_groups.extend([d.name for d in get_child_nodes('Item Group', d.item_group)])
cond = "item_group in (%s)"%(', '.join(['%s']*len(item_groups)))
return frappe.db.sql("""
select
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
has_serial_no, expense_account, selling_cost_center, stock_uom, image,
default_warehouse, is_stock_item, barcode
default_warehouse, is_stock_item, barcode, brand
from
tabItem
where
disabled = 0 and has_variants = 0 and is_sales_item = 1 and {cond}
""".format(cond=cond), tuple(item_groups), as_dict=1)
def get_item_groups(pos_profile):
item_group_dict = {}
if pos_profile.get('item_groups'):
item_groups = []
for d in pos_profile.get('item_groups'):
item_groups.extend(get_child_nodes('Item Group', d.item_group))
else:
item_groups = frappe.db.sql("""Select name,
lft, rgt from `tabItem Group` order by lft""", as_dict=1)
for data in item_groups:
item_group_dict[data.name] = [data.lft, data.rgt]
return item_group_dict
def get_customers_list(pos_profile):
cond = "1=1"
customer_groups = []
if pos_profile.get('customer_groups'):
# Get customers based on the customer groups defined in the POS profile
for d in pos_profile.get('customer_groups'):
customer_groups.extend(get_child_nodes('Customer Group', d.customer_group))
customer_groups.extend([d.name for d in get_child_nodes('Customer Group', d.customer_group)])
cond = "customer_group in (%s)"%(', '.join(['%s']*len(customer_groups)))
return frappe.db.sql(""" select name, customer_name, customer_group,
territory from tabCustomer where disabled = 0
and {cond}""".format(cond=cond), tuple(customer_groups), as_dict=1) or {}
def get_customers_address(customers):
customer_address = {}
if isinstance(customers, basestring):
customers = [frappe._dict({'name': customers})]
for data in customers:
address = frappe.db.sql(""" select name, address_line1, address_line2, city, state,
email_id, phone, fax, pincode from `tabAddress` where is_primary_address =1 and name in
(select parent from `tabDynamic Link` where link_doctype = 'Customer' and link_name = %s
and parenttype = 'Address')""", data.name, as_dict=1)
if address:
address_data = address[0]
address_data.update({'full_name': data.customer_name})
customer_address[data.name] = address_data
return customer_address
def get_child_nodes(group_type, root):
lft, rgt = frappe.db.get_value(group_type, root, ["lft", "rgt"])
return frappe.db.sql_list(""" Select name from `tab{tab}` where
lft >= {lft} and rgt <= {rgt}""".format(tab=group_type, lft=lft, rgt=rgt))
return frappe.db.sql(""" Select name, lft, rgt from `tab{tab}` where
lft >= {lft} and rgt <= {rgt} order by lft""".format(tab=group_type, lft=lft, rgt=rgt), as_dict=1)
def get_serial_no_data(pos_profile, company):
# get itemwise serial no data
@@ -247,12 +284,18 @@ def get_pricing_rule_data(doc):
return pricing_rules
@frappe.whitelist()
def make_invoice(doc_list):
def make_invoice(doc_list={}, email_queue_list={}, customers_list={}):
if isinstance(doc_list, basestring):
doc_list = json.loads(doc_list)
name_list = []
if isinstance(email_queue_list, basestring):
email_queue_list = json.loads(email_queue_list)
if isinstance(customers_list, basestring):
customers_list = json.loads(customers_list)
customers = make_customer_and_address(customers_list)
name_list = []
for docs in doc_list:
for name, doc in docs.items():
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
@@ -260,27 +303,107 @@ def make_invoice(doc_list):
si_doc = frappe.new_doc('Sales Invoice')
si_doc.offline_pos_name = name
si_doc.update(doc)
submit_invoice(si_doc, name)
si_doc.due_date = doc.get('posting_date')
submit_invoice(si_doc, name, doc)
name_list.append(name)
else:
name_list.append(name)
return name_list
email_queue = make_email_queue(email_queue_list)
return {
'invoice': name_list,
'email_queue': email_queue,
'customers': customers
}
def validate_records(doc):
validate_customer(doc)
validate_item(doc)
def validate_customer(doc):
if not frappe.db.exists('Customer', doc.get('customer')):
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = doc.get('customer')
customer_doc.customer_type = 'Company'
customer_doc.customer_group = doc.get('customer_group')
customer_doc.territory = doc.get('territory')
customer_doc.save(ignore_permissions = True)
frappe.db.commit()
doc['customer'] = customer_doc.name
def make_customer_and_address(customers):
customer_list = []
for name, data in customers.items():
if not frappe.db.exists('Customer', name):
name = add_customer(name)
data = json.loads(data)
make_contact(data, name)
make_address(data, name)
customer_list.append(name)
frappe.db.commit()
return customer_list
def add_customer(name):
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = name
customer_doc.customer_type = 'Company'
customer_doc.customer_group = frappe.db.get_single_value('Selling Settings', 'customer_group')
customer_doc.territory = frappe.db.get_single_value('Selling Settings', 'territory')
customer_doc.flags.ignore_mandatory = True
customer_doc.save(ignore_permissions = True)
frappe.db.commit()
return customer_doc.name
def make_contact(args,customer):
if args.get('email_id') or args.get('phone'):
name = frappe.db.get_value('Dynamic Link',
{'link_doctype': 'Customer', 'link_name': customer, 'parenttype': 'Contact'}, 'parent')
args = {
'email_id': args.get('email_id'),
'phone': args.get('phone')
}
doc = frappe.new_doc('Contact')
if name:
doc = frappe.get_doc('Contact', name)
doc.update(args)
if not name:
doc.first_name = customer
doc.append('links',{
'link_doctype': 'Customer',
'link_name': customer
})
doc.save(ignore_permissions=True)
def make_address(args, customer):
if not args.get('address_line1'): return
name = args.get('name')
if not name:
data = get_customers_address(customer)
name = data[customer].get('name') if data else None
if name:
address = frappe.get_doc('Address', name)
else:
address = frappe.new_doc('Address')
address.country = frappe.db.get_value('Company', args.get('company'), 'country')
address.append('links',{
'link_doctype': 'Customer',
'link_name': customer
})
address.is_primary_address = 1
address.is_shipping_address = 1
address.update(args)
address.save(ignore_permissions = True)
def make_email_queue(email_queue):
name_list = []
for key, data in email_queue.items():
name = frappe.db.get_value('Sales Invoice', {'offline_pos_name': key}, 'name')
data = json.loads(data)
sender = frappe.session.user
print_format = "POS Invoice"
attachments = [frappe.attach_print('Sales Invoice', name, print_format= print_format)]
make(subject = data.get('subject'), content = data.get('content'), recipients = data.get('recipients'),
sender=sender,attachments = attachments, send_email=True,
doctype='Sales Invoice', name=name)
name_list.append(key)
return name_list
def validate_item(doc):
for item in doc.get('items'):
@@ -296,7 +419,8 @@ def validate_item(doc):
item_doc.save(ignore_permissions=True)
frappe.db.commit()
def submit_invoice(si_doc, name):
def submit_invoice(si_doc, name, doc):
try:
si_doc.insert()
si_doc.submit()
@@ -310,4 +434,5 @@ def save_invoice(e, si_doc, name):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
si_doc.docstatus = 0
si_doc.flags.ignore_mandatory = True
si_doc.due_date = si_doc.posting_date
si_doc.insert()

View File

@@ -6,8 +6,14 @@ cur_frm.pformat.print_heading = 'Invoice';
{% include 'erpnext/selling/sales_common.js' %};
cur_frm.add_fetch('customer', 'tax_id', 'tax_id');
frappe.provide("erpnext.accounts");
erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({
setup: function(doc) {
this.setup_posting_date_time_check();
this._super(doc);
},
onload: function() {
var me = this;
this._super();
@@ -51,7 +57,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
})
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
cur_frm.add_custom_button(__('Return / Credit Note'),
this.make_sales_return, __("Make"));
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
@@ -106,33 +112,44 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
sales_order_btn: function() {
this.$sales_order_btn = cur_frm.add_custom_button(__('Sales Order'),
var me = this;
this.$sales_order_btn = this.frm.add_custom_button(__('Sales Order'),
function() {
erpnext.utils.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
source_doctype: "Sales Order",
target: me.frm,
setters: {
customer: me.frm.doc.customer || undefined,
},
get_query_filters: {
docstatus: 1,
status: ["!=", "Closed"],
per_billed: ["<", 99.99],
customer: cur_frm.doc.customer || undefined,
company: cur_frm.doc.company
company: me.frm.doc.company
}
})
}, __("Get items from"));
},
delivery_note_btn: function() {
this.$delivery_note_btn = cur_frm.add_custom_button(__('Delivery Note'),
var me = this;
this.$delivery_note_btn = this.frm.add_custom_button(__('Delivery Note'),
function() {
erpnext.utils.map_current_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
source_doctype: "Delivery Note",
target: me.frm,
date_field: "posting_date",
setters: {
customer: me.frm.doc.customer || undefined
},
get_query: function() {
var filters = {
company: cur_frm.doc.company
docstatus: 1,
company: me.frm.doc.company
};
if(cur_frm.doc.customer) filters["customer"] = cur_frm.doc.customer;
if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
return {
query: "erpnext.controllers.queries.get_delivery_notes_to_be_billed",
filters: filters
@@ -282,6 +299,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
this.calculate_write_off_amount()
}else {
this.frm.set_value("change_amount", 0.0)
this.frm.set_value("base_change_amount", 0.0)
}
this.frm.refresh_fields();
@@ -321,6 +339,7 @@ cur_frm.cscript.hide_fields = function(doc) {
cur_frm.cscript.update_stock = function(doc, dt, dn) {
cur_frm.cscript.hide_fields(doc, dt, dn);
this.frm.fields_dict.items.grid.toggle_reqd("item_code", doc.update_stock? true: false)
}
cur_frm.cscript['Make Delivery Note'] = function() {

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,7 @@ from erpnext.stock.doctype.delivery_note.delivery_note import update_billed_amou
from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data
from erpnext.accounts.doctype.asset.depreciation \
import get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal
from erpnext.stock.doctype.batch.batch import set_batch_nos
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -52,7 +53,7 @@ class SalesInvoice(SellingController):
def validate(self):
super(SalesInvoice, self).validate()
self.validate_posting_time()
self.validate_auto_set_posting_time()
self.so_dn_required()
self.validate_proj_cust()
self.validate_with_previous_doc()
@@ -78,6 +79,10 @@ class SalesInvoice(SellingController):
if not self.is_opening:
self.is_opening = 'No'
if self._action != 'submit' and self.update_stock and not self.is_return:
set_batch_nos(self, 'warehouse', True)
self.set_against_income_account()
self.validate_c_form()
@@ -87,7 +92,7 @@ class SalesInvoice(SellingController):
self.set_billing_hours_and_amount()
self.update_timesheet_billing_for_project()
self.set_status()
def before_save(self):
set_account_for_mode_of_payment(self)
@@ -330,7 +335,7 @@ class SalesInvoice(SellingController):
frappe.throw(_("Debit To account must be a Receivable account"))
self.party_account_currency = account.account_currency
def clear_unallocated_mode_of_payments(self):
self.set("payments", self.get("payments", {"amount": ["not in", [0, None, ""]]}))
@@ -341,13 +346,23 @@ class SalesInvoice(SellingController):
super(SalesInvoice, self).validate_with_previous_doc({
"Sales Order": {
"ref_dn_field": "sales_order",
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
["currency", "="]],
"compare_fields": [["customer", "="], ["company", "="], ["project", "="], ["currency", "="]]
},
"Sales Order Item": {
"ref_dn_field": "so_detail",
"compare_fields": [["item_code", "="], ["uom", "="], ["conversion_factor", "="]],
"is_child_table": True,
"allow_duplicate_prev_row_id": True
},
"Delivery Note": {
"ref_dn_field": "delivery_note",
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
["currency", "="]],
"compare_fields": [["customer", "="], ["company", "="], ["project", "="], ["currency", "="]]
},
"Delivery Note Item": {
"ref_dn_field": "dn_detail",
"compare_fields": [["item_code", "="], ["uom", "="], ["conversion_factor", "="]],
"is_child_table": True,
"allow_duplicate_prev_row_id": True
},
})
@@ -368,6 +383,12 @@ class SalesInvoice(SellingController):
def add_remarks(self):
if not self.remarks: self.remarks = 'No Remarks'
def validate_auto_set_posting_time(self):
# Don't auto set the posting date and time if invoice is amended
if self.is_new() and self.amended_from:
self.set_posting_time = 1
self.validate_posting_time()
def so_dn_required(self):
"""check in manage account if sales order / delivery note required or not."""
@@ -390,10 +411,10 @@ class SalesInvoice(SellingController):
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project))
def validate_pos(self):
if flt(self.paid_amount) + flt(self.write_off_amount) \
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)) and self.is_return:
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
if self.is_return:
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"))
def validate_item_code(self):
for d in self.get('items'):
@@ -532,10 +553,12 @@ class SalesInvoice(SellingController):
if d.delivery_note and frappe.db.get_value("Delivery Note", d.delivery_note, "docstatus") != 1:
throw(_("Delivery Note {0} is not submitted").format(d.delivery_note))
def make_gl_entries(self, repost_future_gle=True):
def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
if not self.grand_total:
return
gl_entries = self.get_gl_entries()
if not gl_entries:
gl_entries = self.get_gl_entries()
if gl_entries:
from erpnext.accounts.general_ledger import make_gl_entries
@@ -679,7 +702,7 @@ class SalesInvoice(SellingController):
else payment_mode.amount
}, payment_mode_account_currency)
)
def make_gle_for_change_amount(self, gl_entries):
if cint(self.is_pos) and self.change_amount:
if self.account_for_change_amount:
@@ -696,7 +719,7 @@ class SalesInvoice(SellingController):
"against_voucher_type": self.doctype
}, self.party_account_currency)
)
gl_entries.append(
self.get_gl_dict({
"account": self.account_for_change_amount,
@@ -706,7 +729,7 @@ class SalesInvoice(SellingController):
)
else:
frappe.throw(_("Select change amount account"), title="Mandatory Field")
def make_write_off_gl_entry(self, gl_entries):
# write off entries, applicable if only pos
if self.write_off_account and self.write_off_amount:
@@ -788,11 +811,11 @@ def make_delivery_note(source_name, target_doc=None):
target.run_method("calculate_taxes_and_totals")
def update_item(source_doc, target_doc, source_parent):
target_doc.base_amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
flt(source_doc.base_rate)
target_doc.amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
flt(source_doc.rate)
target_doc.qty = flt(source_doc.qty) - flt(source_doc.delivered_qty)
target_doc.stock_qty = target_doc.qty * flt(source_doc.conversion_factor)
target_doc.base_amount = target_doc.qty * flt(source_doc.base_rate)
target_doc.amount = target_doc.qty * flt(source_doc.rate)
doclist = get_mapped_doc("Sales Invoice", source_name, {
"Sales Invoice": {
@@ -808,7 +831,8 @@ def make_delivery_note(source_name, target_doc=None):
"parent": "against_sales_invoice",
"serial_no": "serial_no",
"sales_order": "against_sales_order",
"so_detail": "so_detail"
"so_detail": "so_detail",
"cost_center": "cost_center"
},
"postprocess": update_item,
"condition": lambda doc: doc.delivered_by_supplier!=1
@@ -837,4 +861,4 @@ def make_sales_return(source_name, target_doc=None):
def set_account_for_mode_of_payment(self):
for data in self.payments:
if not data.account:
data.account = get_bank_cash_account(data.mode_of_payment, self.company).get("account")
data.account = get_bank_cash_account(data.mode_of_payment, self.company).get("account")

View File

@@ -20,7 +20,10 @@
"item_name": "138-CMS Shoe",
"parentfield": "items",
"qty": 1.0,
"rate": 500.0
"rate": 500.0,
"uom": "_Test UOM",
"conversion_factor": 1,
"stock_uom": "_Test UOM"
}
],
"base_grand_total": 561.8,
@@ -89,7 +92,10 @@
"item_name": "_Test Item",
"parentfield": "items",
"price_list_rate": 500.0,
"qty": 1.0
"qty": 1.0,
"uom": "_Test UOM",
"conversion_factor": 1,
"stock_uom": "_Test UOM"
}
],
"base_grand_total": 630.0,
@@ -141,7 +147,9 @@
"price_list_rate": 50,
"qty": 10,
"rate": 50,
"stock_uom": "_Test UOM"
"uom": "_Test UOM 1",
"conversion_factor": 1,
"stock_uom": "_Test UOM 1"
},
{
"cost_center": "_Test Cost Center - _TC",
@@ -153,6 +161,8 @@
"parentfield": "items",
"price_list_rate": 150,
"qty": 5,
"uom": "_Test UOM",
"conversion_factor": 1,
"rate": 150,
"stock_uom": "_Test UOM"
}
@@ -263,7 +273,10 @@
"parentfield": "items",
"price_list_rate": 62.5,
"qty": 10,
"stock_uom": "_Test UOM"
"uom": "_Test UOM 1",
"conversion_factor": 1,
"stock_uom": "_Test UOM 1"
},
{
"cost_center": "_Test Cost Center - _TC",
@@ -275,6 +288,8 @@
"parentfield": "items",
"price_list_rate": 190.66,
"qty": 5,
"uom": "_Test UOM",
"conversion_factor": 1,
"stock_uom": "_Test UOM"
}
],

View File

@@ -4,7 +4,7 @@ from __future__ import unicode_literals
import frappe
import unittest, copy
from frappe.utils import nowdate, add_days, flt, nowdate
from frappe.utils import nowdate, add_days, flt
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry, get_qty_after_transaction
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import unlink_payment_on_cancel_of_invoice
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
@@ -162,11 +162,50 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEquals(si.base_grand_total, 1628)
self.assertEquals(si.grand_total, 32.56)
def test_sales_invoice_with_discount_and_inclusive_tax(self):
si = create_sales_invoice(qty=100, rate=50, do_not_save=True)
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "_Test Account Service Tax - _TC",
"cost_center": "_Test Cost Center - _TC",
"description": "Service Tax",
"rate": 14,
'included_in_print_rate': 1
})
si.insert()
# with inclusive tax
self.assertEquals(si.net_total, 4385.96)
self.assertEquals(si.grand_total, 5000)
si.reload()
# additional discount
si.discount_amount = 100
si.apply_discount_on = 'Net Total'
si.save()
# with inclusive tax and additional discount
self.assertEquals(si.net_total, 4285.96)
self.assertEquals(si.grand_total, 4885.99)
si.reload()
# additional discount on grand total
si.discount_amount = 100
si.apply_discount_on = 'Grand Total'
si.save()
# with inclusive tax and additional discount
self.assertEquals(si.net_total, 4298.24)
self.assertEquals(si.grand_total, 4900.00)
def test_sales_invoice_discount_amount(self):
si = frappe.copy_doc(test_records[3])
si.discount_amount = 104.95
si.append("taxes", {
"doctype": "Sales Taxes and Charges",
"charge_type": "On Previous Row Amount",
"account_head": "_Test Account Service Tax - _TC",
"cost_center": "_Test Cost Center - _TC",
@@ -519,7 +558,7 @@ class TestSalesInvoice(unittest.TestCase):
{'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 330}]
invoice_data = [{'09052016142': pos}]
si = make_invoice(invoice_data)
si = make_invoice(invoice_data).get('invoice')
self.assertEquals(si[0], '09052016142')
sales_invoice = frappe.get_all('Sales Invoice', fields =["*"], filters = {'offline_pos_name': '09052016142', 'docstatus': 1})
@@ -917,51 +956,13 @@ class TestSalesInvoice(unittest.TestCase):
def test_create_so_with_margin(self):
si = create_sales_invoice(item_code="_Test Item", qty=1, do_not_submit=True)
price_list_rate = si.items[0].price_list_rate
price_list_rate = 100
si.items[0].price_list_rate = price_list_rate
si.items[0].margin_type = 'Percentage'
si.items[0].margin_rate_or_amount = 25
si.insert()
self.assertEqual(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
self.assertNotEquals(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
si.items[0].margin_rate_or_amount = 25
si.submit()
self.assertNotEquals(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
def test_party_status(self):
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from frappe.utils import random_string
customer_name = 'test customer for status'
if frappe.db.exists('Customer', customer_name):
customer = frappe.get_doc('Customer', customer_name)
customer.db_set('status', 'Active')
else:
customer = frappe.get_doc({
'doctype': 'Customer',
'customer_name': customer_name,
'customer_group': 'Commercial',
'customer_type': 'Individual',
'territory': 'Rest of the World'
}).insert()
self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
invoice = create_sales_invoice(customer="test customer for status",
debit_to="_Test Receivable - _TC",
currency="USD", conversion_rate=50)
self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
pe = get_payment_entry(invoice.doctype, invoice.name)
pe.reference_no = random_string(10)
pe.reference_date = invoice.posting_date
pe.insert()
pe.submit()
self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
def test_outstanding_amount_after_advance_jv_cancelation(self):
from erpnext.accounts.doctype.journal_entry.test_journal_entry \
import test_records as jv_test_records
@@ -986,15 +987,15 @@ class TestSalesInvoice(unittest.TestCase):
#check outstanding after advance allocation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total - si.total_advance, si.precision("outstanding_amount")))
#added to avoid Document has been modified exception
jv = frappe.get_doc("Journal Entry", jv.name)
jv.cancel()
si.load_from_db()
#check outstanding after advance cancellation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total + si.total_advance, si.precision("outstanding_amount")))
def test_outstanding_amount_after_advance_payment_entry_cancelation(self):
pe = frappe.get_doc({
"doctype": "Payment Entry",
@@ -1015,7 +1016,7 @@ class TestSalesInvoice(unittest.TestCase):
})
pe.insert()
pe.submit()
si = frappe.copy_doc(test_records[0])
si.is_pos = 0
si.append("advances", {
@@ -1028,23 +1029,44 @@ class TestSalesInvoice(unittest.TestCase):
})
si.insert()
si.submit()
si.load_from_db()
#check outstanding after advance allocation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total - si.total_advance, si.precision("outstanding_amount")))
#added to avoid Document has been modified exception
pe = frappe.get_doc("Payment Entry", pe.name)
pe.cancel()
si.load_from_db()
#check outstanding after advance cancellation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total + si.total_advance, si.precision("outstanding_amount")))
def test_multiple_uom_in_selling(self):
si = frappe.copy_doc(test_records[1])
si.items[0].uom = "_Test UOM 1"
si.items[0].conversion_factor = None
si.items[0].price_list_rate = None
si.save()
expected_values = {
"keys": ["price_list_rate", "stock_uom", "uom", "conversion_factor", "rate", "amount",
"base_price_list_rate", "base_rate", "base_amount"],
"_Test Item": [1000, "_Test UOM", "_Test UOM 1", 10.0, 1000, 1000, 1000, 1000, 1000]
}
# check if the conversion_factor and price_list_rate is calculated according to uom
for d in si.get("items"):
for i, k in enumerate(expected_values["keys"]):
self.assertEquals(d.get(k), expected_values[d.item_code][i])
def create_sales_invoice(**args):
si = frappe.new_doc("Sales Invoice")
args = frappe._dict(args)
if args.posting_date:
si.set_posting_time = 1
si.posting_date = args.posting_date or nowdate()
si.company = args.company or "_Test Company"

View File

@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Time Sheet",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -48,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Billing Hours",
"length": 0,
"no_copy": 0,
@@ -57,6 +63,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -74,7 +81,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Billing Amount",
"length": 0,
"no_copy": 0,
@@ -83,6 +92,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,7 +110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Timesheet Detail",
"length": 0,
"no_copy": 1,
@@ -109,6 +121,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -126,7 +139,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-09-09 14:01:04.095775",
"modified": "2017-02-17 16:47:04.413420",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Timesheet",
@@ -136,7 +149,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -4,11 +4,10 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import frappe, erpnext
from frappe import _, msgprint, throw
from frappe.utils import flt, fmt_money
from frappe.model.document import Document
from erpnext.setup.utils import get_company_currency
class OverlappingConditionError(frappe.ValidationError): pass
class FromGreaterThanToError(frappe.ValidationError): pass
@@ -77,7 +76,7 @@ class ShippingRule(Document):
overlaps.append([d1, d2])
if overlaps:
company_currency = get_company_currency(self.company)
company_currency = erpnext.get_company_currency(self.company)
msgprint(_("Overlapping conditions found between:"))
messages = []
for d1, d2 in overlaps:

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Tax Type",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Use for Shopping Cart",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Tax Template",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Tax Template",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Filters",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -226,6 +233,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -255,6 +263,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing City",
@@ -283,6 +292,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing County",
@@ -311,6 +321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing State",
@@ -339,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Country",
@@ -368,6 +380,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -426,6 +440,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Type",
@@ -455,6 +470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping City",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping County",
@@ -511,6 +528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping State",
@@ -539,6 +557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Country",
@@ -568,6 +587,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Validity",
@@ -596,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -624,6 +645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -651,6 +673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -679,6 +702,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -707,6 +731,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Priority",
@@ -735,6 +760,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -762,6 +788,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -791,7 +818,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-13 15:56:28.704122",
"modified": "2017-02-17 16:22:42.501765",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Rule",
@@ -808,7 +835,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -823,7 +849,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}
}

View File

@@ -7,6 +7,7 @@ import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cstr, cint
from frappe.geo.doctype.address.address import get_default_address
class IncorrectCustomerGroup(frappe.ValidationError): pass
class IncorrectSupplierType(frappe.ValidationError): pass
@@ -96,27 +97,31 @@ class TaxRule(Document):
@frappe.whitelist()
def get_party_details(party, party_type, args=None):
out = {}
billing_address, shipping_address = None, None
if args:
billing_filters= {"name": args.get("billing_address")}
shipping_filters= {"name": args.get("shipping_address")}
if args.get('billing_address'):
billing_address = frappe.get_doc('Address', args.get('billing_address'))
if args.get('shipping_address'):
shipping_address = frappe.get_doc('Address', args.get('shipping_address'))
else:
billing_filters= {party_type: party, "is_primary_address": 1}
shipping_filters= {party_type:party, "is_shipping_address": 1}
billing_address= frappe.get_all("Address", fields=["city", "county", "state", "country"], filters= billing_filters)
shipping_address= frappe.get_all("Address", fields=["city", "county", "state", "country"], filters= shipping_filters)
billing_address_name = get_default_address(party_type, party)
shipping_address_name = get_default_address(party_type, party, 'is_shipping_address')
if billing_address_name:
billing_address = frappe.get_doc('Address', billing_address_name)
if shipping_address_name:
shipping_address = frappe.get_doc('Address', shipping_address_name)
if billing_address:
out["billing_city"]= billing_address[0].city
out["billing_county"]= billing_address[0].county
out["billing_state"]= billing_address[0].state
out["billing_country"]= billing_address[0].country
out["billing_city"]= billing_address.city
out["billing_county"]= billing_address.county
out["billing_state"]= billing_address.state
out["billing_country"]= billing_address.country
if shipping_address:
out["shipping_city"]= shipping_address[0].city
out["shipping_county"]= shipping_address[0].county
out["shipping_state"]= shipping_address[0].state
out["shipping_country"]= shipping_address[0].country
out["shipping_city"]= shipping_address.city
out["shipping_county"]= shipping_address.county
out["shipping_state"]= shipping_address.state
out["shipping_country"]= shipping_address.country
return out

View File

@@ -11,12 +11,12 @@ from erpnext.accounts.doctype.budget.budget import validate_expense_against_budg
class StockAccountInvalidTransaction(frappe.ValidationError): pass
def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding='Yes'):
def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding='Yes', from_repost=False):
if gl_map:
if not cancel:
gl_map = process_gl_map(gl_map, merge_entries)
if gl_map and len(gl_map) > 1:
save_entries(gl_map, adv_adj, update_outstanding)
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
else:
frappe.throw(_("Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction."))
else:
@@ -78,21 +78,26 @@ def check_if_in_list(gle, gl_map):
and cstr(e.get('project')) == cstr(gle.get('project')):
return e
def save_entries(gl_map, adv_adj, update_outstanding):
validate_account_for_auto_accounting_for_stock(gl_map)
def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False):
if not from_repost:
validate_account_for_auto_accounting_for_stock(gl_map)
round_off_debit_credit(gl_map)
for entry in gl_map:
make_entry(entry, adv_adj, update_outstanding)
make_entry(entry, adv_adj, update_outstanding, from_repost)
# check against budget
validate_expense_against_budget(entry)
if not from_repost:
validate_expense_against_budget(entry)
def make_entry(args, adv_adj, update_outstanding):
def make_entry(args, adv_adj, update_outstanding, from_repost=False):
args.update({"doctype": "GL Entry"})
gle = frappe.get_doc(args)
gle.flags.ignore_permissions = 1
gle.flags.from_repost = from_repost
gle.insert()
gle.run_method("on_update_with_args", adv_adj, update_outstanding)
gle.run_method("on_update_with_args", adv_adj, update_outstanding, from_repost)
gle.submit()
def validate_account_for_auto_accounting_for_stock(gl_map):
@@ -118,10 +123,10 @@ def round_off_debit_credit(gl_map):
debit_credit_diff = flt(debit_credit_diff, precision)
if gl_map[0]["voucher_type"] == "Journal Entry":
if gl_map[0]["voucher_type"] in ("Journal Entry", "Payment Entry"):
allowance = 5.0 / (10**precision)
else:
allowance = 1
allowance = .5
if abs(debit_credit_diff) >= allowance:
frappe.throw(_("Debit and Credit not equal for {0} #{1}. Difference is {2}.")

File diff suppressed because it is too large Load Diff

View File

@@ -7,10 +7,13 @@ import frappe
import datetime
from frappe import _, msgprint, scrub
from frappe.defaults import get_user_permissions
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years, get_timestamp
from erpnext.utilities.doctype.address.address import get_address_display
from erpnext.utilities.doctype.contact.contact import get_contact_details
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, \
add_years, get_timestamp, nowdate, flt
from frappe.geo.doctype.address.address import get_address_display, get_default_address
from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
from erpnext.accounts.utils import get_fiscal_year
from erpnext import get_default_currency
class DuplicatePartyAccountError(frappe.ValidationError): pass
@@ -60,21 +63,18 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
def set_address_details(out, party, party_type):
billing_address_field = "customer_address" if party_type == "Lead" \
else party_type.lower() + "_address"
out[billing_address_field] = frappe.db.get_value("Address",
{party_type.lower(): party.name, "is_primary_address":1}, "name")
out[billing_address_field] = get_default_address(party_type, party.name)
# address display
out.address_display = get_address_display(out[billing_address_field])
# shipping address
if party_type in ["Customer", "Lead"]:
out.shipping_address_name = frappe.db.get_value("Address",
{party_type.lower(): party.name, "is_shipping_address":1}, "name")
out.shipping_address_name = get_default_address(party_type, party.name, 'is_shipping_address')
out.shipping_address = get_address_display(out["shipping_address_name"])
def set_contact_details(out, party, party_type):
out.contact_person = frappe.db.get_value("Contact",
{party_type.lower(): party.name, "is_primary_contact":1}, "name")
out.contact_person = get_default_contact(party_type, party.name)
if not out.contact_person:
out.update({
@@ -154,13 +154,6 @@ def set_account_and_due_date(party, account, party_type, company, posting_date,
}
return out
def get_company_currency():
company_currency = frappe._dict()
for d in frappe.get_all("Company", fields=["name", "default_currency"]):
company_currency.setdefault(d.name, d.default_currency)
return company_currency
@frappe.whitelist()
def get_party_account(party_type, party, company):
"""Returns the account for the given `party`.
@@ -174,17 +167,17 @@ def get_party_account(party_type, party, company):
account = frappe.db.get_value("Party Account",
{"parenttype": party_type, "parent": party, "company": company}, "account")
if not account:
if not account and party_type in ['Customer', 'Supplier']:
party_group_doctype = "Customer Group" if party_type=="Customer" else "Supplier Type"
group = frappe.db.get_value(party_type, party, scrub(party_group_doctype))
account = frappe.db.get_value("Party Account",
{"parenttype": party_group_doctype, "parent": group, "company": company}, "account")
if not account:
if not account and party_type in ['Customer', 'Supplier']:
default_account_name = "default_receivable_account" \
if party_type=="Customer" else "default_payable_account"
account = frappe.db.get_value("Company", company, default_account_name)
existing_gle_currency = get_party_gle_currency(party_type, party, company)
if existing_gle_currency:
if account:
@@ -211,7 +204,7 @@ def get_party_gle_currency(party_type, party, company):
return frappe.local_cache("party_gle_currency", (party_type, party, company), generator,
regenerate_if_none=True)
def get_party_gle_account(party_type, party, company):
def generator():
existing_gle_account = frappe.db.sql("""select account from `tabGL Entry`
@@ -252,7 +245,7 @@ def validate_party_accounts(doc):
if existing_gle_currency and party_account_currency != existing_gle_currency:
frappe.throw(_("Accounting entries have already been made in currency {0} for company {1}. Please select a receivable or payable account with currency {0}.").format(existing_gle_currency, account.company))
if doc.default_currency and party_account_currency and company_default_currency:
if doc.get("default_currency") and party_account_currency and company_default_currency:
if doc.default_currency != party_account_currency and doc.default_currency != company_default_currency:
frappe.throw(_("Billing currency must be equal to either default comapany's currency or party account currency"))
@@ -340,13 +333,18 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
def validate_party_frozen_disabled(party_type, party_name):
if party_type and party_name:
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
if party.disabled:
frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
elif party.is_frozen:
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
if party_type in ("Customer", "Supplier"):
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
if party.disabled:
frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
elif party.get("is_frozen"):
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
elif party_type == "Employee":
if frappe.db.get_value("Employee", party_name, "status") == "Left":
frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), alert=True)
def get_timeline_data(doctype, name):
'''returns timeline data for the past one year'''
@@ -364,4 +362,39 @@ def get_timeline_data(doctype, name):
timestamp = get_timestamp(date)
out.update({ timestamp: count })
return out
return out
def get_dashboard_info(party_type, party):
current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True)
company = frappe.db.get_default("company") or frappe.get_all("Company")[0].name
party_account_currency = get_party_account_currency(party_type, party, company)
company_default_currency = get_default_currency() \
or frappe.db.get_value('Company', company, 'default_currency')
if party_account_currency==company_default_currency:
total_field = "base_grand_total"
else:
total_field = "grand_total"
doctype = "Sales Invoice" if party_type=="Customer" else "Purchase Invoice"
billing_this_year = frappe.db.sql("""
select sum({0})
from `tab{1}`
where {2}=%s and docstatus=1 and posting_date between %s and %s
""".format(total_field, doctype, party_type.lower()),
(party, current_fiscal_year.year_start_date, current_fiscal_year.year_end_date))
total_unpaid = frappe.db.sql("""
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
from `tabGL Entry`
where party_type = %s and party=%s""", (party_type, party))
info = {}
info["billing_this_year"] = flt(billing_this_year[0][0]) if billing_this_year else 0
info["currency"] = party_account_currency
info["total_unpaid"] = flt(total_unpaid[0][0]) if total_unpaid else 0
if party_type == "Supplier":
info["total_unpaid"] = -1 * info["total_unpaid"]
return info

View File

@@ -1,81 +0,0 @@
# Copyright (c) 2015, Frappe 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 evaluate_filters
from frappe.desk.notifications import get_filters_for
# NOTE: if you change this also update triggers in erpnext/hooks.py
status_depends_on = {
'Customer': ('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', 'Project', 'Issue'),
'Supplier': ('Supplier Quotation', 'Purchase Order', 'Purchase Receipt', 'Purchase Invoice')
}
default_status = {
'Customer': 'Active',
'Supplier': None
}
def notify_status(doc, method=None):
'''Notify status to customer, supplier'''
party_type = None
for key, doctypes in status_depends_on.iteritems():
if doc.doctype in doctypes:
party_type = key
break
if not party_type:
return
name = doc.get(party_type.lower())
if not name:
return
party = frappe.get_doc(party_type, name)
filters = get_filters_for(doc.doctype)
party.flags.ignore_mandatory = True
status = None
if filters:
if evaluate_filters(doc, filters):
# filters match, passed document is open
status = 'Open'
if status=='Open':
if party.status != 'Open':
# party not open, make it open
party.status = 'Open'
party.save(ignore_permissions=True)
else:
if party.status == 'Open':
# may be open elsewhere, check
# default status
update_status(party)
party.update_modified()
party.notify_update()
def get_party_status(doc):
'''return party status based on open documents'''
status = default_status[doc.doctype]
for doctype in status_depends_on[doc.doctype]:
filters = get_filters_for(doctype)
filters[doc.doctype.lower()] = doc.name
if filters:
open_count = frappe.get_all(doctype, fields='name', filters=filters, limit_page_length=1)
if len(open_count) > 0:
status = 'Open'
break
return status
def update_status(doc):
'''Set status as open if there is any open notification'''
status = get_party_status(doc)
if doc.status != status:
doc.db_set('status', status)

View File

@@ -7,10 +7,10 @@
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }}{{offline_pos_name}}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }} {{ offline_pos_name }}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, null,precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"line_breaks": 0,
"modified": "2017-01-12 14:56:12.571032",
"modified": "2017-04-19 13:28:05.129504",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Point of Sale",

View File

@@ -53,5 +53,11 @@ frappe.query_reports["Accounts Payable"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Payable Summary"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Payable Summary', {company: filters.company});
});
}
}

View File

@@ -1,17 +1,32 @@
{
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-22 16:16:03",
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-07-24 01:08:20.996267",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable",
"report_type": "Script Report"
}
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-22 16:16:03",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 3,
"is_standard": "Yes",
"modified": "2017-02-24 20:09:46.150861",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable",
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Purchase User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -53,5 +53,12 @@ frappe.query_reports["Accounts Payable Summary"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Payable"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Payable', {company: filters.company});
});
}
}

View File

@@ -5,13 +5,28 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2014-11-04 12:09:59.672379",
"modified": "2017-02-24 20:11:35.655834",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable Summary",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable Summary",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Purchase User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

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

View File

@@ -16,6 +16,21 @@ frappe.query_reports["Accounts Receivable"] = {
"fieldtype": "Link",
"options": "Customer"
},
{
"fieldname":"customer_group",
"label": __("Customer Group"),
"fieldtype": "Link",
"options": "Customer Group"
},
{
"fieldname":"credit_days_based_on",
"label": __("Credit Days Based On"),
"fieldtype": "Select",
"options": "" + NEWLINE + "Fixed Days" + NEWLINE + "Last Day of the Next Month"
},
{
"fieldtype": "Break",
},
{
"fieldname":"report_date",
"label": __("As on Date"),
@@ -29,9 +44,6 @@ frappe.query_reports["Accounts Receivable"] = {
"options": 'Posting Date' + NEWLINE + 'Due Date',
"default": "Posting Date"
},
{
"fieldtype": "Break",
},
{
"fieldname":"range1",
"label": __("Ageing Range 1"),
@@ -53,5 +65,12 @@ frappe.query_reports["Accounts Receivable"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Receivable Summary"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Receivable Summary', {company: filters.company});
});
}
}

View File

@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-16 11:31:13",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.907658",
"modified": "2017-03-06 05:52:06.235584",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Accounts Receivable",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -71,7 +71,10 @@ class ReceivablePayableReport(object):
"width": 100
})
if args.get("party_type") == "Customer":
columns += [_("Territory") + ":Link/Territory:80"]
columns += [
_("Territory") + ":Link/Territory:80",
_("Customer Group") + ":Link/Customer Group:120"
]
if args.get("party_type") == "Supplier":
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
@@ -139,7 +142,7 @@ class ReceivablePayableReport(object):
# customer territory / supplier type
if args.get("party_type") == "Customer":
row += [self.get_territory(gle.party)]
row += [self.get_territory(gle.party), self.get_customer_group(gle.party)]
if args.get("party_type") == "Supplier":
row += [self.get_supplier_type(gle.party)]
@@ -186,6 +189,9 @@ class ReceivablePayableReport(object):
def get_territory(self, party_name):
return self.get_party_map("Customer").get(party_name, {}).get("territory") or ""
def get_customer_group(self, party_name):
return self.get_party_map("Customer").get(party_name, {}).get("customer_group") or ""
def get_supplier_type(self, party_name):
return self.get_party_map("Supplier").get(party_name, {}).get("supplier_type") or ""
@@ -193,12 +199,12 @@ class ReceivablePayableReport(object):
def get_party_map(self, party_type):
if not hasattr(self, "party_map"):
if party_type == "Customer":
self.party_map = dict(((r.name, r) for r in frappe.db.sql("""select {0}, {1}, {2} from `tab{3}`"""
.format("name", "customer_name", "territory", party_type), as_dict=True)))
select_fields = "name, customer_name, territory, customer_group"
elif party_type == "Supplier":
self.party_map = dict(((r.name, r) for r in frappe.db.sql("""select {0}, {1}, {2} from `tab{3}`"""
.format("name", "supplier_name", "supplier_type", party_type), as_dict=True)))
select_fields = "name, supplier_name, supplier_type"
self.party_map = dict(((r.name, r) for r in frappe.db.sql("select {0} from `tab{1}`"
.format(select_fields, party_type), as_dict=True)))
return self.party_map
@@ -251,6 +257,19 @@ class ReceivablePayableReport(object):
conditions.append("party=%s")
values.append(self.filters.get(party_type_field))
if party_type_field=="customer":
if self.filters.get("customer_group"):
lft, rgt = frappe.db.get_value("Customer Group",
self.filters.get("customer_group"), ["lft", "rgt"])
conditions.append("""party in (select name from tabCustomer
where exists(select name from `tabCustomer Group` where lft >= {0} and rgt <= {1}
and name=tabCustomer.customer_group))""".format(lft, rgt))
if self.filters.get("credit_days_based_on"):
conditions.append("party in (select name from tabCustomer where credit_days_based_on=%s)")
values.append(self.filters.get("credit_days_based_on"))
return " and ".join(conditions), values
def get_gl_entries_for(self, party, party_type, against_voucher_type, against_voucher):

View File

@@ -16,6 +16,21 @@ frappe.query_reports["Accounts Receivable Summary"] = {
"fieldtype": "Link",
"options": "Customer"
},
{
"fieldname":"customer_group",
"label": __("Customer Group"),
"fieldtype": "Link",
"options": "Customer Group"
},
{
"fieldname":"credit_days_based_on",
"label": __("Credit Days Based On"),
"fieldtype": "Select",
"options": "" + NEWLINE + "Fixed Days" + NEWLINE + "Last Day of the Next Month"
},
{
"fieldtype": "Break",
},
{
"fieldname":"report_date",
"label": __("Date"),
@@ -29,9 +44,6 @@ frappe.query_reports["Accounts Receivable Summary"] = {
"options": 'Posting Date' + NEWLINE + 'Due Date',
"default": "Posting Date"
},
{
"fieldtype": "Break",
},
{
"fieldname":"range1",
"label": __("Ageing Range 1"),
@@ -53,5 +65,12 @@ frappe.query_reports["Accounts Receivable Summary"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Receivable"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Receivable', {company: filters.company});
});
}
}

View File

@@ -5,13 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2014-12-01 16:14:40.213259",
"modified": "2017-03-06 05:52:23.751082",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable Summary",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Accounts Receivable Summary",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -27,7 +27,10 @@ class AccountsReceivableSummary(ReceivablePayableReport):
str(self.filters.range3) + _("-Above") + ":Currency/currency:100"]
if args.get("party_type") == "Customer":
columns += [_("Territory") + ":Link/Territory:80"]
columns += [
_("Territory") + ":Link/Territory:80",
_("Customer Group") + ":Link/Customer Group:120"
]
if args.get("party_type") == "Supplier":
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
@@ -58,7 +61,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
]
if args.get("party_type") == "Customer":
row += [self.get_territory(party)]
row += [self.get_territory(party), self.get_customer_group(party)]
if args.get("party_type") == "Supplier":
row += [self.get_supplier_type(party)]
@@ -107,7 +110,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
if args.get("party_type") == "Supplier":
cols += ["supplier_type", "remarks"]
if args.get("party_type") == "Customer":
cols += ["territory", "remarks"]
cols += ["territory", "customer_group", "remarks"]
return self.make_data_dict(cols, voucherwise_data)

View File

@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"idx": 2,
"is_standard": "Yes",
"modified": "2016-04-08 14:49:58.133098",
"modified": "2017-02-24 20:08:26.084484",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciation Ledger",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciation Ledger",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
}
]
}

View File

@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"idx": 2,
"is_standard": "Yes",
"modified": "2016-04-08 14:56:37.235981",
"modified": "2017-02-24 20:08:18.660476",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciations and Balances",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciations and Balances",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
}
]
}

View File

@@ -3,6 +3,13 @@
frappe.require("assets/erpnext/js/financial_statements.js", function() {
frappe.query_reports["Balance Sheet"] = erpnext.financial_statements;
frappe.query_reports["Balance Sheet"]["filters"].push({
"fieldname": "accumulated_values",
"label": __("Accumulated Values"),
"fieldtype": "Check",
"default": 1
});
});

View File

@@ -1,15 +1,29 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2014-07-14 05:24:20.385279",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2014-07-14 05:24:20.385279",
"modified": "2017-02-24 20:12:47.161127",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Balance Sheet",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Balance Sheet",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -8,11 +8,20 @@ from frappe.utils import flt, cint
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
def execute(filters=None):
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, filters.company)
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
filters.periodicity, company=filters.company)
asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False)
liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False)
equity = get_data(filters.company, "Equity", "Credit", period_list, only_current_fiscal_year=False)
asset = get_data(filters.company, "Asset", "Debit", period_list,
only_current_fiscal_year=False, filters=filters,
accumulated_values=filters.accumulated_values)
liability = get_data(filters.company, "Liability", "Credit", period_list,
only_current_fiscal_year=False, filters=filters,
accumulated_values=filters.accumulated_values)
equity = get_data(filters.company, "Equity", "Credit", period_list,
only_current_fiscal_year=False, filters=filters,
accumulated_values=filters.accumulated_values)
provisional_profit_loss, total_credit = get_provisional_profit_loss(asset, liability, equity,
period_list, filters.company)
@@ -26,7 +35,7 @@ def execute(filters=None):
if opening_balance and round(opening_balance,2) !=0:
unclosed ={
"account_name": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
"account": None,
"account": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
"warn_if_negative": True,
"currency": frappe.db.get_value("Company", filters.company, "default_currency")
}
@@ -43,9 +52,9 @@ def execute(filters=None):
if total_credit:
data.append(total_credit)
columns = get_columns(filters.periodicity, period_list, company=filters.company)
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, company=filters.company)
chart = get_chart_data(columns, asset, liability, equity)
chart = get_chart_data(filters, columns, asset, liability, equity)
return columns, data, message, chart
@@ -57,7 +66,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
currency = frappe.db.get_value("Company", company, "default_currency")
total_row = {
"account_name": "'" + _("Total (Credit)") + "'",
"account": None,
"account": "'" + _("Total (Credit)") + "'",
"warn_if_negative": True,
"currency": currency
}
@@ -85,7 +94,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if has_value:
provisional_profit_loss.update({
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"account": None,
"account": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"warn_if_negative": True,
"currency": currency
})
@@ -102,12 +111,13 @@ def check_opening_balance(asset, liability, equity):
opening_balance -= flt(liability[0].get("opening_balance", 0), float_precision)
if equity:
opening_balance -= flt(equity[0].get("opening_balance", 0), float_precision)
opening_balance = flt(opening_balance, float_precision)
if opening_balance:
return _("Previous Financial Year is not closed"),opening_balance
return None,None
def get_chart_data(columns, asset, liability, equity):
def get_chart_data(filters, columns, asset, liability, equity):
x_intervals = ['x'] + [d.get("label") for d in columns[2:]]
asset_data, liability_data, equity_data = [], [], []
@@ -128,9 +138,14 @@ def get_chart_data(columns, asset, liability, equity):
if equity_data:
columns.append(["Equity"] + equity_data)
return {
chart = {
"data": {
'x': 'x',
'columns': columns
}
}
if not filters.accumulated_values:
chart["chart_type"] = "bar"
return chart

View File

@@ -22,7 +22,8 @@ frappe.query_reports["Bank Clearance Summary"] = {
"fieldtype": "Link",
"options": "Account",
"reqd": 1,
"default": locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"],
"default": frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "",
"get_query": function() {
return {
"query": "erpnext.controllers.queries.get_account_list",

View File

@@ -1,16 +1,29 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-05-01 12:13:25",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.921522",
"modified": "2017-02-24 20:19:26.257552",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Clearance Summary",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Bank Clearance Summary",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -8,7 +8,8 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
"label": __("Bank Account"),
"fieldtype": "Link",
"options": "Account",
"default": locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"],
"default": frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "",
"reqd": 1,
"get_query": function() {
return {

View File

@@ -2,16 +2,28 @@
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-04-30 18:30:21",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.926502",
"modified": "2017-02-24 20:19:19.231541",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Statement",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Bank Reconciliation Statement",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -1,16 +1,35 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-18 12:56:36",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.971175",
"modified": "2017-02-24 20:19:06.964033",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Variance Report",
"owner": "Administrator",
"ref_doctype": "Cost Center",
"report_name": "Budget Variance Report",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
},
{
"role": "Accounts User"
},
{
"role": "Sales User"
},
{
"role": "Purchase User"
}
]
}

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