Compare commits

...

212 Commits

Author SHA1 Message Date
Nabin Hait
d39b012981 Merge branch 'hotfix' 2017-02-27 15:41:43 +05:30
Nabin Hait
b99a38d6ae bumped to version 7.2.25 2017-02-27 16:11:43 +06:00
Nabin Hait
a2afc4e11c Update activation.py 2017-02-27 15:39:29 +05:30
Nabin Hait
e0d661f433 Merge branch 'hotfix' 2017-02-27 14:31:10 +05:30
Nabin Hait
79c5ee0a65 bumped to version 7.2.24 2017-02-27 15:01:10 +06:00
Nabin Hait
afd0d086a7 Merge pull request #7872 from rohitwaghchaure/delivery_note_serail_no_issue
[Fix] Serial nos not pulling on the delivery note, for spanish language add serial no button is not working
2017-02-27 14:11:30 +05:30
Nabin Hait
704b6a3e1f Merge pull request #7756 from mlisb0n/master
[Translation] Revised and updated all translations to meet european portuguese business/accounting terminology
2017-02-27 14:10:51 +05:30
Rohit Waghchaure
2087e574aa [Fix] Serial nos not pulling on the delivery note, for language spanish add serial no button was not working 2017-02-27 13:43:04 +05:30
Nabin Hait
ff5bd680c2 Merge pull request #7840 from rmehta/new-buttons
[enhance] connect new buttons on dashboard to custom make buttons and fix text for payment request
2017-02-24 12:57:13 +05:30
Nabin Hait
d9afd7e4aa Merge pull request #7822 from rmehta/desktop-messages
[enhance] desktop messages
2017-02-24 12:55:34 +05:30
Nabin Hait
9f0d64b679 Merge pull request #7841 from mbauskar/hotfix
[minor] fixed assessment module icon
2017-02-24 12:50:16 +05:30
mbauskar
cea7d32b31 [minor] fixed assessment module icon 2017-02-23 20:28:47 +05:30
Rushabh Mehta
509543752c [enhance] connect new buttons on dashboard to custom make buttons and fix text for payment request 2017-02-23 17:03:46 +05:30
Nabin Hait
4c27ec5618 Merge pull request #7839 from KanchanChauhan/holiday-cal-fix
[Fix] Holiday Calendar Fix
2017-02-23 16:36:35 +05:30
Kanchan Chauhan
52a5cb9ae3 [Fix] Holiday Calendar Fix 2017-02-23 16:15:12 +05:30
nick9822
089c5caea5 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-22 17:09:29 +05:30
Rushabh Mehta
05ce7ec7bb [enhance] desktop messages 2017-02-22 16:15:43 +05:30
Nabin Hait
10ec553859 Merge branch 'hotfix' 2017-02-22 15:05:27 +05:30
Nabin Hait
633698affc bumped to version 7.2.23 2017-02-22 15:35:27 +06:00
Nabin Hait
1965949c67 Merge pull request #7816 from mbauskar/hotfix
[minor] minor fixes for journal entry get_exchange_rate trigger
2017-02-22 15:03:32 +05:30
mbauskar
a8fa10d2a9 [minor] minor fixes for journal entry get_exchange_rate trigger 2017-02-22 14:51:09 +05:30
Nabin Hait
1bdb6a57f2 Merge pull request #7809 from rohitwaghchaure/financial_statement_company_issue
[Fix] Company fiscal year issue in financial statement
2017-02-22 11:41:16 +05:30
Nabin Hait
8c9bc8edbb Merge pull request #7807 from nabinhait/hotfix
Company, Currency, Conversion Rate fields are mandatory in BOM
2017-02-21 16:06:20 +05:30
Rohit Waghchaure
49523d7f80 [Fix] Company fiscal year issue in financial statement 2017-02-21 14:20:26 +05:30
Nabin Hait
6e1a2b16a5 Company, Currency, Conversion Rate fields are mandatory in BOM 2017-02-21 13:11:02 +05:30
Nabin Hait
7056ce54d7 Update salary_structure.py 2017-02-20 23:28:47 +05:30
Nabin Hait
6cbe02400a Merge pull request #7672 from KanchanChauhan/remove-joining-datep-validation
From date, to date moved from Salary Structure to Salary Structure Employee
2017-02-20 19:31:49 +05:30
Nabin Hait
6a85752ead Merge branch 'hotfix' into remove-joining-datep-validation 2017-02-20 19:31:38 +05:30
Nabin Hait
e17519accb Update salary_structure.py 2017-02-20 19:30:44 +05:30
Nabin Hait
f8cff128b3 Merge branch 'hotfix' 2017-02-20 14:52:01 +05:30
Nabin Hait
66b373033a bumped to version 7.2.22 2017-02-20 15:22:01 +06:00
Nabin Hait
64e222697c Merge pull request #7769 from nabinhait/setup_fy_dates
Set fiscal year start and end date based on country
2017-02-17 15:18:28 +05:30
Nabin Hait
e285258374 Merge pull request #7762 from mbauskar/hotfix
[minor] timestamp fixes for heatmap
2017-02-17 15:18:01 +05:30
Nabin Hait
a6eb1434b3 Merge pull request #7771 from rmehta/item-name
[minor] item name not mandatory and item price with quick edit
2017-02-17 15:17:24 +05:30
Rushabh Mehta
0c5375d0fa [minor] item name not mandatory and item price with quick edit 2017-02-17 14:57:31 +05:30
Nabin Hait
6af7dd4e1b Set fiscal year start and end date based on country 2017-02-17 14:47:33 +05:30
Nabin Hait
801fa80b39 Merge pull request #7764 from rohitwaghchaure/clean_supplied_items
[Fix] Cleanup supplied items if supply raw material is set as No
2017-02-17 12:36:05 +05:30
Nabin Hait
9e5b3dad29 Minor fix in assesment 2017-02-17 11:03:44 +05:30
Rohit Waghchaure
4b9d2f2733 [Fix] Cleanup supplied items if supply raw material is set as No 2017-02-16 18:53:23 +05:30
mbauskar
e7b87ad071 [minor] timestamp fixes for heatmap 2017-02-16 16:05:46 +05:30
Nabin Hait
1b59b624c3 Merge branch 'hotfix' 2017-02-16 15:59:58 +05:30
Nabin Hait
a7d6b68bc0 bumped to version 7.2.21 2017-02-16 16:29:58 +06:00
Nabin Hait
c70a4d2037 Merge pull request #7760 from rmehta/add-activation-1
[add] site activation level
2017-02-16 15:51:04 +05:30
Rushabh Mehta
6dd461fec4 [add] site activation level 2017-02-16 14:53:21 +05:30
Nabin Hait
d5d0b36973 Merge branch 'hotfix' 2017-02-16 14:37:49 +05:30
Nabin Hait
7677b56f7c bumped to version 7.2.20 2017-02-16 15:07:48 +06:00
Nabin Hait
b280398626 Merge pull request #7739 from rohitwaghchaure/payment_entry_currency_symbol_issue
[Fix] Payment Entry currency symbol issue
2017-02-16 14:21:24 +05:30
Nabin Hait
99c6c79834 Update payment_entry.js 2017-02-16 14:21:04 +05:30
Nabin Hait
3437a9a123 minor fix 2017-02-16 12:14:30 +05:30
mlisb0n
835a615af8 Add files via upload 2017-02-15 15:45:52 +01:00
Nabin Hait
6a2e138021 Merge pull request #7731 from nabinhait/hotfix
Check existing SO, PO and MR for enabling / disabling 'Is Stock Item' checkbox
2017-02-15 17:25:56 +05:30
Rohit Waghchaure
ff41c82c2b [Fix] Payment Entry currency symbol issue 2017-02-15 11:44:15 +05:30
Nabin Hait
99dfa3060a Check existing SO, PO and MR for disabling 'Is Stock Item' checkbox 2017-02-13 16:06:02 +05:30
Nabin Hait
89b6c47b2e Merge pull request #7712 from rohitwaghchaure/minor_fix_item_valuation_method
[Fix] Valuation method changing issue in the item
2017-02-13 15:42:22 +05:30
Nabin Hait
ec07d18222 Merge pull request #7716 from KanchanChauhan/apply-now-job
[Fix] Apply Now button redirect fixed for Job Opening
2017-02-13 15:42:02 +05:30
Kanchan Chauhan
1cd5e583ba [Fix] Apply Now button redirect fixed for Job Opening 2017-02-10 17:58:41 +05:30
Nabin Hait
bdd470a6d1 Update item.py 2017-02-10 17:12:48 +05:30
Rohit Waghchaure
2f09dc0e62 [Fix] Valuation method changing issue in the item 2017-02-10 15:29:45 +05:30
Nabin Hait
eee23eaf5c Merge pull request #7702 from mbauskar/hotfix
[minor] payment entry company trigger
2017-02-09 13:48:09 +05:30
mbauskar
d487bf77e1 [minor] payment entry company trigger 2017-02-09 12:57:25 +05:30
Nabin Hait
efd5eadfea Merge branch 'hotfix' 2017-02-08 11:32:47 +05:30
Nabin Hait
57e97c06e6 bumped to version 7.2.19 2017-02-08 12:02:47 +06:00
Nabin Hait
6f93cd5bd0 Merge pull request #7692 from rohitwaghchaure/minor_fixes_v_7_2
Minor fixes
2017-02-08 11:21:54 +05:30
Nabin Hait
533d22e88b Merge pull request #7606 from rohitwaghchaure/data_import_tool_for_cost_center
[Fix] Allow data import tool for cost center
2017-02-08 11:21:25 +05:30
Rohit Waghchaure
b3489548a9 minor fix 2017-02-08 11:20:04 +05:30
Nabin Hait
ccd2e00331 Merge pull request #7676 from nabinhait/missing_val_rate
Get standard/historical valuation rate where missing, if item is not a sample item
2017-02-08 11:05:06 +05:30
Nabin Hait
0a6aaf4257 Get standard/historical valuation rate where missing: some minor fixes 2017-02-07 12:50:22 +05:30
Nabin Hait
ea8fab52c6 Get standard/historical valuation rate where missing, if item is not a sample item 2017-02-07 01:24:32 +05:30
Nabin Hait
8200485baa Merge pull request #7675 from mbauskar/hotfix
[minor] index out of range fixes for JE
2017-02-06 19:23:33 +05:30
mbauskar
c874a82559 [minor] index out of range fixes for JE 2017-02-06 15:41:34 +05:30
Kanchan Chauhan
5f5457085e Joining date validation removed from Salary Structure 2017-02-06 14:50:39 +05:30
Nabin Hait
101aaed643 Merge pull request #7614 from KanchanChauhan/account-filters-payroll
[Fix] Account filter in Process Payroll and Salary Component
2017-02-06 11:36:48 +05:30
Nabin Hait
20d2d7548a Update salary_component.js 2017-02-06 11:36:38 +05:30
Kanchan Chauhan
3e2ecc3423 [Fix] Account filter in Process Payroll and Salary Component 2017-02-02 14:41:48 +05:30
Nabin Hait
6b9902627d Merge pull request #7638 from rohitwaghchaure/gross_profit_report_issue
[Fix] Buying rate in gross profit report
2017-02-02 13:41:32 +05:30
Rohit Waghchaure
38f808cfae [Fix] Buying rate in gross profit report 2017-02-01 13:34:06 +05:30
Rohit Waghchaure
b327429db7 [Fix] Allow data import tool for cost center 2017-01-30 11:34:29 +05:30
Rohit Waghchaure
bf667a6540 Merge branch 'hotfix' 2017-01-28 14:14:32 +05:30
Rohit Waghchaure
ce4a0b20ab bumped to version 7.2.18 2017-01-28 14:44:32 +06:00
Nabin Hait
68fd31ca0e Merge pull request #7599 from KanchanChauhan/stock-controller-urgent-fix
[URGENT][FIX]Stock Controller fix
2017-01-28 14:11:14 +05:30
Kanchan Chauhan
b77eaf7053 [URGENT][FIX]Stock Controller fix 2017-01-28 13:26:46 +05:30
Rushabh Mehta
245c2e885a Merge branch 'hotfix' 2017-01-27 16:18:26 +05:30
Rushabh Mehta
098bd34f00 bumped to version 7.2.17 2017-01-27 16:48:25 +06:00
Rushabh Mehta
063e86a1bf [fix] remove on_update in Item 2017-01-27 16:16:08 +05:30
Rushabh Mehta
73bf1bc4b0 Merge branch 'hotfix' 2017-01-27 16:03:29 +05:30
Rushabh Mehta
5f0027a2d0 bumped to version 7.2.16 2017-01-27 16:33:29 +06:00
Rushabh Mehta
fd82f4b0d4 [minor] fix for item_group.py 2017-01-27 16:00:47 +05:30
Rushabh Mehta
83cc7c9382 Merge branch 'hotfix' 2017-01-27 15:46:07 +05:30
Rushabh Mehta
149c033c8f bumped to version 7.2.15 2017-01-27 16:16:07 +06:00
Nabin Hait
355b4110c9 Merge pull request #7583 from rohitwaghchaure/valuation_rate_issue
[Fix] Get valuation rate from item master and update stock value difference
2017-01-25 19:21:04 +05:30
Nabin Hait
cb19f52985 Update stock_controller.py 2017-01-25 19:20:35 +05:30
Rohit Waghchaure
3899d74f15 [Fix] Get valuation rate from item master and update stock value difference 2017-01-25 18:47:53 +05:30
Nabin Hait
d288909310 Merge pull request #7561 from KanchanChauhan/salary-slip-fix-abbr
Patch to update Salary Detail where Salary Component Abbr is null
2017-01-25 17:23:43 +05:30
Kanchan Chauhan
c948a4fc92 Patch to update Salary Detail where Salary Component Abbr is null 2017-01-23 16:12:45 +05:30
Makarand Bauskar
01eefafad5 [minor] minor fixes in opportunity form (#7549) 2017-01-23 12:15:36 +05:30
Nabin Hait
b736aafb8b Merge branch 'hotfix' 2017-01-20 15:40:35 +05:30
Nabin Hait
a1d3d84415 bumped to version 7.2.14 2017-01-20 16:10:35 +06:00
Nabin Hait
c1cc7b68c4 Merge pull request #7522 from nabinhait/hotfix
Get valuation rate from Item while not found based on SLE
2017-01-20 15:39:24 +05:30
Nabin Hait
4c952f48f8 Some minor fixes 2017-01-20 15:15:31 +05:30
Nabin Hait
bd1a628c55 Merge pull request #7545 from rohitwaghchaure/minor_issue
[Fix] Account user not able to access the report Payment Period Based On Invoice Date
2017-01-20 14:36:48 +05:30
Rohit Waghchaure
93c001455f [Fix] Account user not able to access the report 2017-01-20 14:18:17 +05:30
Nabin Hait
548cf183ea Merge pull request #7543 from RobertSchouten/leave_allocation_fix
[fix] remove invalid parameter from leave allocation
2017-01-20 12:54:55 +05:30
Nabin Hait
153156e31a Merge pull request #7529 from rohitwaghchaure/budget_issue
[Fix] Budget not working properly
2017-01-20 12:54:29 +05:30
Nabin Hait
a0b967f2cd Get valuation rate from Item while not found based on SLE 2017-01-20 12:50:40 +05:30
Nabin Hait
f356e539bb Update set_null_value_to_fields.py 2017-01-20 12:35:22 +05:30
Rohit Waghchaure
84b827efcd [Fix] Budget not working properly 2017-01-20 12:33:50 +05:30
robert schouten
e14e042f2f [fix] remove invalid parameter from leave allocation 2017-01-20 15:02:00 +08:00
Nabin Hait
bfcacbf2ca Merge pull request #7535 from rohitwaghchaure/landed_cost_voucher_issue
[Fix] Minor issue in landed cost voucher
2017-01-20 12:12:17 +05:30
Nabin Hait
78966fe03b Merge pull request #7524 from KanchanChauhan/date-fixes
Date fixes in Production Order
2017-01-20 12:09:46 +05:30
Rohit Waghchaure
a3a977d02a [Fix] Minor issue in landed cost voucher 2017-01-19 18:38:53 +05:30
Kanchan Chauhan
45c14ed41c [Minor] Date fix in Production Order 2017-01-19 12:22:04 +05:30
Nabin Hait
e2f4b35b11 Merge pull request #7521 from rohitwaghchaure/discount_issue
[Fix] Sales return discount issue
2017-01-18 17:05:01 +05:30
Rohit Waghchaure
56cc542eb7 [Fix] sales return discount issue 2017-01-18 14:50:24 +05:30
Nabin Hait
461e9c1e09 Merge pull request #7519 from rohitwaghchaure/print_issue
[Fix] POS print issue
2017-01-18 13:24:16 +05:30
Rohit Waghchaure
2b97cee32c [Fix] POS print issue 2017-01-18 13:21:27 +05:30
Nabin Hait
b70767b08e Merge branch 'hotfix' 2017-01-17 15:52:25 +05:30
Nabin Hait
aff2b9479d bumped to version 7.2.13 2017-01-17 16:22:25 +06:00
Nabin Hait
a987b35b72 Merge pull request #7514 from KanchanChauhan/fix-payroll
[Minor] Payroll Fix
2017-01-17 14:59:59 +05:30
Kanchan Chauhan
653303180a [Minor] Payroll Fix 2017-01-17 13:54:55 +05:30
Nabin Hait
d9e216878f Merge pull request #7513 from rohitwaghchaure/paid_amount_copy_issue
[Fix] Calculate paid amount when is pos is enabled
2017-01-17 12:38:09 +05:30
Rohit Waghchaure
f58cad6b13 [Fix] Calculate paid amount when is pos is enabled 2017-01-17 12:11:57 +05:30
Nabin Hait
0681c77f6a Merge pull request #7506 from mntechnique/hotfix
[Fix] Project: Enabled autocomplete for project users
2017-01-17 11:27:37 +05:30
Dhaifallah Alwadani
9eb830ac4f fix string translation 2017-01-17 11:13:57 +05:30
Gaurav Naik
d9b4c52046 [Fix] Project: Enabled autocomplete for project users 2017-01-16 16:01:25 +05:30
Nabin Hait
2bbf784fd8 Merge branch 'hotfix' 2017-01-16 13:04:53 +05:30
Nabin Hait
71a730a36f bumped to version 7.2.12 2017-01-16 13:34:53 +06:00
Nabin Hait
47bdf8b659 Merge pull request #7490 from rohitwaghchaure/pos_discount_issue
[Fix] Discount not working in the POS
2017-01-16 11:44:50 +05:30
Rohit Waghchaure
685f89f2b7 [Fix] Discount not working in the POS 2017-01-14 20:47:56 +05:30
Nabin Hait
5d69900f66 Merge branch 'hotfix' 2017-01-13 17:30:45 +05:30
Nabin Hait
3d26ddd790 bumped to version 7.2.11 2017-01-13 18:00:45 +06:00
Nabin Hait
e7cb911634 Salary Slip Patch Fixed 2017-01-13 17:30:06 +05:30
Nabin Hait
ca7c5275c0 Merge branch 'hotfix' 2017-01-13 17:10:51 +05:30
Nabin Hait
fd7f3240b4 bumped to version 7.2.10 2017-01-13 17:40:51 +06:00
Nabin Hait
b166caa9fb Patch fixed 2017-01-13 17:09:57 +05:30
Nabin Hait
74c56aff90 Merge branch 'hotfix' 2017-01-13 14:33:56 +05:30
Nabin Hait
45cad45420 bumped to version 7.2.9 2017-01-13 15:03:56 +06:00
Nabin Hait
90350dfb86 Merge pull request #7476 from rohitwaghchaure/draft_status_issue_after_amend
[Fix] After amend the status become cancelled even if docstatus is zero
2017-01-13 13:14:43 +05:30
Nabin Hait
e43a94de4b Merge branch 'hotfix' into draft_status_issue_after_amend 2017-01-13 13:14:32 +05:30
Nabin Hait
9698f1b923 Merge pull request #7473 from KanchanChauhan/salary-slip-before-june
Patch to add Start and End Date in Salary Slips
2017-01-13 12:53:15 +05:30
Rohit Waghchaure
29458836e4 [Fix] After amend the status become cancelled even if docstatus is zero 2017-01-13 12:51:19 +05:30
Kanchan Chauhan
b6114e672f Patch to add Start and End Date in Salary Slips 2017-01-13 12:05:03 +05:30
Nabin Hait
4bd42146ba Merge pull request #7462 from rohitwaghchaure/minor_pos_issue
[Fix] POS issues
2017-01-13 11:55:52 +05:30
Nabin Hait
8f0c060578 Merge pull request #7447 from saurabh6790/tree_param_fix
[fix] provision to handle custom mandatory params while creating node
2017-01-13 11:50:18 +05:30
Nabin Hait
17cd36b7d5 Merge pull request #7451 from saurabh6790/chequeprint_date_fix
[minor][fix] show date in user format
2017-01-13 11:36:12 +05:30
Nabin Hait
90de12fea3 Merge pull request #7446 from KanchanChauhan/fieldtype-edit-desc
[Minor] Field type of Description field changed to Text Editor
2017-01-13 11:34:51 +05:30
Nabin Hait
02b6fe0fcb Merge pull request #7443 from nabinhait/hotfix
Fetch bin details after setting warehouse based on POS Profile
2017-01-13 11:32:57 +05:30
Rohit Waghchaure
8afe267813 [Fix] POS issues 2017-01-12 15:22:02 +05:30
Saurabh
056276c60e [minor][fix] show date in user format 2017-01-11 15:50:09 +05:30
Saurabh
2f02101d7d [fix] provision to handle custom mandatory params while creating node 2017-01-11 12:41:01 +05:30
Kanchan Chauhan
595cfb9f17 [Minor] Field type of Description field changed to Text Editor 2017-01-11 12:03:15 +05:30
Nabin Hait
0287d31c0f Fetch bin details after setting warehouse based on POS Profile 2017-01-11 10:31:45 +05:30
Nabin Hait
ffa5ffe607 Merge pull request #7442 from nabinhait/hotfix
Fix for Budget against Project
2017-01-11 10:30:44 +05:30
Nabin Hait
c0eab41ec5 Fix for Budget against Project 2017-01-11 10:16:19 +05:30
Nabin Hait
1612fa1253 Merge pull request #7426 from nabinhait/hotfix
Show values based on precision and filter out zero value rows
2017-01-10 17:26:27 +05:30
Nabin Hait
20aba32318 Merge pull request #7427 from KanchanChauhan/projects-manager-role
[Minor] Added Projects Manager role
2017-01-10 17:25:16 +05:30
Kanchan Chauhan
c4aceaad7f [Minor] Added Projects Manager role 2017-01-10 16:35:54 +05:30
Nabin Hait
5dd988207f Show values based on precision and filter out zero value rows 2017-01-10 16:10:40 +05:30
Nabin Hait
b8350353ea Merge branch 'hotfix' 2017-01-10 12:30:10 +05:30
Nabin Hait
4180a37773 bumped to version 7.2.8 2017-01-10 13:00:09 +06:00
Nabin Hait
a7f616564e Merge pull request #7417 from KanchanChauhan/quick-entry-for-item
[Minor] Valuation rate in Quick entry for Item
2017-01-10 12:23:36 +05:30
Kanchan Chauhan
43e07aed2c [Minor]Valuation rate in Quick entry for Item 2017-01-10 12:06:51 +05:30
Nabin Hait
9215581345 Merge pull request #7414 from KanchanChauhan/timesheet-payroll-frequency-toggle
[Fix] Payroll Frequency toggle fix
2017-01-10 11:58:36 +05:30
Kanchan Chauhan
2b41f9d548 [Fix] Payroll Frequency toggle fix 2017-01-09 18:43:52 +05:30
Nabin Hait
ec793b4846 Merge branch 'hotfix' of git://github.com/frappe/erpnext into hotfix 2017-01-09 17:24:10 +05:30
Nabin Hait
a2fae844b6 Merge pull request #7410 from RobertSchouten/timesheet_overlap_validation
[fix] timesheet overlap validation not including modified timesheet
2017-01-09 17:15:40 +05:30
Nabin Hait
21544ca978 Merge branch 'hotfix' 2017-01-09 16:57:11 +05:30
Nabin Hait
2bb9093b9a bumped to version 7.2.7 2017-01-09 17:27:10 +06:00
Nabin Hait
f0c41b5709 Merge pull request #7412 from nabinhait/hotfix
Allow fetching same items multiple times from source doc if all qty not processed
2017-01-09 16:00:08 +05:30
Nabin Hait
1839fcca11 Merge pull request #7406 from saurabh6790/terms_and_cond_fix
[fix] if terms exists then only call render_template
2017-01-09 15:49:56 +05:30
Nabin Hait
d1eb237909 Merge pull request #7400 from rohitwaghchaure/minor_issue
Get item default warehouse
2017-01-09 15:49:14 +05:30
Nabin Hait
a9b9edd9bc Merge pull request #7392 from frappe/bcornwellmott-patch-2
Fix number of digits on report
2017-01-09 15:48:04 +05:30
Nabin Hait
07b524ee50 Merge pull request #7398 from nabinhait/filter_dashboard
Reload in_standard_filter property
2017-01-09 15:43:30 +05:30
Nabin Hait
802b4359b5 Fetch same items multiple times from source doc if all qty not processed 2017-01-09 15:32:20 +05:30
robert schouten
138c2f6b29 [fix] timesheet overlap validation not including modified timesheet 2017-01-09 12:50:35 +08:00
Saurabh
f65e8de5a5 [fix] if terms exists then only call render_template 2017-01-07 08:18:10 +05:30
bcornwellmott
34e34ed1e8 Trigger Restart of build checks 2017-01-06 17:21:16 -08:00
Rohit Waghchaure
6734c4ad5c Get item default warehouse 2017-01-06 14:39:40 +05:30
Nabin Hait
91621639e8 Reload in_standard_filter property 2017-01-06 12:54:16 +05:30
bcornwellmott
a3e7c38734 Fix number of digits on report
Currently the cells can show many digits.
2017-01-05 09:44:18 -08:00
Nabin Hait
0dab40f4a1 Merge pull request #7377 from KanchanChauhan/naming-series
[Fix] Naming series issue
2017-01-04 15:44:00 +05:30
Nabin Hait
202bcc09d5 Merge pull request #7336 from rohitwaghchaure/pos_enhancement_and_issues
[Enhancement] POS features
2017-01-04 15:15:32 +05:30
Kanchan Chauhan
0e8361d1de [Fix] Naming series issue 2017-01-03 14:29:17 +05:30
Nabin Hait
1d88c65be4 Merge pull request #7374 from rohitwaghchaure/billed_report_enhancement
[Enhancement] Consolidated billed report, changed the report type from query to script
2017-01-02 17:40:51 +05:30
Nabin Hait
c657cceffc Merge branch 'hotfix' 2017-01-02 17:26:54 +05:30
Nabin Hait
1ecf613c3c bumped to version 7.2.6 2017-01-02 17:56:54 +06:00
Nabin Hait
ceea71bcfc Merge pull request #7365 from rohitwaghchaure/terms_and_condition
minor fix
2017-01-02 17:24:42 +05:30
Nabin Hait
b0e329b803 Merge pull request #7367 from saurabh6790/sms_log_fix
[fix] status check fix
2017-01-02 17:24:25 +05:30
Nabin Hait
506120936a Merge pull request #7373 from KanchanChauhan/leave-for-absent
[Fix] Attendance validation in Leave Application
2017-01-02 17:23:45 +05:30
Nabin Hait
7fc18f359c Currency symbol for budget amount based on company 2017-01-02 17:21:34 +05:30
Nabin Hait
92254d3930 Set serial nos in DN based on FIFO based on Stock Settings 2017-01-02 17:01:27 +05:30
Rohit Waghchaure
5a383e5cdd [Enhancement] Consolidated billed report, changed type from query to script 2017-01-02 16:20:43 +05:30
Nabin Hait
06966e8e1d minor fix 2017-01-02 15:10:01 +05:30
Kanchan Chauhan
5594050104 [Fix] Attendance validation in Leave Application 2017-01-02 11:14:44 +05:30
Rohit Waghchaure
cdbacf5398 minor fix 2016-12-30 17:06:01 +05:30
Saurabh
6bbed0297b [fix] status check fix 2016-12-30 17:05:40 +05:30
Nabin Hait
3cae3a5190 Merge branch 'hotfix' 2016-12-30 15:54:31 +05:30
Nabin Hait
edb99f8750 bumped to version 7.2.5 2016-12-30 16:24:31 +06:00
Nabin Hait
4de4b56c60 Merge pull request #7363 from rohitwaghchaure/terms_and_conditions_for_company
set default terms and condition if tc_name is available on the form
2016-12-30 15:46:57 +05:30
Rohit Waghchaure
585448b225 set default terms and condition if tc_name is available on the form 2016-12-30 15:41:55 +05:30
Nabin Hait
257ecf71ac Merge branch 'hotfix' 2016-12-30 14:56:20 +05:30
Nabin Hait
5105b1e789 bumped to version 7.2.4 2016-12-30 15:26:19 +06:00
Nabin Hait
dc0a277085 Merge pull request #7355 from manassolanki/hotfix
Fetching the item details from the reference doctype in QI
2016-12-30 14:10:21 +05:30
Nabin Hait
fa2feae314 Merge pull request #7359 from nabinhait/hotfix
[fix] Make Journal Entry against SO
2016-12-30 12:38:56 +05:30
Nabin Hait
494a4d9ba1 Merge pull request #7360 from KanchanChauhan/salary-register-repprt
[Fix] Monthly Salary Register Fix
2016-12-30 12:38:46 +05:30
Kanchan Chauhan
7b29dc7208 [Fix] Monthly Salary Register Fix 2016-12-30 12:36:00 +05:30
Nabin Hait
9646be1d5d [fix] Make Journal Entry against SO 2016-12-30 11:14:41 +05:30
Manas Solanki
5c82e9ef8b Fetching the item details from the reference doctype in quality inspection
Error Report [2016-12-29]
2016-12-29 18:01:25 +05:30
Rohit Waghchaure
bef185c404 restrict user to edit the rate in the POS 2016-12-28 15:16:49 +05:30
Rohit Waghchaure
249bc6167f fix company issue 2016-12-28 00:20:08 +05:30
Rohit Waghchaure
aa9b8603b9 added paid amount in print format 2016-12-27 17:43:23 +05:30
Rohit Waghchaure
fe7a5b305f create customer from POS 2016-12-27 17:31:32 +05:30
Rohit Waghchaure
8c9c9cfc5f When a new company is made, cash account should be automatically set for Mode of Payment 2016-12-27 17:31:32 +05:30
133 changed files with 6001 additions and 5021 deletions

View File

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

View File

@@ -74,6 +74,9 @@ class BankReconciliation(Document):
clearance_date_updated = False
for d in self.get('payment_entries'):
if d.clearance_date:
if not d.payment_document:
frappe.throw(_("Row #{0}: Payment document is required to complete the trasaction"))
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}")
.format(d.idx, d.clearance_date, d.cheque_date))

