|  | @@ -707,7 +707,6 @@ module.exports = {
 | 
												
													
														
															|  |       * @return {*}
 |  |       * @return {*}
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      round(value, decimal) {
 |  |      round(value, decimal) {
 | 
												
													
														
															|  | -        // return value ? bc.round(value, decimal) : null;
 |  | 
 | 
												
													
														
															|  |          return value ? new Decimal(value).toDecimalPlaces(decimal).toNumber() : null;
 |  |          return value ? new Decimal(value).toDecimalPlaces(decimal).toNumber() : null;
 | 
												
													
														
															|  |      },
 |  |      },
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
											
												
													
														
															|  | @@ -1231,15 +1230,13 @@ module.exports = {
 | 
												
													
														
															|  |              const end_contract_qty = this.add(bills.contract_qty, bills.pre_contract_qty);
 |  |              const end_contract_qty = this.add(bills.contract_qty, bills.pre_contract_qty);
 | 
												
													
														
															|  |              const end_contract_tp = this.add(bills.contract_tp, bills.pre_contract_tp);
 |  |              const end_contract_tp = this.add(bills.contract_tp, bills.pre_contract_tp);
 | 
												
													
														
															|  |              if (bills.is_tp) {
 |  |              if (bills.is_tp) {
 | 
												
													
														
															|  | -                if (!bills.deal_tp) return !!end_contract_tp;
 |  | 
 | 
												
													
														
															|  | -                return bills.deal_tp >= 0
 |  | 
 | 
												
													
														
															|  | -                    ? end_contract_tp > bills.deal_tp
 |  | 
 | 
												
													
														
															|  | -                    : end_contract_tp < bills.deal_tp || end_contract_tp > 0;
 |  | 
 | 
												
													
														
															|  | 
 |  | +                const compare_tp = isTz ? bills.total_price : bills.deal_tp;
 | 
												
													
														
															|  | 
 |  | +                if (!compare_tp) return !!end_contract_tp;
 | 
												
													
														
															|  | 
 |  | +                return compare_tp >= 0 ? end_contract_tp > compare_tp : end_contract_tp < compare_tp || end_contract_tp > 0;
 | 
												
													
														
															|  |              } else {
 |  |              } else {
 | 
												
													
														
															|  | -                if (!bills.deal_qty) return !!bills.end_contract_qty;
 |  | 
 | 
												
													
														
															|  | -                return bills.deal_qty >= 0
 |  | 
 | 
												
													
														
															|  | -                    ? end_contract_qty > bills.deal_qty
 |  | 
 | 
												
													
														
															|  | -                    : end_contract_qty < bills.deal_qty || end_contract_qty > 0;
 |  | 
 | 
												
													
														
															|  | 
 |  | +                const compare_qty = isTz ? bills.quantity : bills.deal_qty;
 | 
												
													
														
															|  | 
 |  | +                if (!compare_qty) return !!end_contract_qty;
 | 
												
													
														
															|  | 
 |  | +                return compare_qty >= 0 ? end_contract_qty > compare_qty : end_contract_qty < compare_qty || end_contract_qty > 0;
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |  
 |  |  
 |