mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 23:52:57 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -40,7 +40,8 @@ def repost_reserved_qty():
|
|||||||
and parenttype="Sales Order"
|
and parenttype="Sales Order"
|
||||||
and exists (select * from `tabSales Order` so
|
and exists (select * from `tabSales Order` so
|
||||||
where name = dnpi_in.parent and docstatus = 1 and status != 'Stopped')
|
where name = dnpi_in.parent and docstatus = 1 and status != 'Stopped')
|
||||||
) dnpi) tab""", (d[0], d[1]))
|
) dnpi) tab
|
||||||
|
where so_item_qty >= so_item_delivered_qty""", (d[0], d[1]))
|
||||||
|
|
||||||
if flt(d[3]) != flt(reserved_qty[0][0]):
|
if flt(d[3]) != flt(reserved_qty[0][0]):
|
||||||
print d[3], reserved_qty[0][0]
|
print d[3], reserved_qty[0][0]
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class DocType:
|
|||||||
|
|
||||||
if cstr(d.uom) == cstr(self.doc.stock_uom):
|
if cstr(d.uom) == cstr(self.doc.stock_uom):
|
||||||
if flt(d.conversion_factor) != 1:
|
if flt(d.conversion_factor) != 1:
|
||||||
msgprint("Conversion Fator of UOM : %s should be equal to 1. As UOM : %s is Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name)))
|
msgprint("Conversion Factor of UOM : %s should be equal to 1. As UOM : %s is Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name)))
|
||||||
raise Exception
|
raise Exception
|
||||||
# else set uom_exist as true
|
# else set uom_exist as true
|
||||||
uom_exist='true'
|
uom_exist='true'
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ class DocType:
|
|||||||
msgprint("Please Enter an Item.")
|
msgprint("Please Enter an Item.")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
if not cstr(self.doc.current_stock_uom):
|
|
||||||
msgprint("There is no Current Stock UOM for Item Code" + cstr(self.doc.item_code))
|
|
||||||
raise Exception
|
|
||||||
|
|
||||||
if not cstr(self.doc.new_stock_uom):
|
if not cstr(self.doc.new_stock_uom):
|
||||||
msgprint("Please Enter New Stock UOM.")
|
msgprint("Please Enter New Stock UOM.")
|
||||||
raise Exception
|
raise Exception
|
||||||
@@ -119,3 +115,5 @@ class DocType:
|
|||||||
|
|
||||||
# update bin
|
# update bin
|
||||||
self.update_bin()
|
self.update_bin()
|
||||||
|
|
||||||
|
get_obj("Item", self.doc.item_code).on_update()
|
||||||
@@ -478,7 +478,7 @@ if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],
|
|||||||
new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
|
new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
|
||||||
if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
|
if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
|
||||||
return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
|
return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
|
||||||
last_date=29;return y+'-'+int_to_str(m,2)+'-'+last_date;},get_user_fmt:function(){var t=wn.control_panel.date_format;if(!t)t='dd-mm-yyyy';return t;},str_to_user:function(val,no_time_str){var user_fmt=dateutil.get_user_fmt();var time_str='';if(val==null||val=='')return null;if(val.search(':')!=-1){var tmp=val.split(' ');if(tmp[1])
|
last_date=29;return y+'-'+int_to_str(m,2)+'-'+last_date;},get_user_fmt:function(){var t=sys_defaults.date_format;if(!t)t='dd-mm-yyyy';return t;},str_to_user:function(val,no_time_str){var user_fmt=dateutil.get_user_fmt();var time_str='';if(val==null||val=='')return null;if(val.search(':')!=-1){var tmp=val.split(' ');if(tmp[1])
|
||||||
time_str=' '+tmp[1];var d=tmp[0];}else{var d=val;}
|
time_str=' '+tmp[1];var d=tmp[0];}else{var d=val;}
|
||||||
if(no_time_str)time_str='';d=d.split('-');if(d.length==3){if(user_fmt=='dd-mm-yyyy')
|
if(no_time_str)time_str='';d=d.split('-');if(d.length==3){if(user_fmt=='dd-mm-yyyy')
|
||||||
val=d[2]+'-'+d[1]+'-'+d[0]+time_str;else if(user_fmt=='dd/mm/yyyy')
|
val=d[2]+'-'+d[1]+'-'+d[0]+time_str;else if(user_fmt=='dd/mm/yyyy')
|
||||||
@@ -719,7 +719,7 @@ ReadOnlyField.prototype=new Field();function HTMLField(){}
|
|||||||
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
|
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
|
||||||
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
|
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
|
||||||
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
|
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
|
||||||
var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=wn.control_panel.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
|
var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=sys_defaults.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
|
||||||
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
|
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
|
||||||
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
|
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
|
||||||
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
|
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
|
||||||
@@ -1546,7 +1546,7 @@ ReadOnlyField.prototype=new Field();function HTMLField(){}
|
|||||||
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
|
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
|
||||||
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
|
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
|
||||||
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
|
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
|
||||||
var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=wn.control_panel.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
|
var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=sys_defaults.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
|
||||||
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
|
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
|
||||||
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
|
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
|
||||||
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
|
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],
|
|||||||
new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
|
new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
|
||||||
if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
|
if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
|
||||||
return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
|
return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
|
||||||
last_date=29;return y+'-'+int_to_str(m,2)+'-'+last_date;},get_user_fmt:function(){var t=wn.control_panel.date_format;if(!t)t='dd-mm-yyyy';return t;},str_to_user:function(val,no_time_str){var user_fmt=dateutil.get_user_fmt();var time_str='';if(val==null||val=='')return null;if(val.search(':')!=-1){var tmp=val.split(' ');if(tmp[1])
|
last_date=29;return y+'-'+int_to_str(m,2)+'-'+last_date;},get_user_fmt:function(){var t=sys_defaults.date_format;if(!t)t='dd-mm-yyyy';return t;},str_to_user:function(val,no_time_str){var user_fmt=dateutil.get_user_fmt();var time_str='';if(val==null||val=='')return null;if(val.search(':')!=-1){var tmp=val.split(' ');if(tmp[1])
|
||||||
time_str=' '+tmp[1];var d=tmp[0];}else{var d=val;}
|
time_str=' '+tmp[1];var d=tmp[0];}else{var d=val;}
|
||||||
if(no_time_str)time_str='';d=d.split('-');if(d.length==3){if(user_fmt=='dd-mm-yyyy')
|
if(no_time_str)time_str='';d=d.split('-');if(d.length==3){if(user_fmt=='dd-mm-yyyy')
|
||||||
val=d[2]+'-'+d[1]+'-'+d[0]+time_str;else if(user_fmt=='dd/mm/yyyy')
|
val=d[2]+'-'+d[1]+'-'+d[0]+time_str;else if(user_fmt=='dd/mm/yyyy')
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ ReadOnlyField.prototype=new Field();function HTMLField(){}
|
|||||||
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
|
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
|
||||||
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
|
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
|
||||||
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
|
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
|
||||||
var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=wn.control_panel.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
|
var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=sys_defaults.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
|
||||||
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
|
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
|
||||||
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
|
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
|
||||||
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
|
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
|
||||||
|
|||||||
Reference in New Issue
Block a user