View File

@@ -43,9 +43,18 @@ frappe.ui.form.on('Budget', {
},
budget_against: function(frm) {
frm.trigger("set_null_value")
frm.trigger("toggle_reqd_fields")
},
set_null_value: function(frm) {
if(frm.doc.budget_against == 'Cost Center') {
frm.set_value('project', null)
} else {
frm.set_value('cost_center', null)
}
},
toggle_reqd_fields: function(frm) {
frm.toggle_reqd("cost_center", frm.doc.budget_against=="Cost Center");
frm.toggle_reqd("project", frm.doc.budget_against=="Project");

View File

@@ -22,6 +22,7 @@ class Budget(Document):
frappe.throw(_("{0} is mandatory").format(self.budget_against))
self.validate_duplicate()
self.validate_accounts()
self.set_null_value()
def validate_duplicate(self):
budget_against_field = frappe.scrub(self.budget_against)
@@ -54,25 +55,31 @@ class Budget(Document):
else:
account_list.append(d.account)
def set_null_value(self):
if self.budget_against == 'Cost Center':
self.project = None
else:
self.cost_center = None
def validate_expense_against_budget(args):
args = frappe._dict(args)
if not args.cost_center and not args.project:
return
for budget_against in [args.project, args.cost_center]:
if budget_against \
for budget_against in ['project', 'cost_center']:
if args.get(budget_against) \
and frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"}):
if args.project:
condition = "and exists(select name from `tabProject` where name=b.project)"
if args.project and budget_against == 'project':
condition = "and b.project='%s'" % frappe.db.escape(args.project)
args.budget_against_field = "Project"
elif args.cost_center:
elif args.cost_center and budget_against == 'cost_center':
cc_lft, cc_rgt = frappe.db.get_value("Cost Center", args.cost_center, ["lft", "rgt"])
condition = """and exists(select name from `tabCost Center`
where lft<=%s and rgt>=%s and name=b.cost_center)""" % (cc_lft, cc_rgt)
args.budget_against_field = "Cost Center"
args.budget_against = budget_against
args.budget_against = args.get(budget_against)
budget_records = frappe.db.sql("""
select
@@ -88,12 +95,13 @@ def validate_expense_against_budget(args):
""".format(condition=condition,
budget_against_field=frappe.scrub(args.get("budget_against_field"))),
(args.fiscal_year, args.account), as_dict=True)
validate_budget_records(args, budget_records)
if budget_records:
validate_budget_records(args, budget_records)
def validate_budget_records(args, budget_records):
for budget in budget_records:
if budget.budget_amount:
if flt(budget.budget_amount):
yearly_action = budget.action_if_annual_budget_exceeded
monthly_action = budget.action_if_accumulated_monthly_budget_exceeded

View File

@@ -9,11 +9,13 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
@@ -30,6 +32,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,
@@ -40,6 +43,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "budget_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -50,11 +54,13 @@
"label": "Budget Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"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,
@@ -72,7 +78,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-07-11 03:27:58.705376",
"modified": "2017-01-02 17:02:53.339420",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Account",

View File

@@ -35,7 +35,7 @@ def create_or_update_cheque_print_format(template_name):
</span>
<span style="top:%(date_dist_from_top_edge)s cm; left:%(date_dist_from_left_edge)scm;
position: absolute;">
{{doc.reference_date or '' }}
{{ frappe.utils.formatdate(doc.reference_date) or '' }}
</span>
<span style="top:%(acc_no_dist_from_top_edge)scm;left:%(acc_no_dist_from_left_edge)scm;
position: absolute;">

View File

@@ -278,14 +278,14 @@
"icon": "fa fa-money",
"idx": 1,
"image_view": 0,
"in_create": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-11-07 05:20:40.282432",
"modified": "2017-01-30 11:27:36.615323",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",

View File

@@ -38,7 +38,7 @@ frappe.ui.form.on("Journal Entry", {
},
posting_date: function(frm) {
if(!frm.doc.multi_currency) return;
if(!frm.doc.multi_currency || !frm.doc.posting_date) return;
$.each(frm.doc.accounts || [], function(i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);

View File

@@ -45,6 +45,9 @@ class JournalEntry(AccountsController):
self.accounts = [account for account in self.accounts
if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)]
if not self.accounts:
frappe.throw("Debit or Credit amount is not found in account table")
def on_submit(self):
self.check_credit_limit()
self.make_gl_entries()
@@ -326,10 +329,12 @@ 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") and d.reference_name and d.posting_date):
(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, self.company,
d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
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:
frappe.throw(_("Row {0}: Exchange Rate is mandatory").format(d.idx))
@@ -651,7 +656,8 @@ def get_payment_entry(ref_doc, args):
if args.get("party_account"):
# 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.posting_date, args.get("party_account"), args.get("party_account_currency"),
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)
je = frappe.new_doc("Journal Entry")
@@ -686,7 +692,8 @@ def get_payment_entry(ref_doc, args):
bank_row.update(bank_account)
# 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.posting_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
@@ -825,7 +832,7 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
# Added posting_date as one of the parameters of get_exchange_rate
@frappe.whitelist()
def get_exchange_rate(posting_date, account, account_currency=None, company=None,
def get_exchange_rate(posting_date, account=None, account_currency=None, company=None,
reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None):
from erpnext.setup.utils import get_exchange_rate
account_details = frappe.db.get_value("Account", account,

View File

@@ -79,8 +79,13 @@ frappe.ui.form.on('Payment Entry', {
frm.events.show_general_ledger(frm);
},
company: function(frm) {
frm.events.hide_unhide_fields(frm);
frm.events.set_dynamic_labels(frm);
},
hide_unhide_fields: function(frm) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
frm.toggle_display("source_exchange_rate",
(frm.doc.paid_amount && frm.doc.paid_from_account_currency != company_currency));
@@ -118,7 +123,7 @@ frappe.ui.form.on('Payment Entry', {
},
set_dynamic_labels: function(frm) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
frm.set_currency_labels(["base_paid_amount", "base_received_amount", "base_total_allocated_amount",
"difference_amount"], company_currency);
@@ -131,6 +136,10 @@ frappe.ui.form.on('Payment Entry', {
frm.set_currency_labels(["total_allocated_amount", "unallocated_amount"], party_account_currency);
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_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"],
party_account_currency, "references");
@@ -741,4 +750,4 @@ frappe.ui.form.on('Payment Entry Deduction', {
deductions_remove: function(frm) {
frm.events.set_difference_amount(frm);
}
})
})

View File

@@ -362,7 +362,7 @@
"collapsible": 0,
"columns": 0,
"fieldname": "message",
"fieldtype": "Small Text",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -400,7 +400,7 @@
"label": "Message Examples",
"length": 0,
"no_copy": 0,
"options": "<pre><h5>Message Example</h5>\n\n&lt;p&gt; Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.&lt;/p&gt;\n\n&lt;p&gt; Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.&lt;/p&gt;\n\n&lt;p&gt; We don't want you to be spending time running around in order to pay for your Bill.<br>After all, life is beautiful and the time you have in hand should be spent to enjoy it!<br>So here are our little ways to help you get more time for life! &lt;/p&gt;\n\n&lt;a href=\"{{ payment_url }}\"&gt; click here to pay &lt;/a&gt;\n\n</pre>\n",
"options": "<pre><h5>Message Example</h5>\n\n&lt;p&gt;Dear {{ doc.contact_person }},&lt;/p&gt;\n\n&lt;p&gt;Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.&lt;/p&gt;\n\n&lt;a href=\"{{ payment_url }}\"&gt; click here to pay &lt;/a&gt;\n\n</pre>\n",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -675,13 +675,13 @@
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:46:19.662816",
"modified": "2017-02-23 05:03:37.464863",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",

View File

@@ -26,7 +26,7 @@ class PaymentRequest(Document):
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if self.payment_account and ref_doc.currency != frappe.db.get_value("Account", self.payment_account, "account_currency"):
frappe.throw(_("Transaction currency must be same as Payment Gateway currency"))
def on_submit(self):
send_mail = True
self.make_communication_entry()
@@ -54,20 +54,20 @@ class PaymentRequest(Document):
def set_payment_request_url(self):
if self.payment_account:
self.payment_url = self.get_payment_url()
if self.payment_url:
self.db_set('payment_url', self.payment_url)
if self.payment_url or not self.payment_gateway_account:
self.db_set('status', 'Initiated')
def get_payment_url(self):
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.validate_transaction_currency(self.currency)
return controller.get_payment_url(**{
"amount": self.grand_total,
"title": data.company,
@@ -83,7 +83,7 @@ class PaymentRequest(Document):
def set_as_paid(self):
if frappe.session.user == "Guest":
frappe.set_user("Administrator")
payment_entry = self.create_payment_entry()
self.make_invoice()
@@ -157,7 +157,7 @@ class PaymentRequest(Document):
def set_as_cancelled(self):
self.db_set("status", "Cancelled")
def check_if_payment_entry_exists(self):
if self.status == "Paid":
payment_entry = frappe.db.sql_list("""select parent from `tabPayment Entry Reference`
@@ -179,11 +179,11 @@ class PaymentRequest(Document):
def get_payment_success_url(self):
return self.payment_success_url
def on_payment_authorized(self, status=None):
if not status:
return
shopping_cart_settings = frappe.get_doc("Shopping Cart Settings")
if status in ["Authorized", "Completed"]:
@@ -203,9 +203,9 @@ class PaymentRequest(Document):
}).get(success_url, "me")
else:
redirect_to = get_url("/orders/{0}".format(self.reference_name))
return redirect_to
@frappe.whitelist(allow_guest=True)
def make_payment_request(**args):
"""Make payment request"""
@@ -234,7 +234,7 @@ def make_payment_request(**args):
"grand_total": grand_total,
"email_to": args.recipient_id or "",
"subject": "Payment Request for %s"%args.dn,
"message": gateway_account.get("message") or get_dummy_message(args.use_dummy_message),
"message": gateway_account.get("message") or get_dummy_message(ref_doc),
"reference_doctype": args.dt,
"reference_name": args.dn
})
@@ -319,19 +319,24 @@ def make_status_as_paid(doc, method):
payment_request_name = frappe.db.get_value("Payment Request",
{"reference_doctype": ref.reference_doctype, "reference_name": ref.reference_name,
"docstatus": 1})
if payment_request_name:
doc = frappe.get_doc("Payment Request", payment_request_name)
if doc.status != "Paid":
doc.db_set('status', 'Paid')
frappe.db.commit()
def get_dummy_message(use_dummy_message=True):
return """
<p> Hope you are enjoying a service. Please consider bank details for payment </p>
<p> Bank Details <p><br>
<p> Bank Name : National Bank </p>
<p> Account Number : 123456789000872 </p>
<p> IFSC code : NB000001 </p>
<p> Account Name : Wind Power LLC </p>
"""
def get_dummy_message(doc):
return frappe.render_template("""{% if doc.contact_person -%}
<p>Dear {{ doc.contact_person }},</p>
{%- else %}<p>Hello,</p>{% endif %}
<p>{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype,
doc.name, doc.get_formatted("grand_total")) }}</p>
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
<p>{{ _("If you have any questions, please get back to us.") }}</p>
<p>{{ _("Thank you for your business!") }}</p>
""", dict(doc=doc, payment_url = '{{ payment_url }}'))

View File

@@ -22,7 +22,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Applicable for User",
"length": 0,
"no_copy": 0,
@@ -52,7 +51,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 1,
@@ -84,7 +82,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Stock",
"length": 0,
"no_copy": 0,
@@ -112,7 +109,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -142,7 +138,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
"length": 0,
"no_copy": 0,
@@ -159,34 +154,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
"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,
@@ -199,7 +166,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -226,7 +192,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
@@ -256,7 +221,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
@@ -286,7 +250,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
@@ -304,6 +267,33 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Ignore Pricing Rule",
"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,
@@ -316,7 +306,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow Delete",
"length": 0,
"no_copy": 0,
@@ -332,6 +321,33 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "allow_user_to_edit_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow user to edit Rate",
"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,
@@ -344,7 +360,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -371,7 +386,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Invoice Payment",
"length": 0,
"no_copy": 0,
@@ -400,7 +414,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -427,7 +440,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Groups",
"length": 0,
"no_copy": 0,
@@ -456,7 +468,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -483,7 +494,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Groups",
"length": 0,
"no_copy": 0,
@@ -512,7 +522,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -540,7 +549,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Format",
"length": 0,
"no_copy": 0,
@@ -569,7 +577,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
@@ -599,7 +606,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
"length": 0,
"no_copy": 0,
@@ -629,7 +635,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
"length": 0,
"no_copy": 0,
@@ -659,7 +664,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
@@ -687,7 +691,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Territory",
"length": 0,
"no_copy": 0,
@@ -717,7 +720,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
"length": 0,
"no_copy": 0,
@@ -747,7 +749,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Discount",
"length": 0,
"no_copy": 0,
@@ -777,7 +778,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Discount On",
"length": 0,
"no_copy": 0,
@@ -806,7 +806,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -834,7 +833,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Account",
"length": 0,
"no_copy": 0,
@@ -863,7 +861,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Cost Center",
"length": 0,
"no_copy": 0,
@@ -892,7 +889,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account for Change Amount",
"length": 0,
"no_copy": 0,
@@ -921,7 +917,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
"length": 0,
"no_copy": 0,
@@ -951,7 +946,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -978,7 +972,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Income Account",
"length": 0,
"no_copy": 0,
@@ -1009,7 +1002,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Account",
"length": 0,
"no_copy": 0,
@@ -1037,7 +1029,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
@@ -1067,8 +1058,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-12 17:02:22.323006",
"modified_by": "Administrator",
"modified": "2016-12-28 15:14:59.411457",
"modified_by": "rohit@erpnext.com",
"module": "Accounts",
"name": "POS Profile",
"owner": "Administrator",

View File

@@ -109,12 +109,16 @@ def apply_pricing_rule(args):
item_list = args.get("items")
args.pop("items")
set_serial_nos_based_on_fifo = frappe.db.get_single_value("Stock Settings",
"automatically_set_serial_nos_based_on_fifo")
for item in item_list:
args_copy = copy.deepcopy(args)
args_copy.update(item)
out.append(get_pricing_rule_for_item(args_copy))
out.append(get_serial_no_for_item(args_copy))
if set_serial_nos_based_on_fifo:
out.append(get_serial_no_for_item(args_copy))
return out
def get_serial_no_for_item(args):

View File

@@ -8,7 +8,7 @@ frappe.provide("erpnext.accounts");
erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
onload: function() {
this._super();
if(!this.frm.doc.__islocal) {
// show credit_to in print format
if(!this.frm.doc.supplier && this.frm.doc.credit_to) {
@@ -32,7 +32,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
if(doc.update_stock==1 && doc.docstatus==1) {
this.show_stock_ledger();
}
if(!doc.is_return && doc.docstatus==1) {
if(doc.outstanding_amount != 0) {
this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __("Make"));
@@ -336,6 +336,12 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
}
frappe.ui.form.on("Purchase Invoice", {
setup: function(frm) {
frm.custom_make_buttons = {
'Purchase Invoice': 'Debit Note',
'Payment Entry': 'Payment'
}
},
onload: function(frm) {
$.each(["warehouse", "rejected_warehouse"], function(i, field) {
frm.set_query(field, "items", function() {

View File

@@ -1315,6 +1315,34 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_sample_item",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sample Item",
"length": 0,
"no_copy": 1,
"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": 0,
@@ -1788,7 +1816,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-16 16:04:52.465169",
"modified": "2017-02-07 01:21:03.737800",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@@ -39,13 +39,21 @@ def get_pos_data():
'pricing_rules': get_pricing_rule_data(doc),
'print_template': print_template,
'pos_profile': pos_profile,
'meta': {
'invoice': frappe.get_meta('Sales Invoice'),
'items': frappe.get_meta('Sales Invoice Item'),
'taxes': frappe.get_meta('Sales Taxes and Charges')
}
'meta': get_meta()
}
def get_meta():
doctype_meta = {
'customer': frappe.get_meta('Customer'),
'invoice': frappe.get_meta('Sales Invoice')
}
for row in frappe.get_all('DocField', fields = ['fieldname', 'options'],
filters = {'parent': 'Sales Invoice', 'fieldtype': 'Table'}):
doctype_meta[row.fieldname] = frappe.get_meta(row.options)
return doctype_meta
def get_company_data(company):
return frappe.get_all('Company', fields = ["*"], filters= {'name': company})[0]
@@ -62,10 +70,10 @@ def update_pos_profile_data(doc, pos_profile, company_data):
doc.currency = pos_profile.get('currency') or company_data.default_currency
doc.conversion_rate = 1.0
if doc.currency != company_data.default_currency:
doc.conversion_rate = get_exchange_rate(doc.currency, company_data.default_currency, doc.posting_date)
doc.selling_price_list = pos_profile.get('selling_price_list') or \
frappe.db.get_value('Selling Settings', None, 'selling_price_list')
doc.naming_series = pos_profile.get('naming_series') or 'SINV-'
@@ -74,6 +82,7 @@ def update_pos_profile_data(doc, pos_profile, company_data):
doc.apply_discount_on = pos_profile.get('apply_discount_on') if pos_profile.get('apply_discount') else ''
doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group')
doc.territory = pos_profile.get('territory') or get_root('Territory')
doc.terms = frappe.db.get_value('Terms and Conditions', pos_profile.get('tc_name'), 'terms') or doc.terms or ''
def get_root(table):
root = frappe.db.sql(""" select name from `tab%(table)s` having

View File

@@ -469,6 +469,12 @@ cur_frm.set_query("asset", "items", function(doc, cdt, cdn) {
frappe.ui.form.on('Sales Invoice', {
setup: function(frm){
frm.custom_make_buttons = {
'Delivery Note': 'Delivery',
'Sales Invoice': 'Sales Return',
'Payment Request': 'Payment Request',
'Payment': 'Payment Entry'
},
frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(doc, cdt, cdn){
return{
query: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet",

View File

@@ -3188,6 +3188,7 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
"length": 0,
"no_copy": 1,
@@ -4182,7 +4183,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-11-09 14:18:24.760263",
"modified": "2017-01-18 13:21:13.226318",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -651,32 +651,34 @@ class SalesInvoice(SellingController):
def make_pos_gl_entries(self, gl_entries):
if cint(self.is_pos):
for payment_mode in self.payments:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": payment_mode.account,
"credit": payment_mode.base_amount,
"credit_in_account_currency": payment_mode.base_amount \
if self.party_account_currency==self.company_currency \
else payment_mode.amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
if payment_mode.amount:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": payment_mode.account,
"credit": payment_mode.base_amount,
"credit_in_account_currency": payment_mode.base_amount \
if self.party_account_currency==self.company_currency \
else payment_mode.amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
"account": payment_mode.account,
"against": self.customer,
"debit": payment_mode.base_amount,
"debit_in_account_currency": payment_mode.base_amount \
if payment_mode_account_currency==self.company_currency else payment_mode.amount
}, payment_mode_account_currency)
)
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
"account": payment_mode.account,
"against": self.customer,
"debit": payment_mode.base_amount,
"debit_in_account_currency": payment_mode.base_amount \
if payment_mode_account_currency==self.company_currency \
else payment_mode.amount
}, payment_mode_account_currency)
)
def make_gle_for_change_amount(self, gl_entries):
if cint(self.is_pos) and self.change_amount:

View File

@@ -1381,6 +1381,34 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_sample_item",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sample Item",
"length": 0,
"no_copy": 1,
"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": 0,
@@ -1882,7 +1910,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-16 16:04:02.438952",
"modified": "2017-02-07 01:21:47.142162",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@@ -325,6 +325,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
$.each(this.meta, function(i, data){
frappe.meta.sync(data)
locals["DocType"][data.name] = data;
})
this.print_template_data = frappe.render_template("print_template",
@@ -412,21 +413,26 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
autoFocus: true,
source: function (request, response) {
me.customer_data = me.get_customers(request.term)
me.add_customer();
response($.map(me.customer_data, function(data){
return {label: data.name, value: data.name,
customer_group: data.customer_group, territory: data.territory}
return {label: data.name, customer_name: data.name, customer_group: data.customer_group,
territory: data.territory, onclick: data.onclick}
}))
},
change: function(event, ui){
if(ui.item){
me.frm.doc.customer = ui.item.label;
me.frm.doc.customer_name = ui.item.customer_name;
me.frm.doc.customer_group = ui.item.customer_group;
me.frm.doc.territory = ui.item.territory;
}else{
me.frm.doc.customer = me.party_field.$input.val();
select: function(event, ui){
if(ui.item.onclick) {
ui.item.value = ""
ui.item.onclick(me);
}else if(ui.item) {
me.update_customer_data(ui.item)
}
me.refresh();
},
change: function(event, ui) {
if(!ui.item) {
me.frm.doc.customer = $(this).val();
}
}
}).on("focus", function(){
setTimeout(function() {
@@ -434,7 +440,43 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
me.party_field.$input.autocomplete( "search", " " );
}
}, 500);
});
}).autocomplete(this.party_field).data('ui-autocomplete')._renderItem = function(ul, d){
var html = "<span>" + __(d.label) + "</span>";
return $('<li></li>')
.data('item.autocomplete', d)
.html('<a><p>' + html + '</p></a>')
.appendTo(ul);
}
},
add_customer: function() {
var me = this;
if(this.connection_status) {
this.customer_data.push({
name: "<span class='text-primary link-option'>"
+ "<i class='fa fa-plus' style='margin-right: 5px;'></i> "
+ __("Create a new Customer")
+ "</span>",
onclick: me.new_customer
});
}
},
new_customer: function(obj) {
var me = obj;
frappe.ui.form.quick_entry('Customer', function(doc){
me.customers.push(doc)
me.party_field.$input.val(doc.name);
me.update_customer_data(doc)
})
},
update_customer_data: function(doc) {
var me = this;
this.frm.doc.customer = doc.label || doc.name;
this.frm.doc.customer_name = doc.customer_name;
this.frm.doc.customer_group = doc.customer_group;
this.frm.doc.territory = doc.territory;
},
get_customers: function(key){
@@ -593,7 +635,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.remove_item = []
$.each(this.frm.doc["items"] || [], function(i, d) {
if(d.serial_no){
if(d.serial_no && field == 'qty'){
me.validate_serial_no_qty(d, item_code, field, value)
}
@@ -764,6 +806,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
actual_qty: me.actual_qty_dict[d.item_code] || 0,
projected_qty: d.projected_qty,
rate: format_number(d.rate, me.frm.doc.currency),
enabled: me.pos_profile_data["allow_user_to_edit_rate"] ? true: false,
amount: format_currency(d.amount, me.frm.doc.currency)
})).appendTo($items);
});

View File

@@ -7,7 +7,7 @@ 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
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 erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
@@ -351,8 +351,17 @@ def validate_party_frozen_disabled(party_type, party_name):
def get_timeline_data(doctype, name):
'''returns timeline data for the past one year'''
from frappe.desk.form.load import get_communication_data
out = {}
data = get_communication_data(doctype, name,
fields = 'unix_timestamp(date(creation)), count(name)',
fields = 'date(creation), count(name)',
after = add_years(None, -1).strftime('%Y-%m-%d'),
group_by='group by date(creation)', as_dict=False)
return dict(data)
timeline_items = dict(data)
for date, count in timeline_items.iteritems():
timestamp = get_timestamp(date)
out.update({ timestamp: count })
return out

View File

@@ -1,4 +1,5 @@
{
"align_labels_left": 0,
"creation": "2016-05-05 17:16:18.564460",
"custom_format": 1,
"disabled": 0,
@@ -6,13 +7,16 @@
"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</tbody>\n</table>\n\n\n<hr>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"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>",
"idx": 0,
"modified": "2016-09-05 08:28:42.308782",
"line_breaks": 0,
"modified": "2017-01-12 14:56:12.571032",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Point of Sale",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Js",
"show_section_headings": 0,
"standard": "Yes"
}

View File

@@ -8,7 +8,7 @@ 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)
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, 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)

View File

@@ -10,7 +10,7 @@ from erpnext.accounts.utils import get_fiscal_year
def execute(filters=None):
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity)
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, filters.company)
operation_accounts = {
"section_name": "Operations",

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Delivered Items To Be Billed"] = {
"filters": [
]
}

View File

@@ -7,7 +7,7 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-08-18 14:29:50.680329",
"modified": "2017-01-02 16:13:27.369266",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Delivered Items To Be Billed",
@@ -15,5 +15,5 @@
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`customer_name` as \"Customer Name::150\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`base_amount` - `tabDelivery Note Item`.`billed_amt`*ifnull(`tabDelivery Note`.conversion_rate, 1)) as \"Pending Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere \n `tabDelivery Note`.name = `tabDelivery Note Item`.parent \n and `tabDelivery Note`.docstatus = 1 \n and `tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") \n and `tabDelivery Note Item`.amount > 0\n and `tabDelivery Note Item`.billed_amt < `tabDelivery Note Item`.amount\norder by `tabDelivery Note`.`name` desc",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
"report_type": "Query Report"
"report_type": "Script Report"
}

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data
def execute(filters=None):
columns = get_column()
args = get_args()
data = get_ordered_to_be_billed_data(args)
return columns, data
def get_column():
return [
_("Delivery Note") + ":Link/Delivery Note:120", _("Date") + ":Date:100",
_("Suplier") + ":Link/Customer:120", _("Customer Name") + "::120",
_("Project") + ":Link/Project:120", _("Item Code") + ":Link/Item:120",
_("Amount") + ":Currency:100", _("Billed Amount") + ":Currency:100", _("Pending Amount") + ":Currency:100",
_("Item Name") + "::120", _("Description") + "::120", _("Company") + ":Link/Company:120",
]
def get_args():
return {'doctype': 'Delivery Note', 'party': 'customer',
'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}

View File

@@ -8,7 +8,7 @@ from frappe import _
from frappe.utils import (flt, getdate, get_first_day, get_last_day, date_diff,
add_months, add_days, formatdate, cint)
def get_period_list(from_fiscal_year, to_fiscal_year, periodicity):
def get_period_list(from_fiscal_year, to_fiscal_year, periodicity, company):
"""Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label}
Periodicity can be (Yearly, Quarterly, Monthly)"""
@@ -50,7 +50,7 @@ def get_period_list(from_fiscal_year, to_fiscal_year, periodicity):
# if a fiscal year ends before a 12 month period
period.to_date = year_end_date
period.to_date_fiscal_year = get_date_fiscal_year(period.to_date)
period.to_date_fiscal_year = get_date_fiscal_year(period.to_date, company)
period_list.append(period)
@@ -142,15 +142,16 @@ def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accum
if entry.posting_date <= period.to_date:
if (accumulated_values or entry.posting_date >= period.from_date) and \
(entry.fiscal_year == period.to_date_fiscal_year or not ignore_accumulated_values_for_fy):
frappe.errprint([entry.fiscal_year, period.to_date_fiscal_year])
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
if entry.posting_date < period_list[0].year_start_date:
d["opening_balance"] = d.get("opening_balance", 0.0) + flt(entry.debit) - flt(entry.credit)
def get_date_fiscal_year(date):
def get_date_fiscal_year(date, company):
from erpnext.accounts.utils import get_fiscal_year
return get_fiscal_year(date)[0]
return get_fiscal_year(date, company=company)[0]
def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values):
"""accumulate children's values in parent accounts"""

