Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@22019 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
bd8b96d8f1
commit
911da5b2e1
@ -91,7 +91,7 @@ bool TFatture_recordset::set(const char* name, const TVariant& value)
|
||||
{
|
||||
const TDate date = value.as_date();
|
||||
TString8 str;
|
||||
str.format("%02d%02d%04d", date.day(), date.month(), date.year());
|
||||
str.format("%04d%02d%02d", date.year(), date.month(), date.day());
|
||||
ok = TAS400_recordset::set(name, TVariant(str));
|
||||
}
|
||||
else
|
||||
@ -221,7 +221,7 @@ TFatture_recordset::TFatture_recordset()
|
||||
add_field("NAS.LICIMPEXP", AN, 35, 290);
|
||||
add_field("NAS.CCIAA", AN, 35, 325, true, ditta.get(NDT_NISCRAA));
|
||||
add_field("NAS.CAPSOC", AN, 35, 360, true, anagiu.get("CAPSOC"));
|
||||
add_field("NAS.CODFISC", AN, 35, 395, true, anag.get(ANA_COFI));
|
||||
add_field("NAS.CODFISC", NU, 16, 395, true, anag.get(ANA_COFI));
|
||||
add_field("NAS.PIVAINT", AN, 35, 430);
|
||||
add_field("NAS.TELEFONO", AN, 25, 465);
|
||||
add_field("NAS.TELEFAX", AN, 25, 490);
|
||||
@ -339,7 +339,7 @@ TFatture_recordset::TFatture_recordset()
|
||||
|
||||
// Record NAD: identificazione punto di consegna
|
||||
add_field("NAD.TIPOREC", AN, 3, 1, true, "NAD");
|
||||
add_field("NAD.CODCONS", AN, 17, 4);
|
||||
add_field("NAD.CODCONS", NU, 6, 4);
|
||||
add_field("NAD.QCODCONS", AN, 3, 21, true, "92");
|
||||
add_field("NAD.RAGSOCD", AN, 70, 24, true);
|
||||
add_field("NAD.INDIRD", AN, 70, 94, true);
|
||||
@ -493,7 +493,7 @@ void THardy_esselunga_fat::add_rec_testata(TFatture_recordset& fat, TDocumento&
|
||||
fat.new_rec("PAT");
|
||||
fat.set("PAT.DESCRIZ", doc.pagamento().name());
|
||||
fat.set("PAT.DATASCAD", doc.pagamento().data_rata(0));
|
||||
fat.set("PAT.IMPORTO", doc.pagamento().importo_rata(0));
|
||||
fat.set("PAT.IMPORTO", doc.pagamento().importo_da_dividere());
|
||||
}
|
||||
|
||||
void THardy_esselunga_fat::add_rec_sommario(TFatture_recordset& fat, TDocumento& doc)
|
||||
@ -546,6 +546,7 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
|
||||
FOR_EACH_PHYSICAL_RDOC(doc, r, rigadoc)
|
||||
{
|
||||
const TString80& codart_esselunga = cache_ca.decode(rigadoc->get(RDOC_CODART));
|
||||
const TRectype& rec_anamag = cache().get(LF_ANAMAG, rigadoc->get(RDOC_CODART));
|
||||
fat.new_rec("DET");
|
||||
long rl(r);
|
||||
fat.set("DET.NUMRIGA", TVariant(rl));
|
||||
@ -554,6 +555,7 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
|
||||
fat.set("DET.TIPQUANT", "L01"); // vendita (sentire da robbi)
|
||||
fat.set("DET.QTACONS", rigadoc->quantita());
|
||||
fat.set("DET.QTAFATT", rigadoc->quantita());
|
||||
fat.set("DET.NRCUINTU", rec_anamag.get_real(ANAMAG_PPCONF));
|
||||
fat.set("DET.PRZUNI", rigadoc->prezzo(false, true));
|
||||
fat.set("DET.PRZUN2", rigadoc->prezzo(false, false));
|
||||
fat.set("DET.IMPORTO", rigadoc->importo(false, false));
|
||||
@ -604,8 +606,14 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
|
||||
if (stato.empty())
|
||||
stato = "IT";
|
||||
fat.set("NAD.NAZIOD", stato);
|
||||
fat.set("NAD.NUMBOLLA", doc.get(DOC_NUMDOCRIF));
|
||||
fat.set("NAD.DATABOLLA", doc.get(DOC_DATADOCRIF));
|
||||
TString16 numdoc;
|
||||
const TString& num = doc.numerazione();
|
||||
numdoc.format("%012d",doc.numero());
|
||||
numdoc << cache().get("%NUM", num, "S7");
|
||||
numdoc.strip("/");
|
||||
numdoc = numdoc.right(12);
|
||||
fat.set("NAD.NUMDOC", numdoc);
|
||||
fat.set("NAD.DATADOC", doc.data());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user