[fix] [minor] dont call is_pos trigger in onload of pos invoice
This commit is contained in:
		
							parent
							
								
									300ae0cdf4
								
							
						
					
					
						commit
						cadc6e1b2b
					
				| @ -181,7 +181,7 @@ wn.ui.form.TableGrid = Class.extend({ | |||||||
| 		var dialog_values = {}; | 		var dialog_values = {}; | ||||||
| 
 | 
 | ||||||
| 		$.each(this.fields, function(i, item) { | 		$.each(this.fields, function(i, item) { | ||||||
| 			dialog_values[item.fieldname] = $(row).find('td[data-fieldname="'+ item.fieldname +'"]').data('fieldvalue'); | 			dialog_values[item.fieldname] = $(row).find('td[data-fieldname="'+ item.fieldname +'"]').attr('data-fieldvalue'); | ||||||
| 		}); | 		}); | ||||||
| 
 | 
 | ||||||
| 		return dialog_values; | 		return dialog_values; | ||||||
| @ -208,7 +208,7 @@ wn.ui.form.TableGrid = Class.extend({ | |||||||
| 				var val = me.dialog.get_values()[item.fieldname]; | 				var val = me.dialog.get_values()[item.fieldname]; | ||||||
| 
 | 
 | ||||||
| 				wn.model.set_value(me.table_field.options, $td.attr('data-doc_name'),  | 				wn.model.set_value(me.table_field.options, $td.attr('data-doc_name'),  | ||||||
| 					item.fieldname, me.dialog.get_values()[item.fieldname]); | 					item.fieldname, val); | ||||||
| 				$td.attr('data-fieldvalue', val); | 				$td.attr('data-fieldvalue', val); | ||||||
| 				 | 				 | ||||||
| 				// If field type is currency the update with format currency
 | 				// If field type is currency the update with format currency
 | ||||||
| @ -279,6 +279,10 @@ wn.ui.form.TableGrid = Class.extend({ | |||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
| 
 | 
 | ||||||
|  | 		// refresh field to push to grid rows
 | ||||||
|  | 		refresh_field(this.table_field.fieldname); | ||||||
|  | 
 | ||||||
|  | 		// append row to tbody of grid
 | ||||||
| 		$(new_row).appendTo($(this.parent).find(".grid tbody")); | 		$(new_row).appendTo($(this.parent).find(".grid tbody")); | ||||||
| 	} | 	} | ||||||
| }); | }); | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user