View File

@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
from erpnext.stock.utils import get_incoming_rate
from frappe.utils import flt
@@ -208,21 +209,18 @@ class GrossProfitGenerator(object):
flt(my_sle[i+1].stock_value) or 0.0
return previous_stock_value - flt(sle.stock_value)
else:
return flt(row.qty) * self.get_average_buying_rate(item_code)
return flt(row.qty) * self.get_average_buying_rate(row, item_code)
return 0.0
def get_average_buying_rate(self, item_code):
def get_average_buying_rate(self, row, item_code):
if not item_code in self.average_buying_rate:
if item_code in self.non_stock_items:
self.average_buying_rate[item_code] = flt(frappe.db.sql("""select sum(base_net_amount) / sum(qty * conversion_factor)
from `tabPurchase Invoice Item`
where item_code = %s and docstatus=1""", item_code)[0][0])
else:
self.average_buying_rate[item_code] = flt(frappe.db.sql("""select avg(valuation_rate)
from `tabStock Ledger Entry`
where item_code = %s and qty_after_transaction > 0""", item_code)[0][0])
self.average_buying_rate[item_code] = get_incoming_rate(row)
return self.average_buying_rate[item_code]

View File

@@ -0,0 +1,38 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext import get_default_currency
from frappe.model.meta import get_field_precision
def get_ordered_to_be_billed_data(args):
doctype, party = args.get('doctype'), args.get('party')
child_tab = doctype + " Item"
precision = get_field_precision(frappe.get_meta(child_tab).get_field("billed_amt"),
currency=get_default_currency()) or 2
project_field = get_project_field(doctype, party)
return frappe.db.sql("""
Select
`{parent_tab}`.name, `{parent_tab}`.{date_field}, `{parent_tab}`.{party}, `{parent_tab}`.{party}_name,
{project_field}, `{child_tab}`.item_code, `{child_tab}`.base_amount,
(`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1)),
(`{child_tab}`.base_amount - (`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1))),
`{child_tab}`.item_name, `{child_tab}`.description, `{parent_tab}`.company
from
`{parent_tab}`, `{child_tab}`
where
`{parent_tab}`.name = `{child_tab}`.parent and `{parent_tab}`.docstatus = 1 and `{parent_tab}`.status != 'Closed'
and `{child_tab}`.amount > 0 and round(`{child_tab}`.billed_amt *
ifnull(`{parent_tab}`.conversion_rate, 1), {precision}) < `{child_tab}`.base_amount
order by
`{parent_tab}`.{order} {order_by}
""".format(parent_tab = 'tab' + doctype, child_tab = 'tab' + child_tab, precision= precision, party = party,
date_field = args.get('date'), project_field = project_field, order= args.get('order'), order_by = args.get('order_by')))
def get_project_field(doctype, party):
if party == "supplier": doctype = doctype + ' Item'
return "`tab%s`.project"%(doctype)

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Ordered Items To Be Billed"] = {
"filters": [
]
}

View File

@@ -7,7 +7,7 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-08-18 14:29:50.680329",
"modified": "2017-01-02 14:53:06.277319",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Ordered Items To Be Billed",
@@ -15,5 +15,5 @@
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`customer_name` as \"Customer Name:150\",\n`tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (`tabSales Order Item`.base_amount - (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and `tabSales Order Item`.amount > 0\n and `tabSales Order Item`.billed_amt < `tabSales Order Item`.amount\norder by `tabSales Order`.transaction_date asc",
"ref_doctype": "Sales Invoice",
"report_name": "Ordered Items To Be Billed",
"report_type": "Query Report"
"report_type": "Script Report"
}

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data
def execute(filters=None):
columns = get_column()
args = get_args()
data = get_ordered_to_be_billed_data(args)
return columns, data
def get_column():
return [
_("Sales Order") + ":Link/Sales Order:120", _("Date") + ":Date:100",
_("Suplier") + ":Link/Customer:120", _("Customer Name") + "::120",
_("Project") + ":Link/Project:120", _("Item Code") + ":Link/Item:120",
_("Amount") + ":Currency:100", _("Billed Amount") + ":Currency:100", _("Pending Amount") + ":Currency:100",
_("Item Name") + "::120", _("Description") + "::120", _("Company") + ":Link/Company:120",
]
def get_args():
return {'doctype': 'Sales Order', 'party': 'customer',
'date': 'transaction_date', 'order': 'transaction_date', 'order_by': 'asc'}

