| 
					
				 | 
			
			
				@@ -89,7 +89,6 @@ var Ration = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return updateData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ration.prototype.getCounterData = function (count) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var updateData = {'projectID': this.project.ID()}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (count) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -99,7 +98,6 @@ var Ration = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return updateData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ration.prototype.insertRation = function (billsID, preRation) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var br = this.getBillsSortRation(billsID); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.project.pushNow('insertRation', [this.getSourceType(), this.project.projCounter()], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,7 +118,6 @@ var Ration = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return newRation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ration.prototype.insertStdRation = function (billsID, preRation, std) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var br = this.getBillsSortRation(billsID), updateData = this.getInsertRationData(billsID, preRation), newRation = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             updateData.forEach(function (data) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -146,6 +143,17 @@ var Ration = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return newRation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ration.prototype.getDeleteData = function (rationData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var updateData = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            updateData.push({'updateType': 'ut_delete', 'updateData': {'ID': rationData.ID, 'projectID': this.project.ID()}}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return updateData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ration.prototype.delete = function (ration) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.project.pushNow('deleteRation', [this.getSourceType()], [this.getDeleteData(ration)]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.datas.splice(this.datas.indexOf(ration), 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ration.prototype.getChangePosUpdateData = function (ration1, ration2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var updateData = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             updateData.push({updateType: 'ut_update', updateData: this.getTempRationData(ration1.ID, ration1.billsItemID, ration2.serialNo)}); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -159,7 +167,7 @@ var Ration = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var preSerialNo = ration1.serialNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ration1.serialNo = ration2.serialNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ration2.serialNo = preSerialNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return new ration(project); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |