Merge branch 'R12.00' of http://10.65.20.33/sirio/CAMPO/campo into R12.00
This commit is contained in:
commit
824f84e02e
@ -154,8 +154,6 @@ void TPA_mask::fill()
|
|||||||
|
|
||||||
TSheet_field& docs = sfield(F_DOCS);
|
TSheet_field& docs = sfield(F_DOCS);
|
||||||
TString_array& sht = docs.rows_array();
|
TString_array& sht = docs.rows_array();
|
||||||
docs.hide();
|
|
||||||
|
|
||||||
sht.destroy();
|
sht.destroy();
|
||||||
|
|
||||||
const TDate dal = get(F_DATAINI);
|
const TDate dal = get(F_DATAINI);
|
||||||
@ -200,19 +198,20 @@ void TPA_mask::fill()
|
|||||||
{
|
{
|
||||||
if (!pi.add_status())
|
if (!pi.add_status())
|
||||||
break;
|
break;
|
||||||
const TRectype& doc = rec.cursor()->curr();
|
const TDocumentoEsteso doc(rec.cursor()->curr());
|
||||||
const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC));
|
|
||||||
|
|
||||||
// Controllo che la numerazione sia tra quelle giuste
|
// Controllo che la numerazione sia tra quelle giuste
|
||||||
|
|
||||||
// Controllo che il tipo documento sia OK
|
// Controllo che il tipo documento sia OK
|
||||||
if(!check_doc_filter(doc))
|
if(!check_doc_filter(doc))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const TTipo_documento& td = doc.tipo(); //cached_tipodoc(doc.get(DOC_TIPODOC));
|
||||||
bool sent = false;
|
bool sent = false;
|
||||||
|
|
||||||
if (chiave_paf_doc(doc, hfatt, bfatt))
|
if (chiave_paf_doc(doc, hfatt, bfatt))
|
||||||
{
|
{
|
||||||
if (paf0100f.search(nullptr, hfatt, bfatt) && paf0100f.sq_get("P1_GESTIONE") != " " && paf0100f.sq_get("P1_ERRINT") != "*")
|
if (paf0100f.search(nullptr, hfatt, bfatt) && paf0100f.sq_get("P1_GESTIONE") != " " &&
|
||||||
|
paf0100f.sq_get("P1_GESTIONE") != "0" && paf0100f.sq_get("P1_ERRINT") != "*")
|
||||||
{
|
{
|
||||||
if (paf0100f.sq_get("P1_GESTIONE") != filter_selected)
|
if (paf0100f.sq_get("P1_GESTIONE") != filter_selected)
|
||||||
continue;
|
continue;
|
||||||
@ -224,24 +223,25 @@ void TPA_mask::fill()
|
|||||||
|
|
||||||
TToken_string& row = docs.row(-1);
|
TToken_string& row = docs.row(-1);
|
||||||
row = sent ? " " : "X";
|
row = sent ? " " : "X";
|
||||||
row.add(rec.get(DOC_ANNO).as_int(), 1);
|
row.add(doc.get_int(DOC_ANNO), 1);
|
||||||
row.add(rec.get(DOC_CODNUM).as_string());
|
row.add(doc.get(DOC_CODNUM));
|
||||||
row.add(rec.get(DOC_TIPODOC).as_string());
|
row.add(doc.get(DOC_TIPODOC));
|
||||||
|
|
||||||
TString tipodoc = rec.get(DOC_TIPODOCSDI).as_string();
|
TString tipodoc = doc.get(DOC_TIPODOCSDI);
|
||||||
|
|
||||||
if (tipodoc.blank())
|
if (tipodoc.blank())
|
||||||
tipodoc = td.tipo_doc_sdi();
|
tipodoc = td.tipo_doc_sdi();
|
||||||
if (today <data_inizio && (tipodoc == "TD24" || tipodoc == "TD25" || tipodoc == "TD27"))
|
if (today <data_inizio && (tipodoc == "TD24" || tipodoc == "TD25" || tipodoc == "TD27"))
|
||||||
tipodoc = "TD01";
|
tipodoc = "TD01";
|
||||||
row.add(tipodoc);
|
row.add(tipodoc);
|
||||||
row.add(rec.get(DOC_NDOC).as_int());
|
row.add(doc.get_int(DOC_NDOC));
|
||||||
row.add(rec.get(DOC_DATADOC).as_date());
|
row.add(doc.get_date(DOC_DATADOC));
|
||||||
row.add(rec.get(CFV_CODCF).as_int());
|
row.add(doc.get_int(CFV_CODCF));
|
||||||
row.add(rec.get("20." CLI_RAGSOC).as_string());
|
row.add(doc.clifor().get(CLI_RAGSOC));
|
||||||
|
|
||||||
|
TString cod_ind_sped = doc.get(DOC_CODINDSP);
|
||||||
|
TString rif = get_dest_sdi(doc.get(DOC_TIPOCF)[0], doc.get_int(DOC_CODCF), cod_ind_sped);
|
||||||
|
|
||||||
TString cod_ind_sped = rec.get(DOC_CODINDSP).as_string();
|
|
||||||
TString rif = get_dest_sdi(rec.get(CFV_TIPOCF).as_string()[0], rec.get(CFV_CODCF).as_int(), cod_ind_sped);
|
|
||||||
// Se è ancora vuoto potrebbe essere estero
|
// Se è ancora vuoto potrebbe essere estero
|
||||||
if(rif.empty())
|
if(rif.empty())
|
||||||
{
|
{
|
||||||
@ -257,13 +257,15 @@ void TPA_mask::fill()
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
row.add(rif);
|
row.add(rif);
|
||||||
row.add(rec.get("17." CFV_PARIFAMM).as_string());
|
row.add(doc.clifor().vendite().get(CFV_PARIFAMM));
|
||||||
row.add(rec.get("20." CLI_COFI).as_string());
|
row.add(doc.clifor().get(CLI_COFI));
|
||||||
|
|
||||||
|
bool split = doc.clifor().get_bool(CLI_SPLITPAY);
|
||||||
|
|
||||||
bool split = rec.get("20." CLI_SPLITPAY).as_bool();
|
|
||||||
if (split)
|
if (split)
|
||||||
{
|
{
|
||||||
const long numreg = rec.get(DOC_NUMREG).as_int();
|
const long numreg = doc.get_int(DOC_NUMREG);
|
||||||
|
|
||||||
if (numreg > 0)
|
if (numreg > 0)
|
||||||
{
|
{
|
||||||
const TRectype& mov = cache().get(LF_MOV, numreg);
|
const TRectype& mov = cache().get(LF_MOV, numreg);
|
||||||
@ -273,13 +275,11 @@ void TPA_mask::fill()
|
|||||||
row.add(split ? "X" : " ");
|
row.add(split ? "X" : " ");
|
||||||
|
|
||||||
const bool attach = !rec.get("COLL_GOLEM").is_empty();
|
const bool attach = !rec.get("COLL_GOLEM").is_empty();
|
||||||
|
|
||||||
row.add(attach ? "X" : " ");
|
row.add(attach ? "X" : " ");
|
||||||
row.add((!td.invio_xml()) ? "X" : "");
|
row.add((!td.invio_xml()) ? "X" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
docs.force_update();
|
docs.force_update();
|
||||||
docs.show();
|
|
||||||
|
|
||||||
if (fat_no_cod > 0)
|
if (fat_no_cod > 0)
|
||||||
warning_box("Sono state trovate una o più fatture senza codice destinatario né pec");
|
warning_box("Sono state trovate una o più fatture senza codice destinatario né pec");
|
||||||
}
|
}
|
||||||
@ -639,7 +639,7 @@ bool TPA_mask::check_doc_filter(const TDocumentoEsteso& d) const
|
|||||||
const TString& codnum = d.get(DOC_CODNUM);
|
const TString& codnum = d.get(DOC_CODNUM);
|
||||||
const TString& tipodoc = d.get(DOC_TIPODOC);
|
const TString& tipodoc = d.get(DOC_TIPODOC);
|
||||||
const char stato = d.stato();
|
const char stato = d.stato();
|
||||||
const TTipo_documento& td = cached_tipodoc(d.get(DOC_TIPODOC));
|
const TTipo_documento& td = d.tipo(); // cached_tipodoc(d.get(DOC_TIPODOC));
|
||||||
// Mi precarico la tabella dei documenti scelti
|
// Mi precarico la tabella dei documenti scelti
|
||||||
FOR_EACH_SHEET_ROW(sfield(F_DOCUMENTI_TIPO), nr, row)
|
FOR_EACH_SHEET_ROW(sfield(F_DOCUMENTI_TIPO), nr, row)
|
||||||
{
|
{
|
||||||
|
@ -567,7 +567,6 @@ protected:
|
|||||||
const TRectype& cco(const TRectype& doc) const; // Contratto/Convenzione/Offerta
|
const TRectype& cco(const TRectype& doc) const; // Contratto/Convenzione/Offerta
|
||||||
const char * stato_paf() const { return _provvisorio ? "X" : "D"; }
|
const char * stato_paf() const { return _provvisorio ? "X" : "D"; }
|
||||||
|
|
||||||
|
|
||||||
const TString & natura(const char* codiva) const;
|
const TString & natura(const char* codiva) const;
|
||||||
static const char* get_esigibilita_iva(const TDocumentoEsteso& doc);
|
static const char* get_esigibilita_iva(const TDocumentoEsteso& doc);
|
||||||
void set_IVA(TString codiva, TPaf_record& paf) const;
|
void set_IVA(TString codiva, TPaf_record& paf) const;
|
||||||
|
@ -1616,8 +1616,9 @@ bool TDoc_fp::export_info_articolo(TFPRiga_documento* rdoc, TPaf_record& paf1900
|
|||||||
for (int i = 0; i < FR_CMAX; i++)
|
for (int i = 0; i < FR_CMAX; i++)
|
||||||
{
|
{
|
||||||
const TString scat(rdoc->get(conai_sottocat_name(i)));
|
const TString scat(rdoc->get(conai_sottocat_name(i)));
|
||||||
|
const real peso_conai = rdoc->get_real(conai_peso_name(i)).string();
|
||||||
|
|
||||||
if (scat.full() && cache().get("&VESCC", scat).not_empty() && !_has_cust)
|
if (scat.full() && peso_conai != ZERO && cache().get("&VESCC", scat).not_empty() && !_has_cust)
|
||||||
{
|
{
|
||||||
reset(paf2100f);
|
reset(paf2100f);
|
||||||
paf2100f.set("PK_KEYNLINEA", static_cast<long>(riga_doc));
|
paf2100f.set("PK_KEYNLINEA", static_cast<long>(riga_doc));
|
||||||
@ -1628,7 +1629,7 @@ bool TDoc_fp::export_info_articolo(TFPRiga_documento* rdoc, TPaf_record& paf1900
|
|||||||
msg_conai << "Contributo CONAI " << conai_material(conai_str2class(scat)) << " (Kg)";
|
msg_conai << "Contributo CONAI " << conai_material(conai_str2class(scat)) << " (Kg)";
|
||||||
paf2100f.set("PK_TIPODATO", "CONAI");
|
paf2100f.set("PK_TIPODATO", "CONAI");
|
||||||
paf2100f.set("PK_RIFDATO", msg_conai);
|
paf2100f.set("PK_RIFDATO", msg_conai);
|
||||||
paf2100f.set("PK_RIFNUMERO", rdoc->get_real(conai_peso_name(i)).string());
|
paf2100f.set("PK_RIFNUMERO", peso_conai);
|
||||||
ok &= insert(paf2100f);
|
ok &= insert(paf2100f);
|
||||||
|
|
||||||
|
|
||||||
@ -2729,7 +2730,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
|||||||
pafw300f.set("PW_NUMERO", doc.numero());
|
pafw300f.set("PW_NUMERO", doc.numero());
|
||||||
pafw300f.set("PW_DATA", doc.data());
|
pafw300f.set("PW_DATA", doc.data());
|
||||||
|
|
||||||
if (!cached_tipodoc(doc.get(DOC_TIPODOC)).invio_xml() || doc.noinvioxml())
|
if (!cached_tipodoc(doc.get(DOC_TIPODOC)).invio_xml() || doc.noinvioxml() || _provvisorio)
|
||||||
{
|
{
|
||||||
pafw300f.set("PW_CODSDI", "**********");
|
pafw300f.set("PW_CODSDI", "**********");
|
||||||
}
|
}
|
||||||
@ -3404,10 +3405,8 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
|||||||
pafw300f.set("PW_TIPONUM", ""); //TODO COSA CI METTIAMO NEL TIPO NUM
|
pafw300f.set("PW_TIPONUM", ""); //TODO COSA CI METTIAMO NEL TIPO NUM
|
||||||
pafw300f.set("PW_NUMERO", mov.get(MOV_NUMDOC));
|
pafw300f.set("PW_NUMERO", mov.get(MOV_NUMDOC));
|
||||||
pafw300f.set("PW_DATA", mov.get_date(MOV_DATADOC));
|
pafw300f.set("PW_DATA", mov.get_date(MOV_DATADOC));
|
||||||
/*
|
if (!_definitivo)
|
||||||
if (!cached_tipodoc(doc.get(DOC_TIPODOC)).invio_xml() || doc.noinvioxml()) //TODO COSA CI VA MESSO?? COSA VUOL DIRE INVIO XML
|
|
||||||
pafw300f.set("PW_CODSDI", "**********");
|
pafw300f.set("PW_CODSDI", "**********");
|
||||||
*/
|
|
||||||
pafw300f.set("PW_CDEST", _coddest);
|
pafw300f.set("PW_CDEST", _coddest);
|
||||||
pafw300f.set("PW_RAGSOC", fornitore.ragione_sociale().left(35));
|
pafw300f.set("PW_RAGSOC", fornitore.ragione_sociale().left(35));
|
||||||
pafw300f.set("PW_PAESE", fornitore.stato_residenza_ISO());
|
pafw300f.set("PW_PAESE", fornitore.stato_residenza_ISO());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user