Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@22006 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
72ee010211
commit
4d4fdcaa3c
@ -50,7 +50,12 @@ bool THardy_esselunga_fat_mask::on_field_event(TOperable_field& o, TField_event
|
||||
// Recordset per file fatture
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
enum TFE_type { AN, NU, NS, DA };
|
||||
// AN = alfanumerico
|
||||
// NU = numerico zero filled
|
||||
// NS = numerico zerofilled con segno
|
||||
// DA = data
|
||||
enum TFE_type { AN, NU, NS, NN, DA };
|
||||
|
||||
|
||||
class TFatture_recordset : public TAS400_recordset
|
||||
{
|
||||
@ -226,14 +231,14 @@ TFatture_recordset::TFatture_recordset()
|
||||
|
||||
// Record NAI: identificazione destinatario
|
||||
add_field("NAI.TIPOREC", AN, 3, 1, true, "NAI");
|
||||
add_field("NAI.CODFATT", AN, 17, 4, true, piva_esselunga); // verificare con Robbi perche' nell'esempio c'e' un altro numero
|
||||
add_field("NAI.CODFATT", AN, 17, 4, true, cliente_esselunga.get(CLI_PAIV));
|
||||
add_field("NAI.QCODFATT", AN, 3, 21, true, "VA");
|
||||
add_field("NAI.RAGSOCI", AN, 70, 24, true, cliente_esselunga.get(CLI_RAGSOC));
|
||||
add_field("NAI.INDIRI", AN, 70, 94, true, str);
|
||||
add_field("NAI.CITTAI", AN, 35, 164, true, com_esselunga.get(COM_DENCOM));
|
||||
add_field("NAI.PROVI", AN, 9, 199, true, com_esselunga.get(COM_PROVCOM));
|
||||
add_field("NAI.CAPI", AN, 9, 208, true, cliente_esselunga.get(CLI_CAPCF));
|
||||
add_field("NAI.NAZIOI", AN, 3, 217, true, cliente_esselunga.get(CLI_STATOCF));
|
||||
add_field("NAI.NAZIOI", AN, 3, 217, true, "IT");
|
||||
add_field("NAI.PIVANAZI", AN, 35, 220, true, cliente_esselunga.get(CLI_PAIV));
|
||||
add_field("NAI.FILLER", AN, 51, 255);
|
||||
add_field("NAI.FINERECORD", AN, 2, 0, true, "\r\n");
|
||||
@ -269,7 +274,7 @@ TFatture_recordset::TFatture_recordset()
|
||||
add_field("DET.TIPOREC", AN, 3, 1, true, "DET");
|
||||
add_field("DET.NUMRIGA", NU, 6, 4, true);
|
||||
add_field("DET.IDSOTTOR", AN, 3, 10);
|
||||
add_field("DET.NUMSRIGA", NU, 6, 13);
|
||||
add_field("DET.NUMSRIGA", AN, 6, 13); // AN perche'e' un campo che non c'e' mai e non deve essere zerofilled
|
||||
add_field("DET.CODEANCU", AN, 35, 19, true);
|
||||
add_field("DET.TIPCODCU", AN, 3, 54, true, "EN");
|
||||
add_field("DET.CODEANTU", AN, 35, 57);
|
||||
@ -481,6 +486,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));
|
||||
}
|
||||
|
||||
void THardy_esselunga_fat::add_rec_sommario(TFatture_recordset& fat, TDocumento& doc)
|
||||
@ -529,14 +535,26 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
|
||||
fat.set("DET.IMPORTO", rigadoc->importo(false, false));
|
||||
|
||||
fat.new_rec("DES");
|
||||
fat.set("DES.DESCRIZ", rigadoc->get(RDOC_DESCR));
|
||||
fat.set("DES.DESCR", rigadoc->get(RDOC_DESCR));
|
||||
|
||||
//fat.new_rec("RFN"); // solo per note di debito e di credito (chiedere a Robbi)
|
||||
|
||||
|
||||
fat.new_rec("TAX");
|
||||
fat.set("TAX.ALIQIVA", rigadoc->iva().percentuale());
|
||||
fat.set("TAX.DESCRIZ", rigadoc->iva().descrizione());
|
||||
fat.set("TAX.IMPORTO", rigadoc->imposta());
|
||||
const TString4& tipo = rigadoc->iva().tipo();
|
||||
TString4 tipo_hardy = "S";
|
||||
if (tipo == "ES")
|
||||
tipo_hardy = "X";
|
||||
else
|
||||
if (tipo == "NI")
|
||||
tipo_hardy = "G";
|
||||
else
|
||||
if (tipo == "NS")
|
||||
tipo_hardy = "E";
|
||||
fat.set("TAX.CATIMP", tipo_hardy);
|
||||
|
||||
//fat.new_rec("ALD");
|
||||
//fat.new_rec("NAD");
|
||||
|
Loading…
x
Reference in New Issue
Block a user