Merge branch 'R_10_00' of http://10.65.20.17:7990/scm/campo/campo into R_10_00

This commit is contained in:
Mattia Tollari 2018-07-25 10:02:19 +02:00
commit 12eb61daa5
5 changed files with 41 additions and 10 deletions

3
cd/test/tp0612.txt Normal file
View File

@ -0,0 +1,3 @@
tp0.exe
Corretta imortazione dati CONAI per Dania

21
cd/test/tp0612a.ini Normal file
View File

@ -0,0 +1,21 @@
[Main]
Demo=0
[tp1]
File(1) = tp0.exe|X
Patch = 612
Versione = 21511200
[tp]
Data = 24-07-2018
Descrizione = Trasferimento PACK
Dischi = 1
Moduli = ve
OEM =
Patch = 0612
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/tp0612a1.zip Normal file

Binary file not shown.

View File

@ -1829,14 +1829,16 @@ void TDoc2Paf::main_loop()
break;
}
if (ndocs > 0)
db().sq_set_exec("UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'");
{
db().sq_set_exec("UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'");
db().sq_commit();
}
message_box(FR("Sono stati elaborati %d documenti"), ndocs);
}
if (ndocs > 0 && show_log())
//genera_xml();
return;
if (ndocs > 0)
show_log();
}
}

View File

@ -6,12 +6,14 @@
// Assegna sottocategoria e peso di una classe CONAI solo se non vuoti
bool TArticolo_pack::set_conai(TCONAI_class cc, const TString& scat, const real& weight)
{
const bool ok = conai_configured_class(cc) && scat.full() && !weight.is_zero();
const bool ok = conai_configured_class(cc) && scat.full(); // && !weight.is_zero();
if (ok)
{
_conai_scat[cc] = scat;
_conai_peso[cc] = weight;
}
else
_conai_scat[cc] = EMPTY_STRING;
return ok;
}
@ -24,7 +26,8 @@ TArticolo_pack::TArticolo_pack(const TRectype& anamag) : TRectype(anamag)
const TString4 sotcat = anamag_sotcat.read(anamag); // Usually CA40
const real peso = anamag_weight.read(anamag); // Should be > 0
set_conai(cc, sotcat, peso); // Validates all parameters
set_conai(cc, sotcat, peso); // Validates all parameters
}
}
@ -831,7 +834,6 @@ bool TPack_ddt::trasferisci()
pesi_anamag++;
}
}
// La sottocategoria della bolla prevale su quella anagrafica impostata sopra
const TString4 conai_subclass = get_str("SubclassCode");
const TCONAI_class ct = conai_str2class(conai_subclass);
@ -851,15 +853,18 @@ bool TPack_ddt::trasferisci()
{
TGeneric_distrib d(peso_imballo_ddt, 3);
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
d.add(art.conai_weight(cc));
if (art.conai_subclass(cc).full())
d.add(art.conai_weight(cc));
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
rdoc.put(conai_peso_name(cc), d.get());
if (art.conai_subclass(cc).full())
rdoc.put(conai_peso_name(cc), d.get());
}
else
{
// Il peso in bolla coincide con quello in anagrafica: devo riportarli
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
rdoc.put(conai_peso_name(cc), art.conai_weight(cc));
if (art.conai_subclass(cc).full())
rdoc.put(conai_peso_name(cc), art.conai_weight(cc));
}
/* }
else