Merge branch 'develop' into feature/JDK11
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -55,16 +55,17 @@ public class AccountingRules extends QueryRules {
|
||||
public static boolean checkDeleteMov(Connection connection, Integer numCmov) throws Exception {
|
||||
String sql =
|
||||
"select cast(count(*) as bit)\n" +
|
||||
"from ctb_movt inner join ctb_caus on ctb_movt.cod_ccau = ctb_caus.cod_ccau\n" +
|
||||
" inner join ctb_parr on ctb_movt.num_cmov = ctb_parr.num_cmov\n" +
|
||||
"from ctb_movt inner join ctb_parr on ctb_movt.num_cmov = ctb_parr.num_cmov\n" +
|
||||
"inner join ctb_parr cp ON ctb_parr.anno_part = cp.anno_part AND\n" +
|
||||
" ctb_parr.tipo_anag = cp.tipo_anag AND\n" +
|
||||
" ctb_parr.cod_anag = cp.cod_anag AND\n" +
|
||||
" ctb_parr.ser_doc = cp.ser_doc AND\n" +
|
||||
" ctb_parr.num_doc = cp.num_doc AND\n" +
|
||||
" ctb_movt.num_cmov <> cp.num_cmov\n" +
|
||||
" ctb_movt.num_cmov <> cp.num_cmov\n" +
|
||||
"inner join ctb_movt ct on ct.num_cmov = cp.num_cmov\n" +
|
||||
"inner join ctb_caus on ct.cod_ccau = ctb_caus.cod_ccau\n" +
|
||||
"where ctb_movt.num_cmov = " + UtilityDB.valueToString(numCmov) + " AND\n" +
|
||||
" ctb_caus.azione_su_partita = 0\n" +
|
||||
" ctb_caus.azione_su_partita = 1\n" +
|
||||
"and not exists (select * from crl_movt_rif_cmov where num_cmov = ctb_movt.num_cmov and cp.num_cmov = crl_movt_rif_cmov. num_cmov_rif )";
|
||||
boolean existParr = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
return existParr;
|
||||
|
||||
Reference in New Issue
Block a user