Commit Graph

176 Commits

Author SHA1 Message Date
Suraj Shetty
1923ef052c
refactor: Format and sanitise user inputs to search queries. (#22913)
* refactor: Sanitize whitelisted method inputs

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* refactor: Format and sanitize tax_account_query inputs

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* refactor: Validate and sanitize search inputs via decorator

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* style: Minor formatting fix

* refactor: Validate and sanitize search inputs using decorator

* fix: Typo

* fix: Remove unwanted import statement

* refactor: Repalce validate_and_sanitize_search_inputs() with validate_and_sanitize_search_inputs

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-08-05 19:42:25 +05:30
Deepesh Garg
addd1e842b
Merge pull request #22568 from ahmadpak/develop
fix: Item Tax Template permissions as per company
2020-07-08 10:08:53 +05:30
mohammadahmad1990
41c0c9f46b fix: Item Tax Template 2020-07-03 15:01:49 +05:00
Chinmay D. Pai
aa1210921b
fix: whitelist all query functions for search widget
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-01 21:14:32 +05:30
rohitwaghchaure
7978907cc8
feat: BOM template (#21262)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-05-21 18:10:13 +05:30
Himanshu
d94a38eb51
fix: make queries show searchfields (#21685)
* fix: make queries show searchfields

* Update erpnext/controllers/queries.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>

* Update queries.py

* Update erpnext/controllers/queries.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>

* Update erpnext/controllers/queries.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>

* fix: make fields string for sql

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-05-18 14:26:26 +05:30
Marica
299e217668
fix: Blanket Order in SO/PO child tables (#21442) 2020-04-28 13:00:04 +05:30
rohitwaghchaure
05ac7213b3
fix: allow to make BOM against template item (#21146)
* fix: allow to make BOM against template item

* Update queries.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-04-06 10:17:57 +05:30
Deepesh Garg
fbf6e56d86
fix: Expense account currency validation in Landed Cost voucher (#21073)
* fix: Expense account currency validation in Landed Cost voucher

* fix: Remove unused imports
2020-03-31 10:45:32 +05:30
Deepesh Garg
ef0d26c161 feat: Validity for Item taxes (#20135)
* feat: Validity for Item taxes

* fix: Trigger for gst hsn code

* fix: Sort taxes based on validity

* fix: Validation for item tax template and filters based on validity

* fix: Add missing semicolon

* fix: Validate tax template only if item code available

* fix: Do not validate or filter item tax template if no item taxes applied

* fix: Consider item group for validating taxes

* fix: Test cases for item tax  validation

* fix: Item tax template filtering fixes

* fix: Add missing semicolon

* fix: Remove unnecessary query
2020-01-06 15:34:15 +05:30
Sun Howwrongbum
088be37e64 feat: consider expiry_date during Batch queries (#20065) 2019-12-24 12:29:25 +05:30
Rohit Waghchaure
c42312ea12 fix: not able to select item in sales order 2019-11-19 19:06:51 +05:30
Saqib
d995609ffa Fixed asset refactor (#19369)
* refactor: Asset Movement with multiple assets using table

* refactor: Create Asset Movement from Asset List & Linking PR/PI with Asset

* feat: Auto create asset on Purchase checkbox

* refactor: LCV for asset created via PR/PI

* refactor: get asset category accounts from item master

* refactor: Purchase Receipt for asset purchasing

* refactor: Purchase Invoice for asset purchasing

* fix: post-refactor delete fixes

* refactor: moved asset validation from pr/pi on asset submission

* fix: Asset Category should be defined for auto purchasing assets

* fix: undo serial_no_update removal (for non asset item) from LCV

* fix: remove duplicate calls from item.js

* fix: args position of all occurrence of get_asset_category_account()

* fix: test cases

* fix: landed cost voucher validations

* refactor: test case for auto creation of asset

* fix: removed invalid assertions

* fix: patch errors on travis

* fix: codacy fixes

* fix: PI Items not fetching details from item

* fix: asset movement from list view having default purpose 'Receipt'

* chore: msgprint for selecting item code first while creating asset manually

* fix: alert messages

* minor: asset movement fixes

* fix: lcv was made against submitted assets

* minor: ux fixes

* refac: move specific asset validation to SINV

* chore: remove make_purchase_invoice from asset form
* make asset movement on asset submission
* add PR & PI queries based on item code

* refac: not allow last movement cancellation
* move asset movement creation on asset submission
* asset movement naming series
* add tests

* fix: code review changes

* chore: remove unecessary asset movement updation

* refac: setting latest location while making asset movements
* Added extra validations

* fix: form dashboard make lcv button

* fix: auto asset movement creation validation

* fix: allow lcv against other items after removing submitted assets

* chore: remove unwanted condition

* fix: mismatch debit credit on  purchase of asset with valuation tax

* chore: toggle required field based on movement type

* chore: fix lcv error message

* fix: travis failing

* fix: travis failing test

* fix: wrong conditions after merge

* fix: cannot cancel assets

* fix: travis failing* fix change in deletion of assets

* fix: codacy

* fix: process cancellation of assets

* refac: cancellation of pr only deletes auto created assets

* fix: incorrect query
2019-11-18 11:46:55 +05:30
marination
1e754b161c fix: Fetching catched meta and removed description fetch from Search Fields
Description is conditionally fetched and also used in WHERE clause, that is maintained.
Improved naming
2019-10-30 18:33:44 +05:30
marination
3dbef9de74 fix: Search field entries included in Item Link field query 2019-10-28 15:48:10 +05:30
Rohit Waghchaure
d8ddd1e2ec fix: not able to select the zero qty batch while making the sales return entry 2019-10-22 14:05:13 +05:30
Marica
bac4b93639 fix: Displaying manufacturer part no along with manufacturer and added Manufacturers validation in Item master (#19066)
Manufacturer Link field options in Items Table of transactions will also display manufacturer part no.
Manufacturers table in Item master will check for duplicate entries.
2019-09-16 19:44:28 +05:30
Mangesh-Khairnar
5619db28cb fix: fetch capital work in progress as expense account (#18780) 2019-08-21 14:49:24 +05:30
Karthikeyan S
747c2624cd
fix(BOM): Sever Error due in bom query to new behaviour of db.escape in v12 (#18401)
fixes bug introduced by commit 6a7969117f
2019-07-19 22:49:21 +05:30
Mangesh-Khairnar
6a7969117f fix(bom): escape name with wildcard character (#18164) 2019-07-08 10:40:40 +05:30
Deepesh Garg
78a86af7fd fix: Fiter passing fix in get batch query (#18131) 2019-07-02 10:10:55 +05:30
Anurag Mishra
4c1639305f feat: creating stock entry against purchase receipt 2019-06-14 12:31:08 +05:30
Deepesh Garg
0d7d4879a9
Merge pull request #17920 from Anurag810/stock_balance_report
fix: fetch item on the base of item group
2019-06-13 10:49:30 +05:30
Anurag Mishra
bbe2c4fb01 fix: fetch item on the base of item group 2019-06-12 19:09:51 +05:30
Rohit Waghchaure
3cf24366a9 feat: provision to set multiple manufacturer in the item master 2019-06-06 19:53:32 +05:30
rohitwaghchaure
d07a3e1de2 fix: limit offset was missing in the get_delivery_notes_to_be_billed method (#17611) 2019-05-15 07:46:28 +05:30
Frappe Bot
7e67a400cd Merge branch 'master' into develop 2019-03-08 09:39:33 +00:00
Rohit Waghchaure
2bfb063fdb fix(sales order item): not able to search item by description 2019-03-02 21:47:55 +05:30
Suraj Shetty
4b404c4f1e Avoid multiple escapes (#15509) 2018-09-27 15:39:34 +05:30
Suraj Shetty
6ea3de9521 Fix quote issues (#15497)
* Fix quotes issues

* Remove frappe.db.escape
- Handle escape in the update_linked_doctypes method
2018-09-26 18:15:53 +05:30
Suraj Shetty
bfc195dd8b Changes to support refactor in frappe pg-poc branch (#15287)
* Remove quotes from sql to make it compatible with postgres as well

* Fix queries
- Replace mysql specifc queries with standard ones

* Make repo URL chages to test pg-poc

* Add root passowrd to test site config

* Fix quotes issue

* Remove debug flag from a pricing rule query

* Remove python 3.6 version from travis.yml

* Fix improper query issue

* Fix incorrect query

* Fix a query

- This fix need to be changed when we will  start supporting postgres
since date_format is not supported by postgres

* Get price list map as dict

* Convert price_list_currency_map to dict
2018-09-21 10:20:52 +05:30
Nabin Hait
a804d6d487 Fixed merge conflict 2018-08-29 13:34:58 +05:30
rohitwaghchaure
e33047250e [Fix] Speacial character issue in searching project in sales invoice (#15220) 2018-08-27 11:43:57 +05:30
Doridel Cahanap
59e4c32e9f Allow Disabling Batch and edit Validations (#15076) 2018-08-06 14:45:18 +05:30
Ameya Shenoy
1cc7500be9
Merge branch 'master' into develop 2018-05-22 09:18:38 +00:00
Prateeksha Singh
984a7a7e61 [item-query] change order of description terms, name first 2018-05-17 17:29:36 +05:30
Rohit Waghchaure
585945e65d Allow to select Asset Received But Not Billed in expense account head 2018-05-17 00:23:27 +05:30
Saurabh
2ca83d61ea Resolve merge conflicts from enterprise_sprint branch 2018-05-14 21:15:46 +05:30
Zlash65
2e0809801d controller and other changes 2018-05-14 11:45:38 +05:30
creador30
dae8f1b353 Search for item_code (#13912)
Item query can be called from custom script to search for an additional field. In this case the item_name, item_group and item_description are still searchable, but not item_code. As the item code is a must have field in search results, I have added this to the non-changable search fields in this query.
2018-05-04 18:12:03 +05:30
Zarrar
0e3b000e81 sql syntax fix (#13529) 2018-04-05 10:34:30 +05:30
Nabin Hait
2b682c82e8 Fixed merge conflict 2018-04-04 11:40:16 +05:30
Rushabh Mehta
d5f9ebd008
[optimize] item queries (#13480) 2018-04-02 23:37:33 +05:30
Nabin Hait
e21e59614f Fixed merge conflict 2018-02-12 15:59:55 +05:30
sivankar
621740efd9 Enhancement and bug fix in batch (#12753)
* merge shelf like and manufacturing date

* setting default manufacturing date as todays date

* setting default manufacturing date as todays date

* fix

* Improvements to batch auto naming (#12496)

* refactor:
add new function - batch_uses_naming_series
use batch_uses_naming_series in autoname method

* properly update naming series on delete:
- add new functions - get_batch_prefix, get_batch_naming_series_key, get_batch_naming_series
- refactor get_name_from_naming_series
- add after_delete method

* add documentation and rename some functions

* PEP 8 compliance

* test

* added support for jinja template and added validation if expiry date is set or not if item has_expiry_date is set

* bug fix, renamed item_code to item as in batch doctype we refer 'item code' by 'item'

* added manufacturing date wise sort

* added prefix to expiry date and manufacturing date
2018-02-12 14:33:40 +05:30
Nabin Hait
ec2c9ec897 Merge branch 'master' into develop 2018-01-31 15:39:16 +05:30
Nabin Hait
7918b92d95 Invalid date value comparison, fixes for mariadb 10.2.3+ 2018-01-31 15:30:03 +05:30
Saurabh
ef31637549 Merge branch 'master' into develop 2018-01-22 15:29:15 +05:30
Rohit Waghchaure
c4c2bf0bfb [Fix] Image patch showing in the item link 2018-01-22 13:47:28 +05:30
Saurabh
35d8ce4fbd resolved merge conflicts 2018-01-12 16:58:32 +05:30
rohitwaghchaure
9fbed5617f [Fix] Wrong batch showing in the popup (#12421) 2018-01-12 16:22:33 +05:30
tundebabzy
76dddbf26e
Merge branch 'develop' into multi-barcode 2018-01-10 21:49:27 +01:00
Sachin Mane
64f48db406 Batch number selector bug fix (#12346)
* fix bug in batch number selector. fetch and display batch numbers only for the given item code.

* remove print statement

* Fix error on selecting Chattisgarh in address

Fix error on selecting Chattisgarh in address because of spelling mistake

* Revert "Fix error on selecting Chattisgarh in address"
2018-01-08 17:57:32 +05:30
Giovanni
ff7d73e418 - query fix 2017-12-10 20:46:46 +01:00
Giovanni
2144e02d3c - Added multiple barcode feature per item 2017-12-10 17:27:09 +01:00
tundebabzy
2a4fefc6ff Auto fetch batches based on quantity on POS (#11004) (#11767)
* prevent premature escape when item has serial no and batch no

* fetch actual_batch_qty for item

* add available_qty to dialog

* remove expired batches from drop-down

* Update queries.py
2017-11-29 10:53:09 +05:30
Saurabh
022ab63a0f [fix] query param fixes 2017-11-10 15:06:02 +05:30
Faris Ansari
99e31f97b8 set default params for paging (#11500) 2017-11-10 10:50:49 +05:30
Rushabh Mehta
bc4e2cd9c1 [added] hospitality domain (#11020)
* [added] hospitality domain

* [tests] wip

* [tests] for restaurant

* [fix] tests for new naming

* [docs] added restaurant docs

* [docs] added restaurant docs
2017-10-17 12:30:34 +05:30
tundebabzy
f6d738b3c5 Delivery note to billing issue (#10726) (#10766)
* allow invoices to be made from sales returns

* Update queries.py
2017-09-18 17:10:09 +05:30
Rushabh Mehta
7e506af0b9 [fix] warehouse query fixes https://github.com/frappe/erpnext/issues/10537 (#10538) 2017-08-24 15:23:33 +05:30
KanchanChauhan
4b888b95d0 [Minor] Added filter condition to Customer Query (#10057) 2017-07-25 14:03:01 +05:30
Console Admin
8623166dca Customer Query include Searchfields
frappe/erpnext#8821
2017-06-23 20:32:52 +03:00
Nabin Hait
1e2d7b3519 Filters for multiselect dialog for DN/PR in Sales/Purchase Invoice (#8882) 2017-05-17 13:52:21 +05:30
Nabin Hait
4e6ff8ccd8 Ignore permission for Bin in warehouse query (#8742) 2017-05-09 15:09:10 +05:30
Rushabh Mehta
b7e740ff45 [minor] ignore permissions for bin on warehouse_query (#8713) 2017-05-06 12:44:03 +05:30
suyashphadtare
34ab136b46 [fix] Remove un-necessary Whitespace 2017-02-10 19:14:43 +05:30
suyashphadtare
750a067688 [minor][fix] Show all warehouses with item actual qty in warehouse set query 2017-02-10 19:14:43 +05:30
suyashphadtare
049a88cc40 [minor] Show item quantity in warehouse set query 2017-02-10 19:14:43 +05:30
Rushabh Mehta
b92087cb2d [cleanup] move contact, address to frappe 💥 2017-01-13 18:54:47 +05:30
Kanchan Chauhan
7652b857c8 [Fix] Filters to get employee in Payroll 2016-11-16 15:29:01 +05:30
Nabin Hait
8693b5c93a Minor fixes 2016-09-05 11:51:45 +05:30
Maxwell Morais
3557261313 Extend search_fields for customer querie
This PR is intended to extend the customer querie adding the meta-info from the doctype using the search fields to extend the customer querie
2016-07-21 23:42:59 -03:00
Nabin Hait
972c25f78d Fixed conflict 2016-04-14 18:25:53 +05:30
Rushabh Mehta
203cc962f5 [enhancement] Item Selector 2016-04-08 17:21:00 +05:30
Neil Trini Lasrado
30b97b0b45 Fixed bug in get expense query 2016-03-31 23:10:13 +05:30
Nabin Hait
c6285069dc [fix] Item query in bom 2016-03-30 13:10:25 +05:30
Nabin Hait
3a15c92c5e Fixed Asset Depreciation first commit 2016-03-29 11:54:37 +05:30
Nabin Hait
6221117069 [fix] shipping address position in document 2016-03-16 16:23:30 +05:30
Nabin Hait
df4deba515 minor fix 2016-03-16 11:16:31 +05:30
Rushabh Mehta
3574b37ff3 [enhancement] sort links on basis of link_count (idx) 2016-03-11 14:33:04 +05:30
ShashaQin
425ab6bb1e Update queries.py 2016-03-02 13:07:58 +08:00
shreyas
2563f404d2 [Minor Change] Updated queries.py 2016-01-25 18:19:14 +05:30
shreyas
29b565fdf5 Added Disabled field to Supplier and Customer doctype
Frozen field is moved to More Information section for Customer and Supplier. Any Supplier/Customer which is disabled will not be shown while creating PO/SO
2016-01-25 18:19:13 +05:30
RicardoJohann
3fb5340188 Update queries.py 2016-01-20 14:32:59 +08:00
Anand Doshi
602e8253be [enhancement] Int, Currency, Float, Percent as not null and default to 0 2015-11-19 13:23:36 +05:30
Saurabh
a8a91cca16 [feature] Close feature for Purchase Receipt and Delivery Note 2015-11-02 12:57:08 +05:30
Anand Doshi
21e09a2bd8 [enhancement] Ability to disable an Item 2015-10-29 12:39:47 +05:30
Nabin Hait
afd14f6f0e [fix] Allowed accounts with account type='Income Account' for default income account in item 2015-10-19 15:27:58 +05:30
Anand Doshi
1fef2fad2d [minor] fixes in queries and payment tool 2015-09-14 18:27:21 +05:30
Nabin Hait
e52ee553c0 Removed debug flag 2015-09-02 11:32:14 +05:30
Rushabh Mehta
b6398be232 [minor] [fix] project query 2015-08-26 10:51:04 +05:30
Neil Trini Lasrado
ebb60f5dbc Fixed issues in Expired Batches while making Stock Entry 2015-07-08 15:24:02 +05:30
Nabin Hait
93cdee4503 [fix] Escape values in queries 2015-06-27 12:51:00 +05:30
Rushabh Mehta
38c6b52770 [rename] group_or_ledger to is_group 2015-04-23 13:14:17 +05:30
Rushabh Mehta
9e6812cfab Merge pull request #3108 from BhupeshGupta/fix_bank_reports
Add/Fix Bank Reports Filters
2015-04-17 14:17:22 +05:30
bhupeshg2
e2e973f7be Add reqd to bank clearance aummary report
Add filters if filters are in list form to get_account_list [erpnext.controllers.queries.get_account_list] query
2015-04-14 23:09:32 +05:30
Anand Doshi
a0630671da [hotfix] batch query 2015-04-09 13:34:57 +05:30
Anand Doshi
0dc79f4de0 Merge remote-tracking branch 'frappe/v4.x.x' into develop
Conflicts:
	.travis.yml
	erpnext/__version__.py
	erpnext/controllers/queries.py
	erpnext/hooks.py
	erpnext/selling/sales_common.js
	erpnext/stock/doctype/bin/bin.py
	erpnext/stock/doctype/stock_entry/stock_entry.js
	erpnext/stock/doctype/stock_entry/stock_entry.py
	erpnext/stock/stock_ledger.py
	setup.py
2015-04-06 13:21:07 +05:30
Nabin Hait
2ed71bac20 Batch related cleanup 2015-03-20 15:06:30 +05:30