Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-11-06 10:26:59 +01:00
commit 46d49932fc
3 changed files with 28 additions and 16 deletions

View File

@ -29,4 +29,10 @@ report.customize_filters = function() {
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1; this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note' + FILTER_SEP +
'From Posting Date'].df['report_default'] = sys_defaults["year_start_date"]
this.filter_fields_dict['Delivery Note' + FILTER_SEP +
'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
} }

View File

@ -14,10 +14,12 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals from __future__ import unicode_literals
from webnotes.utils import flt from webnotes.utils import flt
if not (filter_values.get('posting_date') or filter_values.get('posting_date1')):
msgprint("Please select From and To Posting Date", raise_exception=1)
columns = [ columns = [
['Delivery Note', 'Link', '120px', 'Delivery Note'], ['Delivery Note', 'Link', '120px', 'Delivery Note'],
['Posting Date', 'Date', '120px', ''], ['Posting Date', 'Date', '120px', ''],

View File

@ -5,6 +5,10 @@ SELECT
FROM FROM
`tabDelivery Note Item` dn_item, `tabDelivery Note` dn `tabDelivery Note Item` dn_item, `tabDelivery Note` dn
WHERE WHERE
dn.docstatus = 1 dn_item.parent = dn.name
AND dn_item.parent = dn.name AND dn.docstatus = 1
AND dn.name like '%(name)s%%'
AND dn_item.item_code like '%(item_code)s%%'
AND dn.posting_date >= '%(posting_date)s'
AND dn.posting_date <= '%(posting_date1)s'
ORDER BY dn.name DESC ORDER BY dn.name DESC