|  | @@ -54,7 +54,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |           */
 | 
	
		
			
				|  |  |          async getLastestStageData(tid, sid, where) {
 | 
	
		
			
				|  |  |              const filterSql = this._getPosFilterSql(where);
 | 
	
		
			
				|  |  | -            const sql = 'SELECT Pos.lid, Pos.pid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
 | 
	
		
			
				|  |  | +            const sql = 'SELECT Pos.id, Pos.lid, Pos.pid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
 | 
	
		
			
				|  |  |                  '  (SELECT * FROM ' + this.tableName + ' WHERE tid = ? And sid = ?) As Pos ' +
 | 
	
		
			
				|  |  |                  '  INNER JOIN ( ' +
 | 
	
		
			
				|  |  |                  '    SELECT MAX(`times` * ' + timesLen + ' + `order`) As `flow`, `tid`, `sid`, `pid` From ' + this.tableName +
 | 
	
	
		
			
				|  | @@ -76,7 +76,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |           */
 | 
	
		
			
				|  |  |          async getAuditorStageData(tid, sid, times, order, where) {
 | 
	
		
			
				|  |  |              const filterSql = this._getPosFilterSql(where);
 | 
	
		
			
				|  |  | -            const sql = 'SELECT Pos.pid, Pos.lid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
 | 
	
		
			
				|  |  | +            const sql = 'SELECT Pos.id, Pos.pid, Pos.lid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
 | 
	
		
			
				|  |  |                  '  (SELECT * FROM '+ this.tableName + ' WHERE tid = ? And sid = ?) As Pos ' +
 | 
	
		
			
				|  |  |                  '  INNER JOIN ( ' +
 | 
	
		
			
				|  |  |                  '    SELECT MAX(`times` * ' + timesLen + ' + `order`) As `flow`, `pid`, `sid` From ' + this.tableName +
 | 
	
	
		
			
				|  | @@ -165,7 +165,6 @@ module.exports = app => {
 | 
	
		
			
				|  |  |           * @private
 | 
	
		
			
				|  |  |           */
 | 
	
		
			
				|  |  |          async _updateStagePosData(transaction, data) {
 | 
	
		
			
				|  |  | -            console.log(data);
 | 
	
		
			
				|  |  |              let bills, precision;
 | 
	
		
			
				|  |  |              const result = {ledger: [], pos: [], stageUpdate: true}, ledgerCalc = [];
 | 
	
		
			
				|  |  |              const datas = data instanceof Array ? data : [data];
 |