Errori aga074-075-076-077
git-svn-id: svn://10.65.10.50/trunk@4394 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
62a19c614b
commit
f99445f2b0
@ -45,12 +45,13 @@ END
|
|||||||
LIST F_TIPO 50
|
LIST F_TIPO 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 4 "Tipo "
|
PROMPT 2 4 "Tipo "
|
||||||
ITEM " |Altro"
|
ITEM " |Esterna"
|
||||||
ITEM "CO|Consegna Ordini"
|
ITEM "1|Consegna Ordini"
|
||||||
ITEM "FB|Fatturazione bolle"
|
ITEM "2|Fatturazione bolle"
|
||||||
ITEM "SM|Scarico magazzino"
|
ITEM "3|Trasferimento a contabilita'"
|
||||||
ITEM "TC|Trasferimento a contabilita'"
|
ITEM "4|Copia documento"
|
||||||
FIELD S3
|
ITEM "5|Generazione effetti"
|
||||||
|
FIELD I0
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 6
|
GROUPBOX DLG_NULL 78 6
|
||||||
@ -281,6 +282,26 @@ BEGIN
|
|||||||
FIELD B4
|
FIELD B4
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_INTERATTIVO
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 18 "Interattivo"
|
||||||
|
FIELD B5
|
||||||
|
MESSAGE FALSE CLEAR,F_INSERT_MODE
|
||||||
|
MESSAGE TRUE ENABLE,F_INSERT_MODE
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_INSERT_MODE
|
||||||
|
BEGIN
|
||||||
|
PROMPT 42 18 "Attivo solo in creazione"
|
||||||
|
FIELD B6
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_APPLICAZIONE 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 19 "Applicazione esterna"
|
||||||
|
FIELD S3
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Parametri per raggruppamenti" -1 -1 78 20
|
PAGE "Parametri per raggruppamenti" -1 -1 78 20
|
||||||
@ -409,9 +430,10 @@ END
|
|||||||
|
|
||||||
BOOLEAN F_IGNORA_DESCRIZIONI
|
BOOLEAN F_IGNORA_DESCRIZIONI
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 15 "Ignora righe con la sola descrizione"
|
PROMPT 2 15 "Ignora righe con solo descrizione"
|
||||||
FIELD B3
|
FIELD B3
|
||||||
END
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "../cg/saldacon.h"
|
#include "../cg/saldacon.h"
|
||||||
#include "../ef/ef0101.h"
|
#include "../ef/ef0101.h"
|
||||||
#include "velib01.h"
|
#include "velib01.h"
|
||||||
|
#include "sconti.h"
|
||||||
#include "ve6300a.h"
|
#include "ve6300a.h"
|
||||||
|
|
||||||
// Enum di possibili errori
|
// Enum di possibili errori
|
||||||
@ -72,6 +73,8 @@ class TGenerazioneEffetti_app : public TApplication
|
|||||||
*_tab; // tabella di ditta
|
*_tab; // tabella di ditta
|
||||||
TTable *_cpg; // tabella condizioni di pagamento
|
TTable *_cpg; // tabella condizioni di pagamento
|
||||||
TDocumento *_doc; // documento corrente
|
TDocumento *_doc; // documento corrente
|
||||||
|
TCond_vendita *_condv; // Condizioni di vendita
|
||||||
|
TCliFor *_clifor; // Cliente
|
||||||
TPagamento *_pagamento; // pagamento corrente, ricalcolato prima di scrivere le scadenze
|
TPagamento *_pagamento; // pagamento corrente, ricalcolato prima di scrivere le scadenze
|
||||||
TBit_array _valid_array; // array dei tipi di pagamento validi per la generazione di effetti
|
TBit_array _valid_array; // array dei tipi di pagamento validi per la generazione di effetti
|
||||||
TArray_sheet *_num_sheet; // Array sheet selezionabile dei codici numerazione
|
TArray_sheet *_num_sheet; // Array sheet selezionabile dei codici numerazione
|
||||||
@ -277,7 +280,10 @@ bool TGenerazioneEffetti_app::create()
|
|||||||
_efffile = new TLocalisamfile(LF_EFFETTI);
|
_efffile = new TLocalisamfile(LF_EFFETTI);
|
||||||
_refffile = new TLocalisamfile(LF_REFFETTI);
|
_refffile = new TLocalisamfile(LF_REFFETTI);
|
||||||
_cessfile = new TLocalisamfile(LF_CESS);
|
_cessfile = new TLocalisamfile(LF_CESS);
|
||||||
_doc = new TDocumento;
|
_clifor = new TCliFor();
|
||||||
|
_condv = new TCond_vendita(_clifor);
|
||||||
|
_doc = new TDocumento();
|
||||||
|
_doc->set_condv(_condv);
|
||||||
_cpg = new TTable("%CPG");
|
_cpg = new TTable("%CPG");
|
||||||
_tab = new TLocalisamfile(LF_TAB);
|
_tab = new TLocalisamfile(LF_TAB);
|
||||||
_clifo = new TRelation(LF_CLIFO);
|
_clifo = new TRelation(LF_CLIFO);
|
||||||
@ -501,7 +507,13 @@ void TGenerazioneEffetti_app::build_group_key(TString& key)
|
|||||||
key.format("%7ld%3s",cli,(const char*)val);
|
key.format("%7ld%3s",cli,(const char*)val);
|
||||||
// campi opzionali
|
// campi opzionali
|
||||||
if (_group_by_date)
|
if (_group_by_date)
|
||||||
key << _doc->get(DOC_DATAINSC);
|
{
|
||||||
|
TString16 d(_doc->get(DOC_DATAINSC));
|
||||||
|
|
||||||
|
if (d.empty())
|
||||||
|
d = _doc->get(DOC_DATADOC);
|
||||||
|
key << d;
|
||||||
|
}
|
||||||
// Qual'e' il flag di sospensione d'imposta del documento ??
|
// Qual'e' il flag di sospensione d'imposta del documento ??
|
||||||
// if (_group_by_sosp)
|
// if (_group_by_sosp)
|
||||||
// key << _doc->get(DOC_????);
|
// key << _doc->get(DOC_????);
|
||||||
@ -616,7 +628,13 @@ void TGenerazioneEffetti_app::generate_bill() // bill in inglese significa anche
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TString16 data(_doc->get(DOC_DATAINSC));
|
TString16 data(_doc->get(DOC_DATAINSC));
|
||||||
|
|
||||||
|
if (data.empty())
|
||||||
|
data = _doc->get(DOC_DATADOC);
|
||||||
|
|
||||||
const real totale_fatt = _doc->totale_doc(); // Importo in valuta
|
const real totale_fatt = _doc->totale_doc(); // Importo in valuta
|
||||||
|
if (totale_fatt > ZERO)
|
||||||
|
{
|
||||||
const bool valuta = _doc->in_valuta();
|
const bool valuta = _doc->in_valuta();
|
||||||
const real change = _doc->cambio();
|
const real change = _doc->cambio();
|
||||||
|
|
||||||
@ -648,6 +666,8 @@ void TGenerazioneEffetti_app::generate_bill() // bill in inglese significa anche
|
|||||||
TRectype& reffetto = _refffile->curr();
|
TRectype& reffetto = _refffile->curr();
|
||||||
real importo;
|
real importo;
|
||||||
for (int i = 0; i < numrate && good(); i++)
|
for (int i = 0; i < numrate && good(); i++)
|
||||||
|
{
|
||||||
|
if (valid_type(_pagamento->tipo_rata(i)))
|
||||||
{
|
{
|
||||||
effetto.zero();
|
effetto.zero();
|
||||||
reffetto.zero();
|
reffetto.zero();
|
||||||
@ -696,6 +716,8 @@ void TGenerazioneEffetti_app::generate_bill() // bill in inglese significa anche
|
|||||||
}
|
}
|
||||||
else _error = write_error;
|
else _error = write_error;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_pagamento) delete _pagamento;
|
if (_pagamento) delete _pagamento;
|
||||||
if (good() && _can_write)
|
if (good() && _can_write)
|
||||||
@ -760,6 +782,10 @@ void TGenerazioneEffetti_app::group_bills()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TString16 data(_doc->get(DOC_DATAINSC));
|
TString16 data(_doc->get(DOC_DATAINSC));
|
||||||
|
|
||||||
|
if (data.empty())
|
||||||
|
data = _doc->get(DOC_DATADOC);
|
||||||
|
|
||||||
const real totale_fatt = _doc->totale_doc();
|
const real totale_fatt = _doc->totale_doc();
|
||||||
const bool valuta = _doc->in_valuta();
|
const bool valuta = _doc->in_valuta();
|
||||||
const real change = _doc->cambio();
|
const real change = _doc->cambio();
|
||||||
@ -907,7 +933,8 @@ void TGenerazioneEffetti_app::generate()
|
|||||||
if (codnum != _doc->get(DOC_CODNUM)) continue; // patch del cazzo
|
if (codnum != _doc->get(DOC_CODNUM)) continue; // patch del cazzo
|
||||||
if (doc_tipo_stato_ok()) // controlla che il tipo documento e lo stato siano coerenti con la ELD selezionata
|
if (doc_tipo_stato_ok()) // controlla che il tipo documento e lo stato siano coerenti con la ELD selezionata
|
||||||
{
|
{
|
||||||
if (valid_type(_doc->pagamento().tipo_rata(0))) // il tipo di pagamento puo' generare effetti ?
|
TPagamento & pag = _doc->pagamento();
|
||||||
|
if (pag.code().not_empty()) // && valid_type(pag.tipo_rata(0))) // il tipo di pagamento puo' generare effetti ?
|
||||||
{
|
{
|
||||||
const bool raggruppabile = _doc->get_bool(DOC_RAGGREFF);
|
const bool raggruppabile = _doc->get_bool(DOC_RAGGREFF);
|
||||||
if (!_raggruppa || (_raggruppa && !raggruppabile))
|
if (!_raggruppa || (_raggruppa && !raggruppabile))
|
||||||
@ -915,6 +942,9 @@ void TGenerazioneEffetti_app::generate()
|
|||||||
else
|
else
|
||||||
add_to_group_list();
|
add_to_group_list();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if (good() && _can_write)
|
||||||
|
change_doc_status();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ STRING F_CODICE_ELAB 8
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Codice elaborazione "
|
PROMPT 2 2 "Codice elaborazione "
|
||||||
FLAG "U"
|
FLAG "U"
|
||||||
USE %ELD SELECT S3 == "TC"
|
USE %ELD SELECT I0 == 5
|
||||||
INPUT CODTAB F_CODICE_ELAB
|
INPUT CODTAB F_CODICE_ELAB
|
||||||
DISPLAY "Codice" CODTAB
|
DISPLAY "Codice" CODTAB
|
||||||
DISPLAY "Descrizione@55" S0
|
DISPLAY "Descrizione@55" S0
|
||||||
@ -19,7 +19,7 @@ END
|
|||||||
STRING F_DESC_ELAB 50 39
|
STRING F_DESC_ELAB 50 39
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 35 2 ""
|
PROMPT 35 2 ""
|
||||||
USE %ELD KEY 2 SELECT S3 == "TC"
|
USE %ELD KEY 2 SELECT I0 == 4
|
||||||
INPUT S0 F_DESC_ELAB
|
INPUT S0 F_DESC_ELAB
|
||||||
DISPLAY "Descrizione@55" S0
|
DISPLAY "Descrizione@55" S0
|
||||||
DISPLAY "Codice" CODTAB
|
DISPLAY "Codice" CODTAB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user