Patch level : 10.0
Files correlati : cg2100o.msk cg2.exe Ricompilazione Demo : [ ] Commento : Migliorata gestione codice fiscale / dati di nascita in clienti occasionali in prima nota git-svn-id: svn://10.65.10.50/trunk@20305 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5ea5df0bbf
commit
0448cb5272
@ -115,12 +115,12 @@ BEGIN
|
||||
PROMPT 1 8 "@bDati nascita"
|
||||
END
|
||||
|
||||
LIST O_SESSO 1 12
|
||||
LIST O_SESSO 1 7
|
||||
BEGIN
|
||||
PROMPT 2 9 "Sesso "
|
||||
ITEM "M|Maschio"
|
||||
ITEM "F|Femmina"
|
||||
FLAGS "H"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE O_DATANAS
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <progind.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
#include <utility.h>
|
||||
#include <validate.h>
|
||||
|
||||
#include "cg2100.h"
|
||||
#include "cg2102.h"
|
||||
@ -2329,6 +2330,12 @@ bool TPrimanota_application::occas_code_handler(TMask_field& f, KEY key)
|
||||
if (occas.read(_isequal) == NOERR)
|
||||
{
|
||||
m.autoload(occas);
|
||||
|
||||
if (m.field(O_COFI).empty() && !isdigit(code[0]) && cf_check(m.get(O_STATONAS), code))
|
||||
m.set(O_COFI, code, 1);
|
||||
if (m.field(O_PAIV).empty() && isdigit(code[0]) && pi_check(m.get(O_STATONAS), code))
|
||||
m.set(O_PAIV, code, 1);
|
||||
|
||||
m.send_key(K_TAB, O_COMUNE); // Forza decodifica comuni
|
||||
m.send_key(K_TAB, O_COMUNENAS);
|
||||
}
|
||||
@ -2339,15 +2346,33 @@ bool TPrimanota_application::occas_code_handler(TMask_field& f, KEY key)
|
||||
|
||||
bool TPrimanota_application::occas_cfpi_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_ENTER)
|
||||
TMask& om = f.mask();
|
||||
if (key == K_TAB && (f.focusdirty() || !om.is_running()))
|
||||
{
|
||||
const TMask& om = f.mask();
|
||||
if (om.field(O_COFI).empty() && om.field(O_PAIV).empty())
|
||||
TString16 cofi = om.get(O_COFI);
|
||||
if (cofi.empty())
|
||||
cofi = om.get(O_CODICE);
|
||||
|
||||
if (cf_check(om.get(O_STATONAS), cofi))
|
||||
{
|
||||
TMask& m = app().curr_mask();
|
||||
const int anno = m.get_int(F_ANNOIVA);
|
||||
if (anno >= 2007)
|
||||
return f.error_box(TR("E' necessario specificare il codice fiscale o la partita IVA"));
|
||||
int giorno = atoi(cofi.mid(9,2));
|
||||
om.set(O_SESSO, giorno > 40 ? "F" : "M");
|
||||
|
||||
if (om.field(O_COMUNENAS).empty())
|
||||
om.set(O_COMUNENAS, cofi.mid(11,4), 0x2);
|
||||
|
||||
if (om.field(O_DATANAS).empty())
|
||||
{
|
||||
const TFixed_string mesi("ABCDEHLMPRST");
|
||||
const int mese = mesi.find(cofi[8])+1;
|
||||
int anno = atoi(cofi.mid(6,2));
|
||||
if (giorno > 0 && mese > 0 && anno > 0)
|
||||
{
|
||||
giorno %= 40;
|
||||
anno += anno < 5 ? 2000 : 1900;
|
||||
om.set(O_DATANAS, TDate(giorno, mese, anno));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -244,7 +244,7 @@ void TInv_cont::main_loop()
|
||||
|
||||
const char* message = TR("Trasferimento in corso... Prego attendere");
|
||||
|
||||
TProgind w(_dim_tot, message, TRUE, TRUE, 60);
|
||||
TProgind w(_dim_tot, message, true, true);
|
||||
|
||||
bool continua = TRUE;
|
||||
for (int j = 0; j < num_disk; j++)
|
||||
@ -340,7 +340,7 @@ void TInv_cont::main_loop()
|
||||
}
|
||||
const char* message= "Trasferimento in corso... Prego attendere";
|
||||
|
||||
TProgind w(_dim_tot, message, TRUE, TRUE, 60);
|
||||
TProgind w(_dim_tot, message, true, true);
|
||||
|
||||
bool continua = TRUE;
|
||||
for (int j = 0; j < num_disk && continua; j++)
|
||||
|
@ -3436,7 +3436,7 @@ void TTransfer_file::scrivi_IVA(long nrec)
|
||||
{
|
||||
TString buffer(sizeT);
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti Iva"),false, true);
|
||||
_prog = new TProgind(nrec,TR("Trasferimento Movimenti IVA"),false, true);
|
||||
|
||||
const TRic_recfield recf(_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user