Patch level : 12.0 496
Files correlati : cg1.exe cg1300n.msk cgmenu.men Programma di riallineamento tipo conto cliente/fornitore su causali e movimenti git-svn-id: svn://10.65.10.50/branches/R_10_00@24265 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0ea5eddf39
commit
58ee219463
@ -14,6 +14,7 @@
|
||||
#include "cg1305.h"
|
||||
#include "cg1306.h"
|
||||
#include "cg1313.h"
|
||||
#include "cg1314.h"
|
||||
|
||||
#include "cglib01.h"
|
||||
|
||||
@ -133,6 +134,11 @@ int cg1300(int argc, char* argv[])
|
||||
TAgg_tconto a;
|
||||
a.run(argc, argv, TR("Aggiornamento tipo conto")); // cg1302
|
||||
}
|
||||
case 'U':
|
||||
{
|
||||
TAgg_tcontoCF a;
|
||||
a.run(argc, argv, TR("Aggiornamento tipo conto cliente/fornitore")); // cg1314
|
||||
}
|
||||
break;
|
||||
case 'M':
|
||||
setta_meseliq(argc, argv);
|
||||
|
4
src/cg/cg1300n.h
Normal file
4
src/cg/cg1300n.h
Normal file
@ -0,0 +1,4 @@
|
||||
#define F_CODDITTA 201
|
||||
#define F_RAGSOC 202
|
||||
#define F_UPDCAUS 203
|
||||
#define F_UPDMOV 204
|
53
src/cg/cg1300n.uml
Normal file
53
src/cg/cg1300n.uml
Normal file
@ -0,0 +1,53 @@
|
||||
#include "cg1300n.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
|
||||
BUTTON DLG_ELABORA 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -11 "~Elabora"
|
||||
PICTURE TOOL_ELABORA
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
#include <helpbar.h>
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Aggiornamento tipo conto clienti/fornitori" 0 0 0 2
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 2 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 2 6 "Ragione sociale "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BOOLEAN F_UPDCAUS
|
||||
BEGIN
|
||||
PROMPT 2 8 "Aggiorno le causali"
|
||||
END
|
||||
|
||||
BOOLEAN F_UPDMOV
|
||||
BEGIN
|
||||
PROMPT 2 10 "Aggiorno i movimenti"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
134
src/cg/cg1314.cpp
Normal file
134
src/cg/cg1314.cpp
Normal file
@ -0,0 +1,134 @@
|
||||
//****************************
|
||||
//* Aggiornamento Tipo Conto *
|
||||
//****************************
|
||||
#include <mask.h>
|
||||
#include <recarray.h>
|
||||
|
||||
#include <pconti.h>
|
||||
#include <rcausali.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <nditte.h>
|
||||
|
||||
#include <lffiles.h>
|
||||
#include <recset.h>
|
||||
#include <reprint.h>
|
||||
#include <reputils.h>
|
||||
#include "cg1314.h"
|
||||
#include "cg1300n.h"
|
||||
#include "cglib01.h"
|
||||
|
||||
bool TAgg_tcontoCF::create()
|
||||
{
|
||||
open_files(LF_RCAUSALI, LF_RMOV, LF_RMOVIVA, 0);
|
||||
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
|
||||
void TAgg_tcontoCF::main_loop()
|
||||
{
|
||||
TMask m("cg1300n");
|
||||
const TString16 arg = argv(3);
|
||||
const bool force = arg.starts_with("-f");
|
||||
|
||||
if (force || m.run() == K_ENTER)
|
||||
{
|
||||
bool update_caus = force|| m.get_bool(F_UPDCAUS);
|
||||
bool update_mov = force || m.get_bool(F_UPDMOV);
|
||||
TRectype pcon(LF_PCON);
|
||||
TLog_report log;
|
||||
|
||||
if (update_caus)
|
||||
{
|
||||
TString use("USE "); use << LF_RCAUSALI;
|
||||
TISAM_recordset rcaus(use);
|
||||
TLocalisamfile & frcaus = rcaus.cursor()->relation()->lfile();
|
||||
|
||||
for (bool ok = rcaus.move_first(); ok; ok = rcaus.move_next())
|
||||
{
|
||||
const int gruppo = rcaus.get(RCA_GRUPPO).as_int();
|
||||
const int conto = rcaus.get(RCA_CONTO).as_int();
|
||||
const TString4 tipocf = rcaus.get(RCA_TIPOCF).as_string();
|
||||
TBill tc (gruppo,conto,0L);
|
||||
|
||||
tc.read(pcon);
|
||||
|
||||
const TString4 tipocf_pcon = pcon.get(PCN_TMCF);
|
||||
|
||||
if (tipocf != tipocf_pcon)
|
||||
{
|
||||
frcaus.put(RCA_TIPOCF, tipocf_pcon);
|
||||
frcaus.rewrite();
|
||||
TString msg ("Causale ");
|
||||
|
||||
msg << rcaus.get(RCA_CODCAUS).as_string();
|
||||
msg << " Riga " << rcaus.get(RCA_NRIGA).as_int();
|
||||
msg << " impostato tipo conto (" << tipocf_pcon << ")";
|
||||
log.log(0, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (update_mov) // CONTABILITA'
|
||||
{
|
||||
TString use("USE "); use << LF_RMOV;
|
||||
TISAM_recordset rmov(use);
|
||||
TLocalisamfile & frmov = rmov.cursor()->relation()->lfile();
|
||||
|
||||
for (bool ok = rmov.move_first(); ok; ok = rmov.move_next())
|
||||
{
|
||||
const int gruppo = rmov.get(RMV_GRUPPO).as_int();
|
||||
const int conto = rmov.get(RMV_CONTO).as_int();
|
||||
const TString4 tipocf = rmov.get(RMV_TIPOC).as_string();
|
||||
TBill tc (gruppo,conto,0L);
|
||||
|
||||
tc.read(pcon);
|
||||
|
||||
const TString4 tipocf_pcon = pcon.get(PCN_TMCF);
|
||||
|
||||
if (tipocf != tipocf_pcon)
|
||||
{
|
||||
frmov.put(RMV_TIPOC, tipocf_pcon);
|
||||
frmov.rewrite();
|
||||
TString msg ("Movimento ");
|
||||
|
||||
msg << rmov.get(RMV_NUMREG).as_int();
|
||||
msg << " Riga " << rmov.get(RMV_NUMRIG).as_int();
|
||||
msg << " impostato tipo conto (" << tipocf_pcon << ")";
|
||||
log.log(0, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (update_mov) // IVA
|
||||
{
|
||||
TString use("USE "); use << LF_RMOVIVA;
|
||||
TISAM_recordset rmoviva(use);
|
||||
TLocalisamfile & frmoviva = rmoviva.cursor()->relation()->lfile();
|
||||
|
||||
for (bool ok = rmoviva.move_first(); ok; ok = rmoviva.move_next())
|
||||
{
|
||||
const int gruppo = rmoviva.get(RMI_GRUPPO).as_int();
|
||||
const int conto = rmoviva.get(RMI_CONTO).as_int();
|
||||
const TString4 tipocf = rmoviva.get(RMI_TIPOC).as_string();
|
||||
TBill tc (gruppo,conto,0L);
|
||||
|
||||
tc.read(pcon);
|
||||
|
||||
const TString4 tipocf_pcon = pcon.get(PCN_TMCF);
|
||||
|
||||
if (tipocf != tipocf_pcon)
|
||||
{
|
||||
frmoviva.put(RMI_TIPOC, tipocf_pcon);
|
||||
frmoviva.rewrite();
|
||||
TString msg ("Movimento ");
|
||||
|
||||
msg << rmoviva.get(RMI_NUMREG).as_int();
|
||||
msg << " Riga IVA" << rmoviva.get(RMI_NUMRIG).as_int();
|
||||
msg << " impostato tipo conto (" << tipocf_pcon << ")";
|
||||
log.log(0, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
log.print_or_preview();
|
||||
}
|
||||
}
|
12
src/cg/cg1314.h
Normal file
12
src/cg/cg1314.h
Normal file
@ -0,0 +1,12 @@
|
||||
#include <printapp.h>
|
||||
|
||||
class TAgg_tcontoCF : public TSkeleton_application
|
||||
{
|
||||
|
||||
public:
|
||||
virtual bool create();
|
||||
virtual void main_loop();
|
||||
|
||||
TAgg_tcontoCF() {};
|
||||
virtual ~TAgg_tcontoCF() {};
|
||||
};
|
@ -172,7 +172,8 @@ Item_12 = "Allineamento IBAN su Banche x Cliente", "cg1 -2 B", "FP"
|
||||
Item_13 = "Controllo integrità archivi", "cg1 -2 X", "F"
|
||||
Item_14 = "Ricostruzione IVA differita", "cg1 -2 V", "F"
|
||||
Item_15 = "Aggiornamento Tipo Documento", "cg1 -2 F", "F"
|
||||
Item_16 = "Collegamento bilanci", [CGMENU_025]
|
||||
Item_16 = "Aggiornamento Tipo Documento", "cg1 -2 U", "F"
|
||||
Item_17 = "Collegamento bilanci", [CGMENU_025]
|
||||
|
||||
[CGMENU_019]
|
||||
Caption = "Invio"
|
||||
|
Loading…
x
Reference in New Issue
Block a user