Patch level : 12.0 no-patch
Files correlati : fp, bs Commento : aggiustate maschere e programmi. Aggiunto controllo sul codice articolo per SKNT
This commit is contained in:
parent
900c3ea035
commit
8d91712b08
@ -38,7 +38,7 @@ END
|
||||
|
||||
LIST F_CONDPAGSDI 4 20
|
||||
BEGIN
|
||||
PROMPT 20 1 "Tipo di pagamento "
|
||||
PROMPT 30 1 "Tipo di pagamento "
|
||||
FIELD S12
|
||||
ITEM "TP01|TP01 A rate"
|
||||
ITEM "TP02|TP02 Completo"
|
||||
|
@ -52,10 +52,10 @@ END
|
||||
|
||||
STRING F_MODPAG 4
|
||||
BEGIN
|
||||
PROMPT 20 4 "Tipo pagamento "
|
||||
PROMPT 30 4 "Tipo pagamento "
|
||||
SHEET "Codice|Tipo pagamento@32"
|
||||
INPUT S_MODPAG
|
||||
OUTPUT S_MODPAG
|
||||
INPUT F_MODPAG
|
||||
OUTPUT F_MODPAG
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD S12
|
||||
ITEM "MP01|contanti"
|
||||
|
@ -300,6 +300,7 @@ void TSknet_sync::load_their_origine(TISAM_recordset& out_set, const char* in_ta
|
||||
else
|
||||
if (err == _iskeynotfound)
|
||||
{
|
||||
bool keyfull = true;
|
||||
file.zero();
|
||||
FOR_EACH_ARRAY_ROW(pairs, r, row)
|
||||
{
|
||||
@ -309,6 +310,13 @@ void TSknet_sync::load_their_origine(TISAM_recordset& out_set, const char* in_ta
|
||||
tfld = row->get_int(); tfld--;
|
||||
def = row->get();
|
||||
|
||||
// Controllo che il campo sia corretto
|
||||
if (key_fields.get_pos(cfld) >= 0 && odbc.get(bfld).is_empty())
|
||||
{
|
||||
keyfull = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cfld[0] >= 'A' && cfld.find("->"))
|
||||
{
|
||||
const TString& nov = !odbc.get(bfld).is_empty() ? odbc.get(bfld).as_string() : (def.blank() ? "" : def);
|
||||
@ -318,7 +326,7 @@ void TSknet_sync::load_their_origine(TISAM_recordset& out_set, const char* in_ta
|
||||
file.put(cfld, nov);
|
||||
}
|
||||
}
|
||||
if (file.write() == 0)
|
||||
if (keyfull && file.write() == 0)
|
||||
_log->log(1, str);
|
||||
else
|
||||
{
|
||||
@ -427,6 +435,10 @@ void TSknet_sync::sync_anamag()
|
||||
TLocalisamfile umart(LF_UMART);
|
||||
TRectype rumart(LF_UMART);
|
||||
const TString& codpadre = odbcunit.get("CodPadre").as_string();
|
||||
// Quel coglione mette codart blank e non è in grado di sistemarlo...
|
||||
// E non so se ci sono solo spazi nel codice, quindi devo farlo a mano da codice
|
||||
if (codpadre.blank())
|
||||
continue;
|
||||
rumart.put("CODART", codpadre);
|
||||
rumart.put("NRIGA", 1);
|
||||
rumart.put("UM", "PZ");
|
||||
@ -463,7 +475,7 @@ void TSknet_sync::sync_anamag()
|
||||
const TString& codpadre = odbc.get("CodPadre").as_string();
|
||||
rccor.put(CODCORR_CODART, codpadre);
|
||||
rccor.put(CODCORR_NRIGA, 1);
|
||||
if (ccor.read(rccor, _isequal) == NOERR)
|
||||
if (codpadre.full() && ccor.read(rccor, _isequal) == NOERR)
|
||||
{
|
||||
while (rccor.get(CODCORR_CODART) == codpadre)
|
||||
{
|
||||
@ -483,8 +495,14 @@ void TSknet_sync::sync_anamag()
|
||||
int riga = 1;
|
||||
const TString& codpadre = odbc.get("CodPadre").as_string();
|
||||
const TString& codarticolo = odbc.get("CodArticolo").as_string();
|
||||
|
||||
if (codpadre.blank() || codarticolo.blank())
|
||||
continue;
|
||||
|
||||
rccor.put(CODCORR_CODART, codpadre);
|
||||
rccor.put(CODCORR_NRIGA, riga);
|
||||
|
||||
// E quel coglione mette sempre codart == codartalt...
|
||||
if (codpadre != codarticolo && ccor.read(rccor, _isequal) == NOERR)
|
||||
{
|
||||
while (add && rccor.get(CODCORR_CODART) == codpadre)
|
||||
@ -524,6 +542,8 @@ void TSknet_sync::sync_anamag()
|
||||
art.first(); // Useless??
|
||||
rart.zero();
|
||||
rart.put(ANAMAG_CODART, odbc.get("Cod_PK").as_string());
|
||||
if (odbc.get("Cod_PK").as_string().blank())
|
||||
continue;
|
||||
if (rart.read(art, _isequal) == NOERR)
|
||||
{
|
||||
static TString catCON;
|
||||
|
@ -580,9 +580,9 @@ bool TClifo_application::stato_handler(TMask_field& f, KEY k)
|
||||
bool TClifo_application::coddest_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
// Controllo che il codice immesso sia di 6/7 cifre in base al clifo
|
||||
if(f.focusdirty() && !f.empty() &&
|
||||
((f.mask().get_int(F_ALLEG) == 7 && f.get().size() != 6) || // P.A.
|
||||
(f.mask().get_int(F_ALLEG) != 7 && f.get().size() != 7))) // Privato
|
||||
if(f.focusdirty() && !f.empty() && f.to_check(k) &&
|
||||
((f.mask().get_int(F_ALLEG) == 7 && f.get().len() != 6) || // P.A.
|
||||
(f.mask().get_int(F_ALLEG) != 7 && f.get().len() != 7))) // Privato
|
||||
{
|
||||
warning_box("Lunghezza codice destinatario incoerente");
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ ENDPAGE
|
||||
|
||||
PAGE "Configurazione FP" 0 2 0 0
|
||||
|
||||
GROUPBOX DLG_NULL 78 6
|
||||
GROUPBOX DLG_NULL 78 10
|
||||
BEGIN
|
||||
PROMPT 1 1 "@BDatabase"
|
||||
END
|
||||
@ -50,7 +50,6 @@ STRING F_FLDDEST 50
|
||||
BEGIN
|
||||
PROMPT 2 6 "Destinazione Server "
|
||||
FLAGS ""
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_FLDUSRDEST 50
|
||||
|
@ -497,7 +497,7 @@ void TPA_mask::fill()
|
||||
row->add(rec.get(DOC_ANNO).as_int(), 1);
|
||||
row->add(rec.get(DOC_CODNUM).as_string());
|
||||
row->add(rec.get(DOC_TIPODOC).as_string());
|
||||
row->add(rec.get("400.S3").as_string().mid(37,4));
|
||||
row->add(td.tipo_doc_sdi());
|
||||
row->add(rec.get(DOC_NDOC).as_int());
|
||||
row->add(rec.get(DOC_DATADOC).as_date());
|
||||
row->add(rec.get(CFV_CODCF).as_int());
|
||||
|
@ -43,7 +43,7 @@ BEGIN
|
||||
FIELD TIPODOC
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP
|
||||
SELECT S12!=""
|
||||
SELECT S3[37,40]!=""
|
||||
INPUT CODTAB F_DATIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
@ -59,7 +59,7 @@ BEGIN
|
||||
FIELD TIPODOC
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP
|
||||
SELECT S12!=""
|
||||
SELECT S3[37,40]!=""
|
||||
INPUT CODTAB F_ATIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
|
Loading…
x
Reference in New Issue
Block a user