View File

@@ -46,7 +46,7 @@ def validate_filters(filters):
def get_columns(filters):
return [
_("Payment Document") + ":Link/DocType: 100",
_("Payment Document") + ":: 100",
_("Payment Entry") + ":Dynamic Link/"+_("Payment Document")+":140",
_("Party Type") + "::100",
_("Party") + ":Dynamic Link/Party Type:140",

View File

@@ -8,7 +8,7 @@ from frappe.utils import flt
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)
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, filters.company)
income = get_data(filters.company, "Income", "Credit", period_list, filters = filters,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True)

View File

@@ -11,9 +11,11 @@ from erpnext.accounts.report.trial_balance.trial_balance import validate_filters
value_fields = ("income", "expense", "gross_profit_loss")
def execute(filters=None):
if not filters.get('based_on'): filters["based_on"] = 'Cost Center'
based_on = filters.based_on.replace(' ', '_').lower()
validate_filters(filters)
accounts = get_accounts_data(based_on, filters.company)
accounts = get_accounts_data(based_on, filters.get("company"))
data = get_data(accounts, filters, based_on)
columns = get_columns(filters)
return columns, data
@@ -27,14 +29,14 @@ def get_accounts_data(based_on, company):
def get_data(accounts, filters, based_on):
if not accounts:
return None
return []
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
gl_entries_by_account = {}
set_gl_entries_by_account(filters.company, filters.from_date,
filters.to_date, based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry))
set_gl_entries_by_account(filters.get("company"), filters.get("from_date"),
filters.get("to_date"), based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.get("with_period_closing_entry")))
total_row = calculate_values(accounts, gl_entries_by_account, filters)
accumulate_values_into_parents(accounts, accounts_by_name)
@@ -90,7 +92,7 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
def prepare_data(accounts, filters, total_row, parent_children_map, based_on):
data = []
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
company_currency = frappe.db.get_value("Company", filters.get("company"), "default_currency")
for d in accounts:
has_value = False
@@ -99,7 +101,7 @@ def prepare_data(accounts, filters, total_row, parent_children_map, based_on):
"account": d.name,
"parent_account": d.parent_account,
"indent": d.indent,
"fiscal_year": filters.fiscal_year,
"fiscal_year": filters.get("fiscal_year"),
"currency": company_currency,
"based_on": based_on
}
@@ -122,9 +124,9 @@ def get_columns(filters):
return [
{
"fieldname": "account",
"label": _(filters.based_on),
"label": _(filters.get("based_on")),
"fieldtype": "Link",
"options": filters.based_on,
"options": filters.get("based_on"),
"width": 300
},
{

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Purchase Order Items To Be Billed"] = {
"filters": [
]
}

View File

@@ -7,7 +7,7 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-08-18 15:46:45.789536",
"modified": "2017-01-02 12:08:36.400900",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Order Items To Be Billed",
@@ -15,5 +15,5 @@
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order`.`supplier_name` as \"Supplier Name::150\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n and `tabPurchase Order Item`.amount > 0\n\tand (`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) < `tabPurchase Order Item`.base_amount\norder by `tabPurchase Order`.transaction_date asc",
"ref_doctype": "Purchase Invoice",
"report_name": "Purchase Order Items To Be Billed",
"report_type": "Query Report"
"report_type": "Script Report"
}

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data
def execute(filters=None):
columns = get_column()
args = get_args()
data = get_ordered_to_be_billed_data(args)
return columns, data
def get_column():
return [
_("Purchase Order") + ":Link/Purchase Order:120", _("Date") + ":Date:100",
_("Suplier") + ":Link/Supplier:120", _("Suplier Name") + "::120",
_("Project") + ":Link/Project:120", _("Item Code") + ":Link/Item:120",
_("Amount") + ":Currency:100", _("Billed Amount") + ":Currency:100", _("Amount to Bill") + ":Currency:100",
_("Item Name") + "::120", _("Description") + "::120", _("Company") + ":Link/Company:120",
]
def get_args():
return {'doctype': 'Purchase Order', 'party': 'supplier',
'date': 'transaction_date', 'order': 'transaction_date', 'order_by': 'asc'}

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Received Items To Be Billed"] = {
"filters": [
]
}

View File

