2Patch level : 12.0 970
Files correlati : bacnv.exe Commento : Aggiunta conversione per aggiornare i movimenti reverse charge : Aggiungere il flag sulle righe IVA Trovare il movimento di regolarizzazione Spostare l'importo del reverse charge sull'importo corretto in testata.
This commit is contained in:
parent
e131c0c61b
commit
aed538d01e
@ -19,7 +19,7 @@
|
||||
#include <rmov.h>
|
||||
#include <saldi.h>
|
||||
|
||||
#include "..\cg\cglib02.h"
|
||||
#include "..\cg\cglib.h"
|
||||
#include "..\ve\velib.h"
|
||||
#include "..\ci\rilore.h"
|
||||
#include "..\mg\mglib.h"
|
||||
@ -206,6 +206,7 @@ public:
|
||||
void convert_rilore();
|
||||
long convert_CONAI();
|
||||
void update_righe_doc();
|
||||
void convert_revcharge();
|
||||
|
||||
TConversione_archivi() : _oldditta(0), _codditta(0), _error(0), _exitcode(1) {}
|
||||
};
|
||||
@ -385,6 +386,9 @@ bool TConversione_archivi::menu(MENU_TAG)
|
||||
break;
|
||||
case 27:
|
||||
update_righe_doc();
|
||||
break;
|
||||
case 28:
|
||||
convert_revcharge();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2487,10 +2491,39 @@ void TConversione_archivi::update_righe_doc()
|
||||
}
|
||||
}
|
||||
if (changed && r.rewrite(f) != NOERR)
|
||||
cantwrite_box(f.description());
|
||||
cantwrite_box(f.description());
|
||||
}
|
||||
}
|
||||
|
||||
bool filter_causali_revcharge(const TRelation* r)
|
||||
{
|
||||
const TString8 codcaus = r->file().get(MOV_CODCAUS);
|
||||
const TCausale & caus = cached_causale(codcaus);
|
||||
|
||||
return caus.reverse_charge_pubb();
|
||||
}
|
||||
|
||||
bool scan_mov_revcharge(const TRelation& rel, void* pJolly)
|
||||
{
|
||||
TMovimento_contabile & mov = (TMovimento_contabile &) rel.file().curr();
|
||||
const int err = mov.rewrite();
|
||||
|
||||
return err == NOERR;
|
||||
}
|
||||
|
||||
void TConversione_archivi::convert_revcharge()
|
||||
{
|
||||
TCursor mov(new TRelation(LF_MOV));
|
||||
|
||||
mov.set_filterfunction(filter_causali_revcharge);
|
||||
|
||||
const int items = mov.items();
|
||||
|
||||
mov.freeze();
|
||||
mov.file().set_curr(new TMovimento_contabile());
|
||||
mov.scan(scan_mov_revcharge, 0, "aggiornamento movimenti reverse charge");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Programma di conversione archivi speciale
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -134,7 +134,8 @@ Item_03 = "Aggiornamento profili documento personalizzati", "bacnv 23", ""
|
||||
Item_04 = "Conversione documenti CONAI", "bacnv 24", ""
|
||||
Item_05 = "Gestione attivazione licenze", "ba2 -7", ""
|
||||
Item_06 = "Aggiornamento Nazioni ISO 2017" "ba7 -4", ""
|
||||
Item_04 = "Aggiornamento righe documento", "bacnv 27", ""
|
||||
Item_07 = "Aggiornamento righe documento", "bacnv 27", ""
|
||||
Item_08 = "Aggiornamento movimenti reverse charge", "bacnv 28", ""
|
||||
|
||||
[MENU_PREFERITI]
|
||||
Caption = "Preferiti"
|
||||
|
Loading…
x
Reference in New Issue
Block a user