Patch level : 10.0
Files correlati : ve0.exe Ricompilazione Demo : [ ] Commento : Corretta gestione commessa di default sulle risorse: quando e' vuota non deve azzerare quella impostata manualmente sulla riga documento git-svn-id: svn://10.65.10.50/trunk@19680 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
29426b3a46
commit
a412d6aeaf
@ -1856,8 +1856,8 @@ real TDocumento::imponibile(bool spese, int ndec) const
|
||||
if (physical_rows() > 0)
|
||||
{
|
||||
TAssoc_array & table = ((TDocumento *)this)->tabella_iva();
|
||||
for (TRiepilogo_iva * ri = (TRiepilogo_iva *) table.get(); ri != NULL;
|
||||
ri = (TRiepilogo_iva *) table.get())
|
||||
table.restart();
|
||||
for (TRiepilogo_iva* ri = (TRiepilogo_iva*)table.get(); ri != NULL; ri = (TRiepilogo_iva*)table.get())
|
||||
val += ri->imponibile(spese);
|
||||
|
||||
if (ndec == AUTO_DECIMALS)
|
||||
@ -2370,12 +2370,12 @@ real TDocumento::provvigione(bool first, int ndec) const
|
||||
real TDocumento::valore(bool totale, bool lordo, int ndec) const
|
||||
{
|
||||
real val;
|
||||
for (int i = physical_rows(); i>0; i--)
|
||||
TDocumento& doc = *(TDocumento*)this;
|
||||
FOR_EACH_PHYSICAL_RDOC_BACK(doc, i, r)
|
||||
{
|
||||
const TRiga_documento &r = physical_row(i);
|
||||
//if (r.is_merce() || r.is_spese() || r.is_prestazione())
|
||||
if (strchr("MSPRA", r.tipo().tipo()) != NULL) // Merce, Spese, Prestazioni, Risorse, Attrezzature
|
||||
val += r.valore(totale, lordo, ndec);
|
||||
const char t = r->tipo().tipo();
|
||||
if (strchr("MSPRA", t) != NULL) // Merce, Spese, Prestazioni, Risorse, Attrezzature
|
||||
val += r->valore(totale, lordo, ndec);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
@ -2304,7 +2304,7 @@ bool sppr_handler( TMask_field& f, KEY key )
|
||||
if (posiva >= 0)
|
||||
iva_handler(row_mask.fld(posiva), 0);
|
||||
|
||||
if (row_mask.id2pos(FR_CDC1) >= 0)
|
||||
if (row_mask.id2pos(FR_CDC1) >= 0 && sp.get("S1").full())
|
||||
{
|
||||
const TString80 cdc(sp.cdc());
|
||||
const TString80 cms(sp.cms());
|
||||
@ -2319,13 +2319,20 @@ bool sppr_handler( TMask_field& f, KEY key )
|
||||
const TFieldref& fr = *e.field();
|
||||
|
||||
if (fr.name() == RDOC_CODCOSTO)
|
||||
e.set(cdc.sub(fr.from(), fr.to()));
|
||||
else
|
||||
if (fr.name() == RDOC_CODCMS)
|
||||
e.set(cms.sub(fr.from(), fr.to()));
|
||||
else
|
||||
if (fr.name() == RDOC_FASCMS)
|
||||
e.set(fase.sub(fr.from(), fr.to()));
|
||||
{
|
||||
if (cdc.full())
|
||||
e.set(cdc.sub(fr.from(), fr.to()));
|
||||
} else
|
||||
if (fr.name() == RDOC_CODCMS)
|
||||
{
|
||||
if (cms.full())
|
||||
e.set(cms.sub(fr.from(), fr.to()));
|
||||
} else
|
||||
if (fr.name() == RDOC_FASCMS)
|
||||
{
|
||||
if (fase.full())
|
||||
e.set(fase.sub(fr.from(), fr.to()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user