@@ -7,7 +7,7 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-08-18 14:32:20.965816",
"modified": "2017-01-02 16:05:01.929390",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Received Items To Be Billed",
@@ -15,5 +15,5 @@
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`supplier_name` as \"Supplier Name::150\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`base_amount` - `tabPurchase Receipt Item`.`billed_amt`*ifnull(`tabPurchase Receipt`.conversion_rate, 1)) as \"Pending Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent \n and `tabPurchase Receipt`.docstatus = 1 \n and `tabPurchase Receipt`.status != \"Closed\" \n and `tabPurchase Receipt Item`.amount > 0\n and `tabPurchase Receipt Item`.billed_amt < `tabPurchase Receipt Item`.amount\norder by `tabPurchase Receipt`.`name` desc",
"ref_doctype": "Purchase Invoice",
"report_name": "Received Items To Be Billed",
"report_type": "Query Report"
"report_type": "Script Report"
}

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data
def execute(filters=None):
columns = get_column()
args = get_args()
data = get_ordered_to_be_billed_data(args)
return columns, data
def get_column():
return [
_("Purchase Receipt") + ":Link/Purchase Receipt:120", _("Date") + ":Date:100",
_("Suplier") + ":Link/Supplier:120", _("Suplier Name") + "::120",
_("Project") + ":Link/Project:120", _("Item Code") + ":Link/Item:120",
_("Amount") + ":Currency:100", _("Billed Amount") + ":Currency:100", _("Amount to Bill") + ":Currency:100",
_("Item Name") + "::120", _("Description") + "::120", _("Company") + ":Link/Company:120",
]
def get_args():
return {'doctype': 'Purchase Receipt', 'party': 'supplier',
'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}

View File

@@ -206,9 +206,12 @@ def get_count_on(account, fieldname, date):
@frappe.whitelist()
def add_ac(args=None):
from frappe.desk.treeview import make_tree_args
if not args:
args = frappe.local.form_dict
args.pop("cmd")
args = make_tree_args(**args)
ac = frappe.new_doc("Account")
@@ -233,9 +236,12 @@ def add_ac(args=None):
@frappe.whitelist()
def add_cc(args=None):
from frappe.desk.treeview import make_tree_args
if not args:
args = frappe.local.form_dict
args.pop("cmd")
args = make_tree_args(**args)
cc = frappe.new_doc("Cost Center")
cc.update(args)

View File

@@ -6,6 +6,13 @@ frappe.provide("erpnext.buying");
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
frappe.ui.form.on("Purchase Order", {
setup: function(frm) {
frm.custom_make_buttons = {
'Purchase Receipt': 'Receive',
'Purchase Invoice': 'Invoice',
'Stock Entry': 'Material to Supplier'
}
},
onload: function(frm) {
erpnext.queries.setup_queries(frm, "Warehouse", function() {
return erpnext.queries.warehouse(frm.doc);
@@ -28,10 +35,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
var item = cur_frm.doc.items[i];
if(item.delivered_by_supplier !== 1) {
allow_receipt = true;
}
else {
is_drop_ship = true
} else {
is_drop_ship = true;
}
if(is_drop_ship && allow_receipt) {

View File

@@ -2212,7 +2212,7 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"in_standard_filter": 1,
"label": "Status",
"length": 0,
"no_copy": 1,
@@ -2360,7 +2360,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"in_standard_filter": 0,
"label": "% Billed",
"length": 0,
"no_copy": 1,
@@ -3062,7 +3062,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 06:01:00.233621",
"modified": "2017-01-06 12:51:56.556331",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@@ -8,6 +8,10 @@ cur_frm.add_fetch('contact', 'email_id', 'email_id')
frappe.ui.form.on("Request for Quotation",{
setup: function(frm) {
frm.custom_make_buttons = {
'Supplier Quotation': 'Supplier Quotation'
}
frm.fields_dict["suppliers"].grid.get_field("contact").get_query = function(doc, cdt, cdn){
var d =locals[cdt][cdn];
return {

View File

@@ -4,6 +4,14 @@
// attach required files
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
frappe.ui.form.on('Suppier Quotation', {
setup: function() {
frm.custom_make_buttons = {
'Purchase Order': 'Purchase Order'
}
}
});
erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({
refresh: function() {
this._super();

View File

@@ -3,6 +3,7 @@
from __future__ import unicode_literals
from erpnext.setup.utils import get_exchange_rate
from frappe.utils import flt, cint
import frappe
def execute(filters=None):
@@ -20,6 +21,7 @@ def get_quote_list(item, qty_list):
price_data = []
suppliers = []
company_currency = frappe.db.get_default("currency")
float_precision = cint(frappe.db.get_default("float_precision")) or 2
# Get the list of suppliers
for root in frappe.db.sql("""select parent, qty, rate from `tabSupplier Quotation Item` where item_code=%s and docstatus < 2""", item, as_dict=1):
for splr in frappe.db.sql("""SELECT supplier from `tabSupplier Quotation` where name =%s and docstatus < 2""", root.parent, as_dict=1):
@@ -46,7 +48,7 @@ def get_quote_list(item, qty_list):
# Get the quantity for this row
for item_price in price_data:
if str(item_price.qty) == col.key and item_price.supplier == root:
row[col.key] = item_price.rate * exchange_rate
row[col.key] = flt(item_price.rate * exchange_rate, float_precision)
row[col.key + "QUOTE"] = item_price.parent
break
else:

View File

@@ -231,7 +231,7 @@ def get_data():
{
"module_name": "Assessment",
"color": "#8a70be",
"icon": "fa fa-file-text-alt",
"icon": "fa fa-file-text",
"label": _("Assessment"),
"link": "List/Assessment",
"_doctype": "Assessment",

View File

@@ -44,7 +44,7 @@ def get_data():
},
{
"type": "help",
"label": _("Setting up Email"),
"label": _("Setting up Email Account"),
"youtube_id": "YFYe0DrB95o"
},
{
@@ -62,11 +62,6 @@ def get_data():
"label": _("Workflow"),
"youtube_id": "yObJUg9FxFs"
},
{
"type": "help",
"label": _("Email Account"),
"youtube_id": "YFYe0DrB95o"
},
{
"type": "help",
"label": _("File Manager"),

View File

@@ -178,6 +178,9 @@ class BuyingController(StockController):
for item in self.get("items"):
item.rm_supp_cost = 0.0
if self.is_subcontracted == "No" and self.get("supplied_items"):
self.set('supplied_items', [])
def update_raw_materials_supplied(self, item, raw_material_table):
bom_items = self.get_items_from_bom(item.item_code, item.bom)
raw_materials_cost = 0
@@ -223,7 +226,8 @@ class BuyingController(StockController):
})
if not rm.rate:
from erpnext.stock.stock_ledger import get_valuation_rate
rm.rate = get_valuation_rate(bom_item.item_code, self.supplier_warehouse)
rm.rate = get_valuation_rate(bom_item.item_code, self.supplier_warehouse,
self.doctype, self.name)
else:
rm.rate = bom_item.rate

View File

@@ -198,6 +198,7 @@ def make_return_doc(doctype, source_name, target_doc=None):
if tax.charge_type == "Actual":
tax.tax_amount = -1 * tax.tax_amount
doc.discount_amount = -1 * source.discount_amount
doc.run_method("calculate_taxes_and_totals")
def update_item(source_doc, target_doc, source_parent):

View File

@@ -103,6 +103,8 @@ class StatusUpdater(Document):
def set_status(self, update=False, status=None, update_modified=True):
if self.is_new():
if self.get('amended_from'):
self.status = 'Draft'
return
if self.doctype in status_map:

View File

@@ -9,6 +9,7 @@ import frappe.defaults
from erpnext.accounts.utils import get_fiscal_year
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.stock.stock_ledger import get_valuation_rate
class StockController(AccountsController):
def validate(self):
@@ -42,7 +43,7 @@ class StockController(AccountsController):
gl_list = []
warehouse_with_no_account = []
for item_row in voucher_details:
sle_list = sle_map.get(item_row.name)
if sle_list:
@@ -51,9 +52,17 @@ class StockController(AccountsController):
# from warehouse account
self.check_expense_account(item_row)
if not sle.stock_value_difference:
self.validate_negative_stock(sle)
# If item is not a sample item
# and ( valuation rate not mentioned in an incoming entry
# or incoming entry not found while delivering the item),
# try to pick valuation rate from previous sle or Item master and update in SLE
# Otherwise, throw an exception
if not sle.stock_value_difference and self.doctype != "Stock Reconciliation" \
and not item_row.get("is_sample_item"):
sle = self.update_stock_ledger_entries(sle)
gl_list.append(self.get_gl_dict({
"account": warehouse_account[sle.warehouse]["name"],
@@ -84,13 +93,27 @@ class StockController(AccountsController):
"\n".join(warehouse_with_no_account))
return process_gl_map(gl_list)
def validate_negative_stock(self, sle):
if sle.qty_after_transaction < 0 and sle.actual_qty < 0:
frappe.throw(_("For the Item {0}, valuation rate not found for warehouse {1}. To be able to do accounting entries (for booking expenses), we need valuation rate for item {2}. Please create an incoming stock transaction, on or before {3} {4}, and then try submiting {5}")
.format(sle.item_code, sle.warehouse,
sle.item_code, sle.posting_date, sle.posting_time, self.name))
def update_stock_ledger_entries(self, sle):
sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
self.doctype, self.name)
sle.stock_value = flt(sle.qty_after_transaction) * flt(sle.valuation_rate)
sle.stock_value_difference = flt(sle.actual_qty) * flt(sle.valuation_rate)
if sle.name:
frappe.db.sql("""
update
`tabStock Ledger Entry`
set
stock_value = %(stock_value)s,
valuation_rate = %(valuation_rate)s,
stock_value_difference = %(stock_value_difference)s
where
name = %(name)s""", (sle))
return sle
def get_voucher_details(self, default_expense_account, default_cost_center, sle_map):
if self.doctype == "Stock Reconciliation":
return [frappe._dict({ "name": voucher_detail_no, "expense_account": default_expense_account,
@@ -138,10 +161,18 @@ class StockController(AccountsController):
def get_stock_ledger_details(self):
stock_ledger = {}
for sle in frappe.db.sql("""select warehouse, stock_value_difference,
voucher_detail_no, item_code, posting_date, posting_time, actual_qty, qty_after_transaction
from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""",
(self.doctype, self.name), as_dict=True):
stock_ledger_entries = frappe.db.sql("""
select
name, warehouse, stock_value_difference, valuation_rate,
voucher_detail_no, item_code, posting_date, posting_time,
actual_qty, qty_after_transaction
from
`tabStock Ledger Entry`
where
voucher_type=%s and voucher_no=%s
""", (self.doctype, self.name), as_dict=True)
for sle in stock_ledger_entries:
stock_ledger.setdefault(sle.voucher_detail_no, []).append(sle)
return stock_ledger

View File

@@ -455,10 +455,12 @@ class calculate_taxes_and_totals(object):
def calculate_paid_amount(self):
paid_amount = base_paid_amount = 0.0
for payment in self.doc.get('payments'):
payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
paid_amount += payment.amount
base_paid_amount += payment.base_amount
if self.doc.is_pos:
for payment in self.doc.get('payments'):
payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
paid_amount += payment.amount
base_paid_amount += payment.base_amount
self.doc.paid_amount = flt(paid_amount, self.doc.precision("paid_amount"))
self.doc.base_paid_amount = flt(base_paid_amount, self.doc.precision("base_paid_amount"))

View File

@@ -5,6 +5,12 @@ frappe.provide("erpnext.crm");
cur_frm.email_field = "contact_email";
frappe.ui.form.on("Opportunity", {
setup: function(frm) {
frm.custom_make_buttons = {
'Quotation': 'Quotation',
'Supplier Quotation': 'Supplier Quotation'
}
},
customer: function(frm) {
erpnext.utils.get_party_details(frm);
},
@@ -23,7 +29,7 @@ frappe.ui.form.on("Opportunity", {
refresh: function(frm) {
var doc = frm.doc;
frm.events.enquiry_from(frm);
if(doc.status!=="Lost") {
if(!doc.__islocal && doc.status!=="Lost") {
if(doc.with_items){
frm.add_custom_button(__('Supplier Quotation'),
function() {
@@ -35,7 +41,7 @@ frappe.ui.form.on("Opportunity", {
cur_frm.cscript.create_quotation, __("Make"));
frm.page.set_inner_btn_group_as_primary(__("Make"));
if(doc.status!=="Quotation") {
frm.add_custom_button(__('Lost'),
cur_frm.cscript['Declare Opportunity Lost']);
@@ -62,7 +68,7 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
if(!this.frm.doc.status)
set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
set_multiple(this.frm.doc.doctype, this.frm.doc.name,
set_multiple(this.frm.doc.doctype, this.frm.doc.name,
{ company:frappe.defaults.get_user_default("Company") });
this.setup_queries();
@@ -109,7 +115,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
erpnext.toggle_naming_series();
var frm = cur_frm;
if(frm.perm[0].write && doc.docstatus==0) {
if(!doc.__islocal && frm.perm[0].write && doc.docstatus==0) {
if(frm.doc.status==="Open") {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");

View File

@@ -8,7 +8,6 @@ def get_data():
},
'transactions': [
{
'label': _('Related'),
'items': ['Quotation', 'Supplier Quotation']
},
]

View File

@@ -28,6 +28,7 @@ after_install = "erpnext.setup.install.after_install"
boot_session = "erpnext.startup.boot.boot_session"
notification_config = "erpnext.startup.notifications.get_notification_config"
get_help_messages = "erpnext.utilities.activation.get_help_messages"
on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"

View File

@@ -3,8 +3,8 @@
frappe.views.calendar["Holiday List"] = {
field_map: {
"start": "from_date",
"end": "to_date",
"start": "holiday_date",
"end": "holiday_date",
"id": "name",
"title": "description",
"allDay": "allDay"

View File

@@ -93,7 +93,7 @@ class LeaveAllocation(Document):
if flt(leaves_taken) > flt(self.total_leaves_allocated):
if frappe.db.get_value("Leave Type", self.leave_type, "allow_negative"):
frappe.msgprint(_("Note: Total allocated leaves {0} shouldn't be less than already approved leaves {1} for the period").format(self.total_leaves_allocated, leaves_taken), LessAllocationError)
frappe.msgprint(_("Note: Total allocated leaves {0} shouldn't be less than already approved leaves {1} for the period").format(self.total_leaves_allocated, leaves_taken))
else:
frappe.throw(_("Total allocated leaves {0} cannot be less than already approved leaves {1} for the period").format(self.total_leaves_allocated, leaves_taken), LessAllocationError)

View File

@@ -217,7 +217,7 @@ class LeaveApplication(Document):
def validate_attendance(self):
attendance = frappe.db.sql("""select name from `tabAttendance` where employee = %s and (att_date between %s and %s)
and docstatus = 1""",
and status = "Present" and docstatus = 1""",
(self.employee, self.from_date, self.to_date))
if attendance:
frappe.throw(_("Attendance for employee {0} is already marked for this day").format(self.employee),

View File

@@ -7,6 +7,20 @@ frappe.ui.form.on("Process Payroll", {
frm.doc.start_date = '';
frm.doc.end_date = '';
frm.doc.payroll_frequency = '';
frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet);
},
setup: function(frm) {
frm.set_query("payment_account", function() {
var account_types = ["Bank", "Cash"];
return {
filters: {
"account_type": ["in", account_types],
"is_group": 0,
"company": frm.doc.company
}
}
})
},
refresh: function(frm) {
@@ -25,6 +39,10 @@ frappe.ui.form.on("Process Payroll", {
frm.trigger("set_start_end_dates");
},
salary_slip_based_on_timesheet: function(frm) {
frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet);
},
payment_account: function(frm) {
frm.toggle_display(['make_bank_entry'], (frm.doc.payment_account!="" && frm.doc.payment_account!="undefined"));
},
@@ -45,16 +63,6 @@ frappe.ui.form.on("Process Payroll", {
}
})
}
},
account: function(frm) {
var account_types = ["Bank", "Cash"];
return {
filters: {
"account_type": ["in", account_types],
"is_group": 0,
"company": frm.doc.company
}
}
}
})

View File

@@ -68,7 +68,7 @@ class ProcessPayroll(Document):
def check_mandatory(self):
for fieldname in ['company', 'payroll_frequency', 'start_date', 'end_date']:
for fieldname in ['company', 'start_date', 'end_date']:
if not self.get(fieldname):
frappe.throw(_("Please set {0}").format(self.meta.get_label(fieldname)))
@@ -290,10 +290,8 @@ class ProcessPayroll(Document):
@frappe.whitelist()
def get_start_end_dates(payroll_frequency, start_date=None):
'''Returns dict of start and end dates for given payroll frequency based on start_date'''
if not payroll_frequency:
frappe.throw(_("Please set Payroll Frequency first"))
if payroll_frequency == "Monthly" or payroll_frequency == "Bimonthly":
if payroll_frequency == "Monthly" or payroll_frequency == "Bimonthly" or payroll_frequency == "":
fiscal_year = get_fiscal_year(start_date)[0]
month = "%02d" % getdate(start_date).month
m = get_month_details(fiscal_year, month)

View File

@@ -2,7 +2,16 @@
// For license information, please see license.txt
frappe.ui.form.on('Salary Component', {
refresh: function(frm) {
setup: function(frm) {
frm.set_query("default_account", "accounts", function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
"root_type": "Expense",
"is_group": 0,
"company": d.company
}
}
})
}
});

View File

@@ -156,11 +156,10 @@ class SalarySlip(TransactionBase):
cond = """and payroll_frequency = '%(payroll_frequency)s'""" % {"payroll_frequency": self.payroll_frequency}
st_name = frappe.db.sql("""select parent from `tabSalary Structure Employee`
where employee=%s
where employee=%s and (from_date <= %s or from_date <= %s)
and (to_date is null or to_date >= %s or to_date >= %s)
and parent in (select name from `tabSalary Structure`
where is_active = 'Yes'
and (from_date <= %s or from_date <= %s)
and (to_date is null or to_date >= %s or to_date >= %s) %s)
where is_active = 'Yes'%s)
"""% ('%s', '%s', '%s','%s','%s', cond),(self.employee, self.start_date, joining_date, self.end_date, relieving_date))
if st_name:

View File

@@ -7,7 +7,7 @@ import frappe
import erpnext
import calendar
from erpnext.accounts.utils import get_fiscal_year
from frappe.utils import getdate, nowdate, add_days
from frappe.utils import getdate, nowdate, add_days, add_months
from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.hr.doctype.process_payroll.test_process_payroll import get_salary_component_account
from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
@@ -257,7 +257,6 @@ def make_salary_structure(sal_struct, payroll_frequency, employee):
"doctype": "Salary Structure",
"name": sal_struct,
"company": erpnext.get_default_company(),
"from_date": nowdate(),
"employees": get_employee_details(employee),
"earnings": get_earnings_component(),
"deductions": get_deductions_component(),
@@ -270,7 +269,8 @@ def make_salary_structure(sal_struct, payroll_frequency, employee):
sal_struct.append("employees", {"employee": employee,
"employee_name": employee,
"base": 32000,
"variable": 3200
"variable": 3200,
"from_date": add_months(nowdate(),-1)
})
sal_struct.save()
sal_struct = sal_struct.name
@@ -279,7 +279,8 @@ def make_salary_structure(sal_struct, payroll_frequency, employee):
def get_employee_details(employee):
return [{"employee": employee,
"base": 25000,
"variable": 5000
"variable": 5000,
"from_date": add_months(nowdate(),-1)
}
]

View File

@@ -95,37 +95,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Monthly",
"depends_on": "eval:(!doc.salary_slip_based_on_timesheet)",
"fieldname": "payroll_frequency",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payroll Frequency",
"length": 0,
"no_copy": 0,
"options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily",
"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,
@@ -184,6 +153,37 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Monthly",
"depends_on": "eval:(!doc.salary_slip_based_on_timesheet)",
"fieldname": "payroll_frequency",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payroll Frequency",
"length": 0,
"no_copy": 0,
"options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily",
"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,
@@ -214,64 +214,6 @@
"set_only_once": 0,
"unique": 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_list_view": 1,
"in_standard_filter": 0,
"label": "From Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "from_date",
"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,
"set_only_once": 0,
"unique": 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_list_view": 1,
"in_standard_filter": 0,
"label": "To Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "to_date",
"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": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -894,7 +836,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-14 02:02:10.848614",
"modified": "2017-02-06 01:32:16.815429",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure",

View File

@@ -4,8 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, flt, getdate, cint
from frappe.model.naming import make_autoname
from frappe.utils import flt, cint, getdate
from frappe import _
from frappe.model.mapper import get_mapped_doc
from frappe.model.document import Document
@@ -29,13 +28,13 @@ class SalaryStructure(Document):
def validate_amount(self):
if flt(self.net_pay) < 0 and self.salary_slip_based_on_timesheet:
frappe.throw(_("Net pay cannot be negative"))
def validate_joining_date(self):
for e in self.get('employees'):
joining_date = getdate(frappe.db.get_value("Employee", e.employee, "date_of_joining"))
if getdate(self.from_date) < joining_date:
frappe.throw(_("From Date in Salary Structure cannot be lesser than Employee Joining Date."))
if e.from_date and getdate(e.from_date) < joining_date:
frappe.throw(_("From Date {0} for Employee {1} cannot be before employee's joining Date {2}")
.format(e.from_date, e.employee, joining_date))
@frappe.whitelist()
def make_salary_slip(source_name, target_doc = None, employee = None, as_print = False, print_format = None):

View File

@@ -6,7 +6,7 @@ import frappe
import unittest
import erpnext
from frappe.utils.make_random import get_random
from frappe.utils import nowdate, add_days, add_years, getdate
from frappe.utils import nowdate, add_days, add_years, getdate, add_months
from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.hr.doctype.salary_slip.test_salary_slip \
import make_earning_salary_component, make_deduction_salary_component
@@ -94,7 +94,6 @@ def make_salary_structure(sal_struct):
"doctype": "Salary Structure",
"name": sal_struct,
"company": erpnext.get_default_company(),
"from_date": nowdate(),
"employees": get_employee_details(),
"earnings": get_earnings_component(),
"deductions": get_deductions_component(),
@@ -108,11 +107,13 @@ def get_employee_details():
return [{"employee": frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"),
"base": 25000,
"variable": 5000,
"from_date": add_months(nowdate(),-1),
"idx": 1
},
{"employee": frappe.get_value("Employee", {"employee_name":"test_employee_2@salary.com"}, "name"),
"base": 15000,
"variable": 100,
"from_date": add_months(nowdate(),-1),
"idx": 2
}
]

View File

@@ -10,11 +10,13 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "employee",
"fieldtype": "Link",
"hidden": 0,
@@ -22,6 +24,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee",
"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": 1,
"search_index": 0,
@@ -41,6 +45,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "employee_name",
"fieldtype": "Data",
"hidden": 0,
@@ -48,6 +53,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
@@ -56,6 +62,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,
@@ -66,14 +73,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base",
"fieldtype": "Currency",
"columns": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Base",
"in_standard_filter": 0,
"label": "From Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -81,6 +90,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,
@@ -91,6 +101,63 @@
"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_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
"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": "base",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Base",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "variable",
"fieldtype": "Currency",
"hidden": 0,
@@ -98,6 +165,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Variable",
"length": 0,
"no_copy": 0,
@@ -106,6 +174,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,
@@ -123,7 +192,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-08-11 12:18:14.526977",
"modified": "2017-02-06 01:32:38.183131",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure Employee",

View File

@@ -4,19 +4,18 @@
frappe.query_reports["Monthly Salary Register"] = {
"filters": [
{
"fieldname":"month",
"label": __("Month"),
"fieldtype": "Select",
"options": "\nJan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
"Dec"][frappe.datetime.str_to_obj(frappe.datetime.get_today()).getMonth()],
"fieldname":"from_date",
"label": __("From"),
"fieldtype": "Date",
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
"reqd": 1
},
{
"fieldname":"fiscal_year",
"label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
"fieldname":"to_date",
"label": __("To"),
"fieldtype": "Date",
"default": frappe.datetime.get_today(),
"reqd": 1
},
{
"fieldname":"employee",

View File

@@ -18,7 +18,7 @@ def execute(filters=None):
data = []
for ss in salary_slips:
row = [ss.name, ss.employee, ss.employee_name, ss.branch, ss.department, ss.designation,
ss.company, ss.month, ss.leave_withut_pay, ss.payment_days]
ss.company, ss.start_date, ss.end_date, ss.leave_withut_pay, ss.payment_days]
for e in earning_types:
row.append(ss_earning_map.get(ss.name, {}).get(e))
@@ -38,7 +38,7 @@ def get_columns(salary_slips):
columns = [
_("Salary Slip ID") + ":Link/Salary Slip:150",_("Employee") + ":Link/Employee:120", _("Employee Name") + "::140", _("Branch") + ":Link/Branch:120",
_("Department") + ":Link/Department:120", _("Designation") + ":Link/Designation:120",
_("Company") + ":Link/Company:120", _("Month") + "::80", _("Leave Without Pay") + ":Float:130",
_("Company") + ":Link/Company:120", _("Start Date") + "::80", _("End Date") + "::80", _("Leave Without Pay") + ":Float:130",
_("Payment Days") + ":Float:120"
]
@@ -60,23 +60,18 @@ def get_columns(salary_slips):
def get_salary_slips(filters):
conditions, filters = get_conditions(filters)
salary_slips = frappe.db.sql("""select * from `tabSalary Slip` where docstatus = 1 %s
order by employee, month""" % conditions, filters, as_dict=1)
order by employee""" % conditions, filters, as_dict=1)
if not salary_slips:
frappe.throw(_("No salary slip found for month {0} and year {1}").format(
filters.get("month"), filters.get("fiscal_year")))
frappe.throw(_("No salary slip found between {0} and {1}").format(
filters.get("from_date"), filters.get("to_date")))
return salary_slips
def get_conditions(filters):
conditions = ""
if filters.get("month"):
month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
"Dec"].index(filters["month"]) + 1
filters["month"] = month
conditions += " and month = %(month)s"
if filters.get("fiscal_year"): conditions += " and fiscal_year = %(fiscal_year)s"
if filters.get("from_date"): conditions += " and start_date >= %(from_date)s"
if filters.get("to_date"): conditions += " and end_date <= %(to_date)s"
if filters.get("company"): conditions += " and company = %(company)s"
if filters.get("employee"): conditions += " and employee = %(employee)s"

View File

@@ -10,11 +10,13 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
@@ -32,6 +34,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": 1,
@@ -42,6 +45,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
@@ -58,6 +62,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,
@@ -68,8 +73,9 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description",
"fieldtype": "Data",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -85,6 +91,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -96,6 +103,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "schedule_details",
"fieldtype": "Section Break",
"hidden": 0,
@@ -110,6 +118,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,
@@ -120,6 +129,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "start_date",
"fieldtype": "Date",
"hidden": 0,
@@ -136,6 +146,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": 1,
@@ -146,6 +157,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "end_date",
"fieldtype": "Date",
"hidden": 0,
@@ -162,6 +174,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": 1,
@@ -172,6 +185,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "periodicity",
"fieldtype": "Select",
"hidden": 0,
@@ -189,6 +203,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,
@@ -199,6 +214,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "no_of_visits",
"fieldtype": "Int",
"hidden": 0,
@@ -215,6 +231,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,
@@ -225,6 +242,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "sales_person",
"fieldtype": "Link",
"hidden": 0,
@@ -242,6 +260,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 +271,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "reference",
"fieldtype": "Section Break",
"hidden": 0,
@@ -266,6 +286,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,
@@ -276,6 +297,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "serial_no",
"fieldtype": "Small Text",
"hidden": 0,
@@ -292,6 +314,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,
@@ -302,6 +325,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "sales_order",
"fieldtype": "Link",
"hidden": 0,
@@ -320,6 +344,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -338,7 +363,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-07-11 03:28:02.260189",
"modified": "2017-01-11 12:02:38.449129",
"modified_by": "Administrator",
"module": "Maintenance",
"name": "Maintenance Schedule Item",

View File

@@ -323,7 +323,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -378,7 +378,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -976,7 +976,7 @@
"read_only": 0,
"remember_last_selected_value": 1,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -1271,8 +1271,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-21 17:06:49.349654",
"modified_by": "rohit@erpnext.com",
"modified": "2017-02-21 13:10:27.394012",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
"owner": "Administrator",

View File

@@ -321,9 +321,9 @@ class BOM(Document):
if d.bom_no:
d.rate = self.get_bom_unitcost(d.bom_no)
d.base_rate = d.rate * self.conversion_rate
d.base_rate = flt(d.rate) * flt(self.conversion_rate)
d.amount = flt(d.rate, self.precision("rate", d)) * flt(d.qty, self.precision("qty", d))
d.base_amount = d.amount * self.conversion_rate
d.base_amount = d.amount * flt(self.conversion_rate)
d.qty_consumed_per_unit = flt(d.qty, self.precision("qty", d)) / flt(self.quantity, self.precision("quantity"))
total_rm_cost += d.amount
base_total_rm_cost += d.base_amount

View File

@@ -304,9 +304,9 @@ class ProductionOrder(Document):
def get_operations_data(self, data):
return {
'from_time': data.planned_start_time,
'from_time': get_datetime(data.planned_start_time),
'hours': data.time_in_mins / 60.0,
'to_time': data.planned_end_time,
'to_time': get_datetime(data.planned_end_time),
'project': self.project,
'operation': data.operation,
'operation_id': data.name,

View File

@@ -360,3 +360,9 @@ erpnext.patches.v7_1.set_sales_person_status
erpnext.patches.v7_1.repost_stock_for_deleted_bins_for_merging_items
execute:frappe.delete_doc('Desktop Icon', {'module_name': 'Profit and Loss Statment'})
erpnext.patches.v7_2.update_website_for_variant
erpnext.patches.v7_2.update_doctype_status
erpnext.patches.v7_2.update_salary_slips
erpnext.patches.v7_2.set_null_value_to_fields
erpnext.patches.v7_2.update_abbr_in_salary_slips
erpnext.patches.v7_2.move_dates_from_salary_structure_to_employee
erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted

View File

@@ -2,5 +2,5 @@ import frappe
import erpnext.setup.install
def execute():
frappe.reload_doc("website", "doctype", "web_form_field", force=True)
frappe.reload_doc("website", "doctype", "web_form_field", force=True, reset_permissions=True)
#erpnext.setup.install.add_web_forms()

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for doctype in ["Purchase Order", "Purchase Invoice", "Purchase Receipt"]:
child_table = 'Purchase Receipt Item Supplied' if doctype != 'Purchase Order' else 'Purchase Order Item Supplied'
for data in frappe.db.sql(""" select distinct `tab{doctype}`.name from `tab{doctype}` , `tab{child_table}`
where `tab{doctype}`.name = `tab{child_table}`.parent and `tab{doctype}`.docstatus != 2
and `tab{doctype}`.is_subcontracted = 'No' """.format(doctype = doctype, child_table = child_table), as_dict=1):
frappe.db.sql(""" delete from `tab{child_table}`
where parent = %s and parenttype = %s""".format(child_table= child_table), (data.name, doctype))

View File

@@ -0,0 +1,9 @@
import frappe
def execute():
frappe.reload_doc('hr', 'doctype', 'salary_structure_employee')
salary_structures = frappe.db.sql("""select name, to_date, from_date from `tabSalary Structure`""", as_dict=True)
for salary_structure in salary_structures:
frappe.db.sql(""" update `tabSalary Structure Employee` set from_date = %s, to_date = %s
where parent = %s """, (salary_structure.from_date, salary_structure.to_date or 'null', salary_structure.name))

View File

@@ -0,0 +1,11 @@
# 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
def execute():
fields = {"Cost Center": "project", "Project": "cost_center"}
for budget_against, field in fields.items():
frappe.db.sql(""" update `tabBudget` set {field} = null
where budget_against = %s """.format(field = field), budget_against)

View File

@@ -0,0 +1,13 @@
import frappe
def execute():
frappe.reload_doctype('Salary Slip')
if not frappe.db.has_column('Salary Detail', 'abbr'):
return
salary_details = frappe.db.sql("""select abbr, salary_component, name from `tabSalary Detail`
where abbr is null or abbr = ''""", as_dict=True)
for salary_detail in salary_details:
salary_component_abbr = frappe.get_value("Salary Component", salary_detail.salary_component, "salary_component_abbr")
frappe.db.sql("""update `tabSalary Detail` set abbr = %s where name = %s""",(salary_component_abbr, salary_detail.name))

View File

@@ -0,0 +1,11 @@
# 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
def execute():
doctypes = ["Opportunity", "Quotation", "Sales Order", "Sales Invoice", "Purchase Invoice", "Purchase Order", "Delivery Note", "Purchase Receipt"]
for doctype in doctypes:
frappe.db.sql(""" update `tab{doctype}` set status = 'Draft'
where status = 'Cancelled' and docstatus = 0 """.format(doctype = doctype))

View File

@@ -0,0 +1,20 @@
import frappe
from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
def execute():
ss_columns = frappe.db.get_table_columns("Salary Slip")
if "fiscal_year" not in ss_columns or "month" not in ss_columns:
return
salary_slips = frappe.db.sql("""select fiscal_year, month, name from `tabSalary Slip`
where (month is not null and month != '')
and (fiscal_year is not null and fiscal_year != '') and
(start_date is null or start_date = '') and
(end_date is null or end_date = '') and docstatus != 2""", as_dict=1)
for salary_slip in salary_slips:
get_start_end_date = get_month_details(salary_slip.fiscal_year, salary_slip.month)
start_date = get_start_end_date['month_start_date']
end_date = get_start_end_date['month_end_date']
frappe.db.sql("""update `tabSalary Slip` set start_date = %s, end_date = %s where name = %s""",
(start_date, end_date, salary_slip.name))

View File

@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -24,7 +25,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
@@ -53,7 +53,6 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
"length": 0,
"no_copy": 1,
@@ -83,7 +82,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Project Type",
"length": 0,
"no_copy": 0,
@@ -113,7 +111,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Is Active",
"length": 0,
"no_copy": 0,
@@ -144,7 +141,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Complete Method",
"length": 0,
"no_copy": 0,
@@ -173,7 +169,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -200,7 +195,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Priority",
"length": 0,
"no_copy": 0,
@@ -230,7 +224,6 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Start Date",
"length": 0,
"no_copy": 0,
@@ -259,7 +252,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected End Date",
"length": 0,
"no_copy": 0,
@@ -288,7 +280,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Completed",
"length": 0,
"no_copy": 1,
@@ -315,7 +306,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Details",
"length": 0,
"no_copy": 0,
@@ -344,7 +334,6 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
@@ -374,7 +363,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -401,7 +389,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order",
"length": 0,
"no_copy": 0,
@@ -430,7 +417,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Users",
"length": 0,
"no_copy": 0,
@@ -459,7 +445,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Users",
"length": 0,
"no_copy": 0,
@@ -488,7 +473,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tasks",
"length": 0,
"no_copy": 0,
@@ -517,7 +501,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tasks",
"length": 0,
"no_copy": 0,
@@ -546,7 +529,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
@@ -575,7 +557,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
@@ -604,7 +585,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Start and End Dates",
"length": 0,
"no_copy": 0,
@@ -632,7 +612,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Start Date",
"length": 0,
"no_copy": 0,
@@ -660,7 +639,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Time (in Hours)",
"length": 0,
"no_copy": 0,
@@ -688,7 +666,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -715,7 +692,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual End Date",
"length": 0,
"no_copy": 0,
@@ -744,7 +720,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Costing and Billing",
"length": 0,
"no_copy": 0,
@@ -773,7 +748,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Estimated Cost",
"length": 0,
"no_copy": 0,
@@ -804,7 +778,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Costing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
@@ -833,7 +806,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Expense Claim (via Expense Claims)",
"length": 0,
"no_copy": 0,
@@ -861,7 +833,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
@@ -889,7 +860,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Cost Center",
"length": 0,
"no_copy": 0,
@@ -917,7 +887,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -945,7 +914,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Billing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
@@ -973,7 +941,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Purchase Cost (via Purchase Invoice)",
"length": 0,
"no_copy": 0,
@@ -1001,7 +968,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin",
"length": 0,
"no_copy": 0,
@@ -1030,7 +996,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gross Margin",
"length": 0,
"no_copy": 0,
@@ -1060,7 +1025,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -1087,7 +1051,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gross Margin %",
"length": 0,
"no_copy": 0,
@@ -1117,7 +1080,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 4,
"modified": "2016-11-07 05:55:56.179455",
"modified": "2017-01-10 16:33:54.691885",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project",
@@ -1164,6 +1127,27 @@
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Projects Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,

View File

@@ -8,6 +8,8 @@ from frappe.utils import flt, getdate, get_url
from frappe import _
from frappe.model.document import Document
from erpnext.controllers.queries import get_filters_cond
from frappe.desk.reportview import get_match_cond
class Project(Document):
def get_feed(self):
@@ -215,12 +217,29 @@ def get_list_context(context=None):
}
def get_users_for_project(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
conditions = []
return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
from `tabUser`
where enabled=1
and name not in ("Guest", "Administrator")
and name not in ("Guest", "Administrator")
and ({key} like %(txt)s
or full_name like %(txt)s)
{fcond} {mcond}
order by
name asc""")
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, full_name), locate(%(_txt)s, full_name), 99999),
idx desc,
name, full_name
limit %(start)s, %(page_len)s""".format(**{
'key': searchfield,
'fcond': get_filters_cond(doctype, filters, conditions),
'mcond': get_match_cond(doctype)
}), {
'txt': "%%%s%%" % txt,
'_txt': txt.replace("%", ""),
'start': start,
'page_len': page_len
})
@frappe.whitelist()
def get_cost_center_name(project):

View File

@@ -55,7 +55,8 @@ class Task(Document):
def update_depends_on(self):
depends_on_tasks = ""
for d in self.depends_on:
depends_on_tasks += d.task + ","
if d.task:
depends_on_tasks += d.task + ","
self.depends_on_tasks = depends_on_tasks
def on_update(self):

View File

@@ -7,7 +7,7 @@ import frappe
import unittest
import datetime
from frappe.utils.make_random import get_random
from frappe.utils import now_datetime, nowdate, add_days
from frappe.utils import now_datetime, nowdate, add_days, add_months
from erpnext.projects.doctype.timesheet.timesheet import OverlapError
from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_sales_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
@@ -88,7 +88,8 @@ def make_salary_structure(employee):
es = salary_structure.append('employees', {
"employee": employee,
"base": 1200
"base": 1200,
"from_date": add_months(nowdate(),-1)
})

View File

@@ -199,13 +199,22 @@ class Timesheet(Document):
(%(to_time)s > tsd.from_time and %(to_time)s < tsd.to_time) or
(%(from_time)s <= tsd.from_time and %(to_time)s >= tsd.to_time))
and tsd.name!=%(name)s
and ts.name!=%(parent)s
and ts.docstatus < 2""".format(cond),
{
"val": value,
"from_time": args.from_time,
"to_time": args.to_time,
"name": args.name or "No Name"
"name": args.name or "No Name",
"parent": args.parent or "No Name"
}, as_dict=True)
# check internal overlap
for time_log in self.time_logs:
if (fieldname != 'workstation' or args.get(fieldname) == time_log.get(fieldname)) and \
args.idx != time_log.idx and ((args.from_time > time_log.from_time and args.from_time < time_log.to_time) or
(args.to_time > time_log.from_time and args.to_time < time_log.to_time) or
(args.from_time <= time_log.from_time and args.to_time >= time_log.to_time)):
return self
return existing[0] if existing else None
@@ -359,7 +368,8 @@ def get_events(start, end, filters=None):
conditions = get_conditions(filters)
return frappe.db.sql("""select `tabTimesheet Detail`.name as name,
`tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
from_time as start_date, hours, activity_type, project, to_time as end_date
from_time as start_date, hours, activity_type, project, to_time as end_date,
CONCAT(`tabTimesheet Detail`.parent, ' (', ROUND(hours,2),' hrs)') as title
from `tabTimesheet Detail`, `tabTimesheet`
where `tabTimesheet Detail`.parent = `tabTimesheet`.name
and `tabTimesheet`.docstatus < 2

View File

@@ -588,11 +588,13 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
calculate_paid_amount: function(){
var me = this;
var paid_amount = base_paid_amount = 0.0;
$.each(this.frm.doc['payments'] || [], function(index, data){
data.base_amount = flt(data.amount * me.frm.doc.conversion_rate, precision("base_amount"));
paid_amount += data.amount;
base_paid_amount += data.base_amount;
})
if(this.frm.doc.is_pos) {
$.each(this.frm.doc['payments'] || [], function(index, data){
data.base_amount = flt(data.amount * me.frm.doc.conversion_rate, precision("base_amount"));
paid_amount += data.amount;
base_paid_amount += data.base_amount;
})
}
this.frm.doc.paid_amount = flt(paid_amount, precision("paid_amount"));
this.frm.doc.base_paid_amount = flt(base_paid_amount, precision("base_paid_amount"));

View File

@@ -349,7 +349,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
me.frm.set_value("letter_head", company_doc.default_letter_head);
}
}
if (company_doc.default_terms && me.frm.doc.doctype != "Purchase Invoice") {
if (company_doc.default_terms && me.frm.doc.doctype != "Purchase Invoice" && frappe.meta.has_field(me.frm.doc.doctype, "tc_name")) {
me.frm.set_value("tc_name", company_doc.default_terms);
}
@@ -781,7 +781,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(k=="price_list_rate") {
if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true;
}
frappe.model.set_value(d.doctype, d.name, k, v);
if(v) {
frappe.model.set_value(d.doctype, d.name, k, v);
}
}
}

View File

@@ -2,7 +2,7 @@
<div class="col-xs-5"><h6>{%= item_code || "" %}{%= item_name || "" %}</h6></div>
<div class="col-xs-4">
<div class="row pos-qty-row">
<div class="col-xs-2 text-center pos-qty-btn" data-action="decrease-qty"><i class="fa fa-minus-sign text-muted"></i></div>
<div class="col-xs-2 text-center pos-qty-btn" data-action="decrease-qty"><i class="fa fa-minus text-muted" style="font-size:12px"></i></div>
<div class="col-xs-8">
<div>
<input type="text" value="{%= qty %}" class="form-control input-sm pos-item-qty text-right">
@@ -13,11 +13,17 @@
</div>
{% } %}
</div>
<div class="col-xs-2 text-center pos-qty-btn" data-action="increase-qty"><i class="fa fa-plus-sign text-muted"></i></div>
<div class="col-xs-2 text-center pos-qty-btn" data-action="increase-qty"><i class="fa fa-plus text-muted" style="font-size:12px"></i></div>
</div>
</div>
<div class="col-xs-3 text-right">
<div class="text-muted" style="margin-top: 5px;"><input type="text" value="{%= rate %}" class="form-control input-sm pos-item-rate text-right"></div>
<div class="text-muted" style="margin-top: 5px;">
{% if(enabled) { %}
<input type="text" value="{%= rate %}" class="form-control input-sm pos-item-rate text-right">
{% } else { %}
<h6>{%= format_currency(rate) %}</h6>
{% } %}
</div>
<p><h6>{%= amount %}</h6></p>
</div>
</div>

View File

@@ -100,7 +100,12 @@ function load_erpnext_slides() {
fy = ["01-01", "12-31"];
next_year = current_year;
}
var year_start_date = current_year + "-" + fy[0];
if(year_start_date > get_today()) {
next_year = current_year
current_year -= 1;
}
slide.get_field("fy_start_date").set_input(current_year + "-" + fy[0]);
slide.get_field("fy_end_date").set_input(next_year + "-" + fy[1]);
}

View File

@@ -47,6 +47,7 @@ $.extend(erpnext, {
fields: [
{
"fieldtype": "Link",
"fieldname": "serial_no",
"options": "Serial No",
"label": __("Serial No"),
"get_query": function () {
@@ -60,6 +61,7 @@ $.extend(erpnext, {
},
{
"fieldtype": "Button",
"fieldname": "add",
"label": __("Add")
}
]
@@ -153,22 +155,37 @@ erpnext.utils.map_current_doc = function(opts) {
frappe.get_meta(items_doctype).fields.forEach(function(d) {
if(d.options===opts.source_doctype) link_fieldname = d.fieldname; });
// search in existing items if the source_name is already set
// search in existing items if the source_name is already set and full qty fetched
var already_set = false;
var item_qty_map = {};
$.each(cur_frm.doc.items, function(i, d) {
if(d[link_fieldname]==opts.source_name) {
already_set = true;
return false;
if (item_qty_map[d.item_code])
item_qty_map[d.item_code] += flt(d.qty);
else
item_qty_map[d.item_code] = flt(d.qty);
}
});
if(already_set) {
frappe.msgprint(__("You have already selected items from {0} {1}",
[opts.source_doctype, opts.source_name]));
return;
}
frappe.model.with_doc(opts.source_doctype, opts.source_name, function(r) {
var source_doc = frappe.model.get_doc(opts.source_doctype, opts.source_name);
$.each(source_doc.items || [], function(i, row) {
if(row.qty > flt(item_qty_map[row.item_code])) {
already_set = false;
return false;
}
})
})
if(already_set) {
frappe.msgprint(__("You have already selected items from {0} {1}",
[opts.source_doctype, opts.source_name]));
return;
}
}
}

View File

@@ -46,11 +46,26 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
frm.updating_party_details = false;
if(callback) callback();
frm.refresh();
erpnext.utils.add_item(frm);
}
}
});
}
erpnext.utils.add_item = function(frm) {
if(frm.is_new()) {
var prev_route = frappe.get_prev_route();
if(prev_route[1]==='Item' && !(frm.doc.items && frm.doc.items.length)) {
// add row
item = frm.add_child('items');
frm.refresh_field('items');
// set item
frappe.model.set_value(item.doctype, item.name, 'item_code', prev_route[2]);
}
}
}
erpnext.utils.get_address_display = function(frm, address_field, display_field, is_your_company_address) {
if(frm.updating_party_details) return;

View File

@@ -5,7 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import get_datetime
from frappe.utils import getdate
from frappe.model.document import Document
class AcademicTerm(Document):
@@ -18,16 +18,18 @@ class AcademicTerm(Document):
self.title = self.academic_year + " ({})".format(self.term_name) if self.term_name else ""
#Check that start of academic year is earlier than end of academic year
if self.term_start_date and self.term_end_date and self.term_start_date > self.term_end_date:
if self.term_start_date and self.term_end_date \
and getdate(self.term_start_date) > getdate(self.term_end_date):
frappe.throw(_("The Term End Date cannot be earlier than the Term Start Date. Please correct the dates and try again."))
"""Check that the start of the term is not before the start of the academic year and end of term is not after
the end of the academic year"""
# Check that the start of the term is not before the start of the academic year
# and end of term is not after the end of the academic year"""
year = frappe.get_doc("Academic Year",self.academic_year)
if self.term_start_date and get_datetime(year.year_start_date) and (self.term_start_date < get_datetime(year.year_start_date)):
if self.term_start_date and getdate(year.year_start_date) and (getdate(self.term_start_date) < getdate(year.year_start_date)):
frappe.throw(_("The Term Start Date cannot be earlier than the Year Start Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again.").format(self.academic_year))
if self.term_end_date and get_datetime(year.year_end_date) and (self.term_end_date > get_datetime(year.year_end_date)):
if self.term_end_date and getdate(year.year_end_date) and (getdate(self.term_end_date) > getdate(year.year_end_date)):
frappe.throw(_("The Term End Date cannot be later than the Year End Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again.").format(self.academic_year))

View File

@@ -34,7 +34,7 @@ class Assessment(Document):
validate_overlap_for(self, "Assessment", "student_group")
validate_overlap_for(self, "Assessment", "room")
validate_overlap_for(self, "Assessment", "supervisor", self.instructor)
validate_overlap_for(self, "Assessment", "supervisor", self.supervisor)
def get_assessment_list(doctype, txt, filters, limit_start, limit_page_length=20):

View File

@@ -4,6 +4,14 @@
{% include 'erpnext/selling/sales_common.js' %}
frappe.ui.form.on('Quotation', {
setup: function(frm) {
frm.custom_make_buttons = {
'Sales Order': 'Make Sales Order'
}
}
});
erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
onload: function(doc, dt, dn) {
var me = this;

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