Corretti i seguenti errori:
MI2249 (vedi modifica di guy sui TConfig), MI2250, MI2248 (sempre modifica di guy), MI2251, MI2252. git-svn-id: svn://10.65.10.50/trunk@3918 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
15b5d98556
commit
b52347cc14
@ -1242,10 +1242,10 @@ void TRic_tab::ricevi_movIVA(TString& key, char uselab)
|
|||||||
if (ocfpi.not_empty())
|
if (ocfpi.not_empty())
|
||||||
occasionali(ocfpi);
|
occasionali(ocfpi);
|
||||||
|
|
||||||
TRecnotype rec = _tmov->recno(); // Salvo il nuovo numero di
|
// TRecnotype rec = _tmov->recno(); // Salvo il nuovo numero di
|
||||||
_tmov->put("TOCFP", ocfpi); // registrazione sul file di lavoro
|
// _tmov->put("TOCFP", ocfpi); // registrazione sul file di lavoro
|
||||||
_tmov->rewrite();
|
// _tmov->rewrite();
|
||||||
_tmov->readat(rec);
|
// _tmov->readat(rec);
|
||||||
|
|
||||||
TDate data74ter ( _tmov->get_date(MOV_DATA74TER) );
|
TDate data74ter ( _tmov->get_date(MOV_DATA74TER) );
|
||||||
TString codval ( _tmov->get (MOV_CODVALI) );
|
TString codval ( _tmov->get (MOV_CODVALI) );
|
||||||
|
@ -2278,9 +2278,9 @@ bool TRic_ListaMov::preprocess_page(int file,int counter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int r = 1;
|
int r = 1;
|
||||||
// Visualizza in positivo le note di credito e gli storni
|
// Cambia segno se si tratta di note di credito o storni
|
||||||
if ((_tipodoc == "NC" || _tipodoc == "ST") && _impo < 0.0)
|
if (_tipodoc == "NC" || _tipodoc == "ST")
|
||||||
{
|
{
|
||||||
_impo_print = _impo * (-1);
|
_impo_print = _impo * (-1);
|
||||||
_impos_print = _impos * (-1);
|
_impos_print = _impos * (-1);
|
||||||
@ -2706,8 +2706,12 @@ void TRic_ListaMov::aggiorna_mov()
|
|||||||
if (mov.get(MOV_TIPOMOV).empty())
|
if (mov.get(MOV_TIPOMOV).empty())
|
||||||
mov.put(MOV_TIPOMOV, _tipom_cau);
|
mov.put(MOV_TIPOMOV, _tipom_cau);
|
||||||
mov.put(MOV_CODPAG, _codpag_scad);
|
mov.put(MOV_CODPAG, _codpag_scad);
|
||||||
if ((_tipodoc == "NC" || _tipodoc == "ST") && _tot_doc > 0.0) // swap sign only if positive
|
const bool first_time = mov.get("TOCFP")!="X";
|
||||||
|
if ((_tipodoc == "NC" || _tipodoc == "ST") && first_time) // swap sign only if it's first time
|
||||||
|
{
|
||||||
_tot_doc = _tot_doc * -1;
|
_tot_doc = _tot_doc * -1;
|
||||||
|
mov.put("TOCFP","X");
|
||||||
|
}
|
||||||
mov.put(MOV_TOTDOC, _tot_doc);
|
mov.put(MOV_TOTDOC, _tot_doc);
|
||||||
if (_is_salda)
|
if (_is_salda)
|
||||||
{
|
{
|
||||||
@ -2739,11 +2743,13 @@ void TRic_ListaMov::aggiorna_rmov(char tipoc, char tipocc)
|
|||||||
void TRic_ListaMov::aggiorna_iva(char tipo)
|
void TRic_ListaMov::aggiorna_iva(char tipo)
|
||||||
{
|
{
|
||||||
TLocalisamfile& riva = current_cursor()->file(LF_RMOVIVA);
|
TLocalisamfile& riva = current_cursor()->file(LF_RMOVIVA);
|
||||||
|
TLocalisamfile& mov = current_cursor()->file(LF_MOV);
|
||||||
|
|
||||||
if (_anno == 0)
|
if (_anno == 0)
|
||||||
riva.put(RMI_ANNOES, _annoese);
|
riva.put(RMI_ANNOES, _annoese);
|
||||||
|
|
||||||
if ((_tipodoc == "NC" || _tipodoc == "ST") && _impo > 0.0) // swap sign only if positive
|
const bool first_time = mov.get("TOCFP") != "X";
|
||||||
|
if ((_tipodoc == "NC" || _tipodoc == "ST") && first_time) // swap sign only if it is the first time
|
||||||
{
|
{
|
||||||
_impo = _impo * -1;
|
_impo = _impo * -1;
|
||||||
_impos = _impos * -1;
|
_impos = _impos * -1;
|
||||||
|
@ -745,8 +745,9 @@ bool TVar_mov::setta_campi_maschera_iva(TMask& m)
|
|||||||
int gruppo = _tiva->get_int (RMI_GRUPPO);
|
int gruppo = _tiva->get_int (RMI_GRUPPO);
|
||||||
int conto = _tiva->get_int (RMI_CONTO);
|
int conto = _tiva->get_int (RMI_CONTO);
|
||||||
long sottoc = _tiva->get_long(RMI_SOTTOCONTO);
|
long sottoc = _tiva->get_long(RMI_SOTTOCONTO);
|
||||||
|
const bool first_time = _rec_mov->get("TOCFP") != "X";
|
||||||
|
|
||||||
if ((tipodoc == "NC" || tipodoc == "ST") && imponibile < 0.0)
|
if ((tipodoc == "NC" || tipodoc == "ST") && !first_time)
|
||||||
{
|
{
|
||||||
imponibile *= -1;
|
imponibile *= -1;
|
||||||
imposta *= -1;
|
imposta *= -1;
|
||||||
@ -1521,8 +1522,9 @@ void TVar_mov::registra_IVA(TMask& m)
|
|||||||
int gruppo = m.get_int (F_GRUPPO);
|
int gruppo = m.get_int (F_GRUPPO);
|
||||||
int conto = m.get_int (F_CONTO);
|
int conto = m.get_int (F_CONTO);
|
||||||
long sottoc = m.get_long(F_SOTTOCONTO);
|
long sottoc = m.get_long(F_SOTTOCONTO);
|
||||||
|
const bool first_time = _rec_mov->get("TOCFP") != "X";
|
||||||
|
|
||||||
if ((tipodoc=="NC" || tipodoc =="ST") && imponibile > 0.0)
|
if ((tipodoc=="NC" || tipodoc =="ST") && !first_time)
|
||||||
{
|
{
|
||||||
imponibile *= -1;
|
imponibile *= -1;
|
||||||
imposta *= -1;
|
imposta *= -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user