Patch level : 12.0 1136
Files correlati : fp Commento: corretto il report di stampa dei provvisori: che invertiva clienti e fornitori Sistemata la numerazione dei documenti d'integrazioni inviati Aggiunta funzione in fplib per la compilazione del campo PI_DESCRIZIONE (PAF1800)
This commit is contained in:
parent
2b64c34625
commit
f655fd3b10
@ -31,7 +31,7 @@ protected:
|
|||||||
void print_reg();
|
void print_reg();
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||||
void next_page(int p) override;
|
void next_page(int p) override;
|
||||||
bool on_key(KEY key) override;
|
virtual bool on_key(KEY key) ;
|
||||||
bool check_not_empty();
|
bool check_not_empty();
|
||||||
bool check_full_fields() const;
|
bool check_full_fields() const;
|
||||||
void delete_paf();
|
void delete_paf();
|
||||||
@ -51,10 +51,12 @@ public:
|
|||||||
void save_all_fields();
|
void save_all_fields();
|
||||||
TPAR_mask();
|
TPAR_mask();
|
||||||
virtual ~TPAR_mask() {}
|
virtual ~TPAR_mask() {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TPAR_mask *__mask = nullptr;
|
TPAR_mask *__mask = nullptr;
|
||||||
|
|
||||||
|
|
||||||
void TPAR_mask::save_all_fields()
|
void TPAR_mask::save_all_fields()
|
||||||
{
|
{
|
||||||
TSheet_field & scaus = sfield(F_CAUSALI_TIPO);
|
TSheet_field & scaus = sfield(F_CAUSALI_TIPO);
|
||||||
@ -147,6 +149,7 @@ void TPAR_mask::fill()
|
|||||||
enable(DLG_OK, filter_selected.empty() || filter_selected == "E" || filter_selected == "X" || filter_selected == "D");
|
enable(DLG_OK, filter_selected.empty() || filter_selected == "E" || filter_selected == "X" || filter_selected == "D");
|
||||||
enable(DLG_PRINT, true);
|
enable(DLG_PRINT, true);
|
||||||
enable(DLG_SAVEREC, (is_f8() && (filter_selected == "X") || filter_selected == "D"));
|
enable(DLG_SAVEREC, (is_f8() && (filter_selected == "X") || filter_selected == "D"));
|
||||||
|
enable(DLG_ALL, true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
VECCHIA QUERY
|
VECCHIA QUERY
|
||||||
@ -176,7 +179,6 @@ void TPAR_mask::fill()
|
|||||||
|
|
||||||
bool first, show, ask = !((show = (first = true)));
|
bool first, show, ask = !((show = (first = true)));
|
||||||
int fat_no_cod = 0;
|
int fat_no_cod = 0;
|
||||||
const TString16 tipodocsdi = get(F_TIPO_SDI);
|
|
||||||
const TDate data_inizio = get_date_start_new_fatt();
|
const TDate data_inizio = get_date_start_new_fatt();
|
||||||
|
|
||||||
// Disabilito la colonna del codice ufficio
|
// Disabilito la colonna del codice ufficio
|
||||||
@ -194,6 +196,8 @@ void TPAR_mask::fill()
|
|||||||
const TRectype& mov = rec.cursor()->curr();
|
const TRectype& mov = rec.cursor()->curr();
|
||||||
const TCli_for & cli = cached_clifor(mov.get_char(MOV_TIPO), mov.get_long(MOV_CODCF));
|
const TCli_for & cli = cached_clifor(mov.get_char(MOV_TIPO), mov.get_long(MOV_CODCF));
|
||||||
bool sent = false;
|
bool sent = false;
|
||||||
|
const TCausale& caus = cached_causale(rec.get_string(MOV_CODCAUS), rec.get_int(MOV_ANNOES));
|
||||||
|
const TString& tipodocsdi = caus.tipodocsdi();
|
||||||
|
|
||||||
if (chiave_paf_mov(mov, tipodocsdi, hfatt, bfatt))
|
if (chiave_paf_mov(mov, tipodocsdi, hfatt, bfatt))
|
||||||
{
|
{
|
||||||
@ -213,8 +217,7 @@ void TPAR_mask::fill()
|
|||||||
regs.set_row_cell(S_ANNO, rec.get_int(MOV_ANNOES), r);
|
regs.set_row_cell(S_ANNO, rec.get_int(MOV_ANNOES), r);
|
||||||
regs.set_row_cell(S_NUMREG, rec.get_string(MOV_NUMREG), r);
|
regs.set_row_cell(S_NUMREG, rec.get_string(MOV_NUMREG), r);
|
||||||
regs.set_row_cell(S_DATAREG, rec.get_date(MOV_DATAREG), r);
|
regs.set_row_cell(S_DATAREG, rec.get_date(MOV_DATAREG), r);
|
||||||
const TCausale& caus = cached_causale(rec.get_string(MOV_CODCAUS), rec.get_int(MOV_ANNOES));
|
regs.set_row_cell(S_TIPODOC,tipodocsdi, r);
|
||||||
regs.set_row_cell(S_TIPODOC, caus.tipodocsdi(), r);
|
|
||||||
regs.set_row_cell(S_NUMDOC, rec.get_string(MOV_NUMDOC), r);
|
regs.set_row_cell(S_NUMDOC, rec.get_string(MOV_NUMDOC), r);
|
||||||
regs.set_row_cell(S_DATADOC, rec.get_date(MOV_DATADOC), r);
|
regs.set_row_cell(S_DATADOC, rec.get_date(MOV_DATADOC), r);
|
||||||
regs.set_row_cell(S_CLIENTE, rec.get_long(MOV_CODCF), r);
|
regs.set_row_cell(S_CLIENTE, rec.get_long(MOV_CODCF), r);
|
||||||
@ -612,8 +615,17 @@ void TPAR_mask::next_page(int p)
|
|||||||
TAutomask::next_page(p);
|
TAutomask::next_page(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TPAR_mask::on_key(const KEY key)
|
bool TPAR_mask::on_key(KEY key)
|
||||||
{
|
{
|
||||||
|
const bool ok = TMask::on_key(key);
|
||||||
|
|
||||||
|
if (ok && curr_page() == 0)
|
||||||
|
{
|
||||||
|
disable(DLG_OK);
|
||||||
|
disable(DLG_PRINT);
|
||||||
|
disable(DLG_SAVEREC);
|
||||||
|
disable(DLG_ALL);
|
||||||
|
}
|
||||||
if (key == K_SHIFT + K_F12)
|
if (key == K_SHIFT + K_F12)
|
||||||
{
|
{
|
||||||
if (run_fp_psw_mask())
|
if (run_fp_psw_mask())
|
||||||
@ -623,7 +635,7 @@ bool TPAR_mask::on_key(const KEY key)
|
|||||||
force_reload_sheet();
|
force_reload_sheet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TPAR_mask::check_not_empty()
|
bool TPAR_mask::check_not_empty()
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
<field x="60" y="3" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="60" y="3" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"Partita IVA " + 20.STATOPAIV + 20.PAIV</source>
|
<source>"Partita IVA " + 20.STATOPAIV + 20.PAIV</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="3" y="4" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="3" y="4" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"Data Ricezione " + 100@.DATAREG</source>
|
<source>"Data Ricezione " + 100@.DATAREG</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="60" y="4" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="60" y="4" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>20.RAGSOC</source>
|
<source>20.RAGSOC</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="3" y="5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="3" y="5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"Tipo Documento " + CAUS.TIPODOCSDI</source>
|
<source>"Tipo Documento " + CAUS.TIPODOCSDI</source>
|
||||||
<alt_source>#TIPODOCSDI</alt_source>
|
<alt_source>#TIPODOCSDI</alt_source>
|
||||||
</field>
|
</field>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<source>"Registro " + 23.REG</source>
|
<source>"Registro " + 23.REG</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="60" y="8" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="26" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="60" y="8" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="26" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"Documento fornitore n. " + 23.NUMDOC </source>
|
<source>"Documento cliente n. " + 23.PROTIVA</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="86" y="8" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="86" y="8" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"del " + 23.DATADOC</source>
|
<source>"del " + 23.DATADOC</source>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
<source>"Registro " +100@.REG</source>
|
<source>"Registro " +100@.REG</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="60" y="9" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="26" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="60" y="9" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="26" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"Documento cliente n. " + 100@.NUMDOC </source>
|
<source>"Documento fornitore n. " + 100@.NUMDOC </source>
|
||||||
</field>
|
</field>
|
||||||
<field x="86" y="9" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="86" y="9" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>"del " + 100@.DATADOC</source>
|
<source>"del " + 100@.DATADOC</source>
|
||||||
|
@ -700,6 +700,8 @@ protected:
|
|||||||
|
|
||||||
const TFirm& TReg_fp::get_firm(){return prefix().firm();}
|
const TFirm& TReg_fp::get_firm(){return prefix().firm();}
|
||||||
|
|
||||||
|
TString TReg_fp::get_line_descr();
|
||||||
|
|
||||||
bool export_paf0100f();
|
bool export_paf0100f();
|
||||||
bool export_paf3200f();
|
bool export_paf3200f();
|
||||||
|
|
||||||
|
@ -3246,6 +3246,27 @@ bool TReg_fp::export_paf3200f()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TString TReg_fp::get_line_descr()
|
||||||
|
{
|
||||||
|
TString descr;
|
||||||
|
TString16 tdsdi = _tipo_doc_sdi;
|
||||||
|
|
||||||
|
if (tdsdi == "TD16")
|
||||||
|
descr = "Integrazione fattura reverse charge interno";
|
||||||
|
else if (tdsdi == "TD17")
|
||||||
|
descr = "Integrazione/autofattura per acquisto servizi da estero";
|
||||||
|
else if (tdsdi == "TD18")
|
||||||
|
descr = "Integrazione per acquisto beni intracomunitari";
|
||||||
|
else if (tdsdi == "TD19")
|
||||||
|
descr = "Integrazione/autofattura per acquisto beni ex art.17 c.2 DPR 633/72";
|
||||||
|
else if (tdsdi == "TD20")
|
||||||
|
descr = "Autofattura";
|
||||||
|
else
|
||||||
|
error_box("Tipo documento non conforme");
|
||||||
|
|
||||||
|
return descr;
|
||||||
|
}
|
||||||
|
|
||||||
bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
||||||
{
|
{
|
||||||
if (!initialize(mov))
|
if (!initialize(mov))
|
||||||
@ -3382,7 +3403,7 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
|||||||
TString numdoc = mov.get(MOV_NUMDOCEXT);
|
TString numdoc = mov.get(MOV_NUMDOCEXT);
|
||||||
|
|
||||||
if (numdoc.blank())
|
if (numdoc.blank())
|
||||||
numdoc = mov.get(MOV_NUMDOC);
|
numdoc = mov.get(MOV_PROTIVA);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (numdoc.len() > 20)
|
if (numdoc.len() > 20)
|
||||||
@ -3440,6 +3461,7 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
|||||||
TPaf_record& paf2100f = _paf_container.get_paf("PAF2100F");
|
TPaf_record& paf2100f = _paf_container.get_paf("PAF2100F");
|
||||||
TPaf_record& paf3000f = _paf_container.get_paf("PAF3000F");
|
TPaf_record& paf3000f = _paf_container.get_paf("PAF3000F");
|
||||||
int n_righe_iva = mov.iva().rows();
|
int n_righe_iva = mov.iva().rows();
|
||||||
|
TString descr = get_line_descr();
|
||||||
|
|
||||||
for (int i = 1; i <= n_righe_iva; i++)
|
for (int i = 1; i <= n_righe_iva; i++)
|
||||||
{
|
{
|
||||||
@ -3455,6 +3477,7 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
|||||||
//PI_DESCRIZIONE CHAR(100) NOT NULL DEFAULT '',
|
//PI_DESCRIZIONE CHAR(100) NOT NULL DEFAULT '',
|
||||||
//PI_RIFAMMINISTR CHAR(20) NOT NULL DEFAULT '',
|
//PI_RIFAMMINISTR CHAR(20) NOT NULL DEFAULT '',
|
||||||
|
|
||||||
|
paf1800f.set("PI_DESCRIZIONE", descr);
|
||||||
paf1800f.set("PI_QUANTITA", 1l);
|
paf1800f.set("PI_QUANTITA", 1l);
|
||||||
paf1800f.set("PI_PREZZOUNIT", rec_iva.get(RMI_IMPONIBILE));
|
paf1800f.set("PI_PREZZOUNIT", rec_iva.get(RMI_IMPONIBILE));
|
||||||
paf1800f.set("PI_PRZTOTALE", rec_iva.get(RMI_IMPONIBILE));
|
paf1800f.set("PI_PRZTOTALE", rec_iva.get(RMI_IMPONIBILE));
|
||||||
|
@ -1579,6 +1579,7 @@ void TMask::show_page(int p)
|
|||||||
{
|
{
|
||||||
CHECKD(p >= 0 && p < _pages, "Pagina errata ", p);
|
CHECKD(p >= 0 && p < _pages, "Pagina errata ", p);
|
||||||
next_page(1000 + p);
|
next_page(1000 + p);
|
||||||
|
send_key(K_UNDEF, 0); // per chiamare la on_key
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMask::reset(short fld_id)
|
void TMask::reset(short fld_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user