Aggiunto partita iva e codice fiscale sede legale
This commit is contained in:
@@ -6,6 +6,7 @@ import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.entity.*;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
@@ -132,10 +133,23 @@ public class ReceiptRules extends QueryRules {
|
||||
|
||||
public static String completePromozione(Connection connection, String codMart,
|
||||
String codMdep, Date dataDoc) throws Exception {
|
||||
String sql = "SELECT cod_promo " +
|
||||
" FROM dbo.getPromozioneVendita(" + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + ", null, null, null, " + UtilityDB.valueToString(codMart) + ") as promo_vend , " +
|
||||
/*ESCLUDI_PROMO_INFORMATIVE*/
|
||||
boolean esludiPromo = setupGest.getSetupBoolean(connection, "NTB_DOCT", "PROMOZIONI", "ESCLUDI_PROMO_INFORMATIVE");
|
||||
String whereCond = "";
|
||||
if (esludiPromo){
|
||||
whereCond = "(flag_tipologia is null or flag_tipologia <> 'I')";
|
||||
}
|
||||
|
||||
String sql =
|
||||
Query.format(
|
||||
"SELECT cod_promo " +
|
||||
" FROM dbo.getPromozioneVendita(%s, null, null, null, %s) as promo_vend , " +
|
||||
" mtb_depo WHERE promo_vend.cod_vlis = mtb_depo.cod_vlis AND " +
|
||||
" mtb_depo.cod_mdep = '" + codMdep + "'";
|
||||
" mtb_depo.cod_mdep = %s",
|
||||
dataDoc,
|
||||
codMart,
|
||||
codMdep);
|
||||
sql = UtilityDB.addwhereCond(sql, whereCond, true);
|
||||
String codPromo = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
return codPromo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user