|
@@ -302,6 +302,9 @@ func (ct *SellerController) InvoiceList(c *gin.Context) {
|
|
|
totalCond += ` AND group_id IN (?) `
|
|
|
totalPars = append(totalPars, groupIds)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
sumCond := ` (invoice_type = ? OR invoice_type = ? ) AND a.is_deleted = 0 AND a.seller_id != 0 `
|
|
|
sumPars := make([]interface{}, 0)
|
|
|
sumPars = append(sumPars, fms.ContractInvoiceTypeMake, fms.ContractInvoiceTypePreMake)
|
|
@@ -309,6 +312,15 @@ func (ct *SellerController) InvoiceList(c *gin.Context) {
|
|
|
inCond := ` (invoice_type = %d OR invoice_type = %d) AND is_deleted = 0 AND seller_id != 0 `
|
|
|
cond = fmt.Sprintf(cond, fms.ContractInvoiceTypeMake, fms.ContractInvoiceTypePreMake)
|
|
|
inCond = fmt.Sprintf(inCond, fms.ContractInvoiceTypeMake, fms.ContractInvoiceTypePreMake)
|
|
|
+
|
|
|
+ if req.CompanyType == 1 {
|
|
|
+ cond += ` AND b.contract_type = 1 `
|
|
|
+ //historyCond += ` AND new_company = 1 `
|
|
|
+ } else if req.CompanyType == 2 {
|
|
|
+ cond += ` AND b.contract_type IN (2,3,4) `
|
|
|
+ //historyCond += ` AND new_company = 0 `
|
|
|
+ }
|
|
|
+
|
|
|
// 开票日期
|
|
|
if req.StartDate != "" && req.EndDate != "" {
|
|
|
st := fmt.Sprint(req.StartDate, " 00:00:00")
|