Patch level : 10.0 nopatch
Files correlati : ps0713.exe Ricompilazione Demo : [ ] Commento : Aggiunto importo spese da distribuire sull' importazione fatture git-svn-id: svn://10.65.10.50/trunk@20628 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8d91494a26
commit
9c9f5ab956
@ -172,7 +172,31 @@ bool TImporta_fatacq_app::transfer(const TFilename& file, const long numreg, TAs
|
||||
key.add("1");
|
||||
const TRectype& causale = cache().get(LF_RCAUSALI, key);
|
||||
|
||||
for (bool ok = s.move_first(); ok; ok = s.move_next())
|
||||
const real spese = _msk->get_real(F_SPESE);
|
||||
bool has_spese = ! spese.is_zero();
|
||||
TGeneric_distrib d(spese);
|
||||
|
||||
if (has_spese)
|
||||
{
|
||||
for (bool ok = s.move_first(); ok; ok = s.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
TString16 codcom = s.get(0).as_string();
|
||||
|
||||
if(codcom.empty())
|
||||
continue;
|
||||
|
||||
TString16 tmp = s.get(1).as_string();
|
||||
tmp.strip(".");
|
||||
tmp.replace(',', '.');
|
||||
|
||||
real imp(tmp); imp.round(2);
|
||||
d.add(imp);
|
||||
}
|
||||
}
|
||||
|
||||
for (bool ok = s.move_first(); ok; ok = s.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
@ -189,18 +213,24 @@ bool TImporta_fatacq_app::transfer(const TFilename& file, const long numreg, TAs
|
||||
tmp.replace(',', '.');
|
||||
real imp(tmp); imp.round(2);
|
||||
|
||||
totimponibile += imp;
|
||||
if (has_spese)
|
||||
imp += d.get();
|
||||
totimponibile += imp;
|
||||
|
||||
TCommessa cms(codcom);
|
||||
TCommessa_string ankey = cms.cmsstr();
|
||||
TBill co(ankey.gruppo(), ankey.conto(), ankey.sotco());
|
||||
|
||||
if(righean.is_key(ankey))
|
||||
{
|
||||
real& imponibile = *(real*)righean.objptr(ankey);
|
||||
imponibile += imp;
|
||||
}
|
||||
else
|
||||
righean.add(ankey, imp);
|
||||
if(co.is_analitico())
|
||||
{
|
||||
if(righean.is_key(ankey))
|
||||
{
|
||||
real& imponibile = *(real*)righean.objptr(ankey);
|
||||
imponibile += imp;
|
||||
}
|
||||
else
|
||||
righean.add(ankey, imp);
|
||||
}
|
||||
|
||||
real rimposta = imp * iva / CENTO; rimposta.round(2);
|
||||
totimposta += rimposta;
|
||||
|
@ -8,3 +8,4 @@
|
||||
#define F_CODCF 107
|
||||
#define F_FRAGSOC 108
|
||||
#define F_DATAREG 109
|
||||
#define F_SPESE 110
|
||||
|
@ -36,7 +36,7 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 90 6
|
||||
GROUPBOX DLG_NULL 90 7
|
||||
BEGIN
|
||||
PROMPT 1 5 "@bParametri per l'importazione"
|
||||
END
|
||||
@ -126,6 +126,11 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
CURRENCY F_SPESE
|
||||
BEGIN
|
||||
PROMPT 2 10 "Spese "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user