|
|
@@ -12,21 +12,21 @@ public class UnCheckedCountSqls {
|
|
|
/**
|
|
|
* 货款调账未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as amount, aa_currency as currency \n" +
|
|
|
+ public static final String ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as count, aa_currency as currency \n" +
|
|
|
"from purc$apbilladjustment where coalesce(aa_thischeckqty, 0) <> 0 and aa_enuu = ? and aa_custuu = ? " +
|
|
|
"group by aa_currency";
|
|
|
|
|
|
/**
|
|
|
* 当月货款调账未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String THISMONTH_ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as amount, aa_currency as currency \n" +
|
|
|
+ public static final String THISMONTH_ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as count, aa_currency as currency \n" +
|
|
|
"from purc$apbilladjustment where coalesce(aa_thischeckqty, 0) <> 0 and aa_enuu = ? and aa_custuu = ? and aa_date between ? and ?" +
|
|
|
"group by aa_currency";
|
|
|
|
|
|
/**
|
|
|
* 客户采购验收单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as amount, pa_currency as currency \n" +
|
|
|
+ public static final String SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as count, pa_currency as currency \n" +
|
|
|
"from purc$accept left join `purc$acceptitem` on pai_paid = pa_id " +
|
|
|
"where pa_venduu = ? and pa_enuu = ? and pai_qty > coalesce(pai_ycheckqty, 0) and pai_orderprice <> 0 " +
|
|
|
"group by pa_currency";
|
|
|
@@ -34,7 +34,7 @@ public class UnCheckedCountSqls {
|
|
|
/**
|
|
|
* 客户采购验收单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String THISMONTH_SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as amount, pa_currency as currency \n" +
|
|
|
+ public static final String THISMONTH_SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as count, pa_currency as currency \n" +
|
|
|
"from purc$accept left join `purc$acceptitem` on pai_paid = pa_id " +
|
|
|
"where pa_venduu = ? and pa_enuu = ? and pai_qty > coalesce(pai_ycheckqty, 0) and pai_orderprice <> 0 and pa_date between ? and ?" +
|
|
|
"group by pa_currency";
|
|
|
@@ -42,21 +42,21 @@ public class UnCheckedCountSqls {
|
|
|
/**
|
|
|
* 客户采购验退单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String SALE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) * pri_orderprice), 0) as amount, pr_currency as currency \n" +
|
|
|
+ public static final String SALE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) * pri_orderprice), 0) as count, pr_currency as currency \n" +
|
|
|
"from `purc$return` left join `purc$returnitem` on pr_id = pri_prid " +
|
|
|
"where pri_qty > abs(coalesce(pri_ycheckqty, 0)) and pr_venduu = ? and pr_enuu = ? group by pr_currency";
|
|
|
|
|
|
/**
|
|
|
* 客户采购验退单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String THISMONTH_SALE_RETURN_COUNT_SQL = "select sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) * pri_orderprice) as amount, pr_currency as currency \n" +
|
|
|
+ public static final String THISMONTH_SALE_RETURN_COUNT_SQL = "select sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) * pri_orderprice) as count, pr_currency as currency \n" +
|
|
|
"from `purc$return` left join `purc$returnitem` on pr_id = pri_prid " +
|
|
|
"where pri_qty > abs(coalesce(pri_ycheckqty, 0)) and pr_venduu = ? and pr_enuu = ? and pr_date between ? and ? group by pr_currency";
|
|
|
|
|
|
/**
|
|
|
* 客户委外验收单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as amount, ma_currency as currency " +
|
|
|
+ public static final String MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as count, ma_currency as currency " +
|
|
|
" from make$accept " +
|
|
|
"join make$acceptitem on ma_id = mai_paid " +
|
|
|
"where mai_qty > coalesce(mai_ycheckqty, 0) and ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 group by ma_currency";
|
|
|
@@ -64,7 +64,7 @@ public class UnCheckedCountSqls {
|
|
|
/**
|
|
|
* 客户委外验收单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String THISMONTH_MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as amount,ma_currency as currency " +
|
|
|
+ public static final String THISMONTH_MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as count, ma_currency as currency " +
|
|
|
" from make$accept " +
|
|
|
"join make$acceptitem on ma_id = mai_paid " +
|
|
|
"where mai_qty > coalesce(mai_ycheckqty, 0) and ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 and ma_date between ? and ? group by ma_currency";
|
|
|
@@ -72,7 +72,7 @@ public class UnCheckedCountSqls {
|
|
|
/**
|
|
|
* 客户委外验退单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as amount,mr_currency as currency " +
|
|
|
+ public static final String MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as count,mr_currency as currency " +
|
|
|
" from make$return " +
|
|
|
"join make$returnitem on mr_id = mri_paid " +
|
|
|
"where mri_qty > abs(coalesce(mri_ycheckqty, 0)) and mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 group by mr_currency";
|
|
|
@@ -80,7 +80,7 @@ public class UnCheckedCountSqls {
|
|
|
/**
|
|
|
* 客户委外验退单未对账金额查询语句
|
|
|
*/
|
|
|
- public static final String THISMONTH_MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as amount, mr_currency as currency " +
|
|
|
+ public static final String THISMONTH_MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as count, mr_currency as currency " +
|
|
|
" from make$return " +
|
|
|
"join make$returnitem on mr_id = mri_paid " +
|
|
|
"where mri_qty > abs(coalesce(mri_ycheckqty, 0)) and mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 and mr_date between ? and ? " +
|