Patch level : 10.0
Files correlati : ps0982 Ricompilazione Demo : [ ] Commento : Aggiunto salvataggio delle banche in $BAN e delle categotrie merceologiche in GRC git-svn-id: svn://10.65.10.50/trunk@18710 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
26fea16469
commit
b6f46b1b03
@ -2,6 +2,7 @@
|
||||
#include <automask.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <textset.h>
|
||||
|
||||
#include <clifo.h>
|
||||
@ -166,6 +167,7 @@ void TImporta_dati_app::importa_clifo(TImporta_dati_rec& rec, const bool cliente
|
||||
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
TLocalisamfile cfven(LF_CFVEN);
|
||||
TTable banche("%BAN");
|
||||
|
||||
TProgind pi(rec.items(),str,true,true);
|
||||
|
||||
@ -216,20 +218,19 @@ void TImporta_dati_app::importa_clifo(TImporta_dati_rec& rec, const bool cliente
|
||||
clifo.put(CLI_TELEX, rec.get(14).as_string()); //telex
|
||||
clifo.put(CLI_FAX, rec.get(15).as_string()); //fax
|
||||
clifo.put(CLI_MAIL, rec.get(17).as_string()); //mail
|
||||
|
||||
clifo.put(CLI_CODABI, rec.get(26).as_string().left(5)); //ABI
|
||||
clifo.put(CLI_CODCAB, rec.get(26).as_string().right(5)); //CAB
|
||||
clifo.put(CLI_IBAN, rec.get(29).as_string()); //IBAN
|
||||
|
||||
if (real::is_natural(rec.get(26).as_string()))
|
||||
{
|
||||
clifo.put(CLI_CODABI, rec.get(26).as_string().left(5)); //ABI
|
||||
clifo.put(CLI_CODCAB, rec.get(26).as_string().right(5)); //CAB
|
||||
clifo.put(CLI_IBAN, rec.get(29).as_string()); //IBAN
|
||||
}
|
||||
|
||||
//Gestione CODPAG, che in Campo è al massimo di 4 caratteri
|
||||
//da accordi con roberto, s crivo per tutti RB60; eventuali eccezioni vanno gestite manualmente
|
||||
clifo.put(CLI_CODPAG, "RB60");
|
||||
|
||||
TString16 codpag = rec.get(27).as_string();
|
||||
/*if (codpag.len() != "RB60")
|
||||
report_non_standard(codpag);*/
|
||||
|
||||
|
||||
|
||||
if (rec.get(33).as_string() != "EUR")
|
||||
clifo.put(CLI_CODVAL, rec.get(33).as_string());
|
||||
@ -242,6 +243,34 @@ void TImporta_dati_app::importa_clifo(TImporta_dati_rec& rec, const bool cliente
|
||||
cfven.put(CFV_NONSCADEFF, "10-09;10-01");
|
||||
cfven.write();
|
||||
|
||||
if (real::is_natural(rec.get(26).as_string()))
|
||||
{
|
||||
TString8 abi = rec.get(26).as_string().left(5);
|
||||
TString16 abicab = rec.get(26).as_string();
|
||||
TString80 desc_banca = "Banca ";
|
||||
desc_banca << abi;
|
||||
TString80 desc_agenzia = "Agenzia ";
|
||||
desc_agenzia << abicab;
|
||||
|
||||
banche.put("CODTAB", abi);
|
||||
int err = banche.read();
|
||||
if (err != NOERR)
|
||||
{
|
||||
banche.put("CODTAB", abi);
|
||||
banche.put("S0", desc_banca);
|
||||
banche.write();
|
||||
}
|
||||
|
||||
banche.put("CODTAB", abicab);
|
||||
err = banche.read();
|
||||
if (err != NOERR)
|
||||
{
|
||||
banche.put("CODTAB", abicab);
|
||||
banche.put("S0", desc_agenzia);
|
||||
banche.write();
|
||||
}
|
||||
}
|
||||
|
||||
codcf += 1;
|
||||
}
|
||||
}
|
||||
@ -262,6 +291,7 @@ void TImporta_dati_app::importa_articoli(TImporta_dati_rec& rec)
|
||||
|
||||
TLocalisamfile anamag(LF_ANAMAG);
|
||||
TLocalisamfile umart(LF_UMART);
|
||||
TTable cat_mer("GRC");
|
||||
|
||||
for (bool ok = rec.move_first(); ok ;ok = rec.move_next())
|
||||
{
|
||||
@ -308,6 +338,15 @@ void TImporta_dati_app::importa_articoli(TImporta_dati_rec& rec)
|
||||
anamag.put(ANAMAG_USER1, rec.get(16).as_string()); //SaleOffset
|
||||
anamag.put(ANAMAG_USER2, rec.get(17).as_string()); //PurchaseOffset
|
||||
|
||||
cat_mer.put("CODTAB", rec.get(13).as_string());
|
||||
int err = cat_mer.read();
|
||||
if (err != NOERR)
|
||||
{
|
||||
cat_mer.put("CODTAB", rec.get(13).as_string());
|
||||
cat_mer.put("S0", rec.get(13).as_string());
|
||||
cat_mer.write();
|
||||
}
|
||||
|
||||
anamag.write();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user