Patch level : 12.0 674
Files correlati : fp Commento : -Aggiunto controllo righe sconto -Pulizia codice
This commit is contained in:
parent
4714ff3ba9
commit
8c7f86ec2c
@ -874,11 +874,13 @@ void TDoc_fp::set_qta_prezzo(TPaf_record& paf1800f, TRiga_documento* rdoc) const
|
||||
{
|
||||
paf1800f.set("PI_QUANTITA", qta_string);
|
||||
paf1800f.set("PI_PREZZOUNIT", converti_prezzo(rdoc->prezzo(false, false)));
|
||||
paf1800f.set("PI_PRZTOTALE", converti_prezzo(rdoc->importo(true, false)));
|
||||
}
|
||||
else
|
||||
{
|
||||
paf1800f.set("PI_QUANTITA", qta_string.add_front("-"));
|
||||
paf1800f.set("PI_QUANTITA", qta_string);
|
||||
paf1800f.set("PI_PREZZOUNIT", converti_prezzo(-rdoc->prezzo(true, false)));
|
||||
paf1800f.set("PI_PRZTOTALE", converti_prezzo(rdoc->importo(true, false)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1383,7 +1385,6 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
log(1, msg);
|
||||
}
|
||||
set_qta_prezzo(paf1800f, rdoc);
|
||||
paf1800f.set("PI_PRZTOTALE", converti_prezzo(rdoc->importo(true, false)));
|
||||
set_IVA(*rdoc, paf1800f);
|
||||
|
||||
/*
|
||||
@ -1522,9 +1523,17 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
real qta = rdoc->get(RDOC_QTA);
|
||||
if (qta.is_zero()) qta = UNO;
|
||||
set_qta_prezzo(paf1800f, rdoc);
|
||||
paf1800f.set("PI_PRZTOTALE", converti_prezzo(rdoc->importo(true, false)));
|
||||
|
||||
set_IVA(*rdoc, paf1800f);
|
||||
}
|
||||
else if (rdoc->is_sconto() || rdoc->is_sconto_perc())
|
||||
{
|
||||
TString msg;
|
||||
msg << "Il documento " << doc.codice_numerazione().codice() << " " << doc.tipo().codice() << " " << doc.numero() << " presenta una o più righe di tipo sconto o sconto percentuale.\n" \
|
||||
"Esportazione impossibile";
|
||||
log(2, msg);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Salto tutte le altre righe
|
||||
|
Loading…
x
Reference in New Issue
Block a user