Patch level : 2.0 546

Files correlati     : cg2.exe
Ricompilazione Demo : [ ]
Commento            :

Corretta importazione da file .ini righe di prima nota:
ignorava le righe con lo stesso conto delle precedenti


git-svn-id: svn://10.65.10.50/trunk@11362 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-08-01 07:55:21 +00:00
parent a3859b2053
commit 476f1a9b26
3 changed files with 32 additions and 13 deletions

View File

@ -1532,18 +1532,28 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
TClinton conto; ini2clinton(ini, conto);
int numrig = -1; // Normalmente aggiungi la riga in fondo
// Cerca una riga che abbia gia' il tipo ed il conto richiesto
if (strchr(" DINT", tipo) != NULL)
int numrig = ini.get_int(RMV_NUMRIG)-1;
if (numrig != i) // Controllo se ho un numero riga valido
{
if (tipo == 'I' || tipo == ' ')
numrig = clint2pos(conto, tipo);
else
numrig = type2pos(tipo);
if (numrig < 0)
tipo = ' ';
}
numrig = -1; // Normalmente aggiungi la riga in fondo
// Cerca una riga che abbia gia' il tipo ed il conto richiesto
if (strchr(" DINT", tipo) != NULL)
{
int nr = -1;
if (tipo == 'I' || tipo == ' ')
nr = clint2pos(conto, tipo);
else
nr = type2pos(tipo);
if (nr < 0)
tipo = ' ';
else
{
if (get_cgs_imp(nr).is_zero())
numrig = nr;
}
}
}
TToken_string& riga = cg.row(numrig);

View File

@ -713,7 +713,16 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
"Si desidera continuare ugualmente?"), i+1);
if (!ok) return FALSE;
}
if (app().is_transaction())
{
// Controlla esistenza conti nelle transazioni
if (!c.find())
return f.error_box("Il conto della riga %d non esiste", i+1);
if (!co.empty() && !co.find())
return f.error_box("Il conto di contropartita della riga %d non esiste", i+1);
}
empty = FALSE;
if (paga || nota)
{

View File

@ -486,7 +486,7 @@ real TCodiceIVA::imposta(const real & imponibile, int ndec, const char * codval)
real TCodiceIVA::scorpora(real& lordo, int ndec, const char* codval) const
{
const real percent = percentuale();
real iva = (lordo * percent) / (percent + 100.0);
real iva = (lordo * percent) / (percent + CENTO);
real imponibile = lordo - iva;
switch (ndec)