Patch level : 12.0 no patch
Files correlati : Commento : Aggiornati programmi personalizzati per poterli compilare. Manca ps0883 git-svn-id: svn://10.65.10.50/branches/R_10_00@23224 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
05f6b4d1eb
commit
d327a5c85f
@ -293,7 +293,7 @@ bool TOmasa::transfer()
|
||||
TRecord_text curr;
|
||||
while (_trasfile->read(curr) == NOERR)
|
||||
{
|
||||
pi.setstatus(_trasfile->read_file()->tellg());
|
||||
pi.setstatus((long)_trasfile->read_file()->tellg());
|
||||
TString impstr = curr.get(F_VALOREVOCE);
|
||||
impstr.insert(".",11);
|
||||
negativo(impstr);
|
||||
|
@ -101,9 +101,11 @@ void TPartite2Euroasis::main_loop()
|
||||
const TDate oggi(TODAY);
|
||||
TString16 ora;
|
||||
time_t tempo;
|
||||
struct tm d;
|
||||
|
||||
time(&tempo);
|
||||
const struct tm* d = localtime(&tempo);
|
||||
ora.format("%02d:%02d:%02d", d->tm_hour, d->tm_min, d->tm_sec);
|
||||
localtime_s(&d, &tempo);
|
||||
ora.format("%02d:%02d:%02d", d.tm_hour, d.tm_min, d.tm_sec);
|
||||
const TDate dataanalisi = m.get_date(F_DATA);
|
||||
const int giorni = m.get_int(F_GIORNI);
|
||||
const TDate dataesposto = dataanalisi - (long) giorni;
|
||||
|
@ -159,6 +159,17 @@ public:
|
||||
void TDistribuzione_f24::elabora()
|
||||
{
|
||||
TFilename src_files = _mask->get(F_PATH_SRC);
|
||||
TString regexp = _mask->get(F_ELIMINA_EXPR);
|
||||
|
||||
if (regexp.starts_with("$"))
|
||||
regexp = regexp.mid(1);
|
||||
else
|
||||
if (!regexp.starts_with("*"))
|
||||
regexp.insert("*");
|
||||
if (regexp.ends_with("^"))
|
||||
regexp.rtrim(1);
|
||||
else
|
||||
regexp << "*";
|
||||
src_files.add("*.pdf");
|
||||
TString_array src_files_list;
|
||||
//dalla cartella origine prende tutti i files .pdf e crea una simpatica lista
|
||||
@ -219,6 +230,8 @@ void TDistribuzione_f24::elabora()
|
||||
}
|
||||
|
||||
//se invece crea/trova la cartella -> copia il file
|
||||
if (!curr_fname.match(regexp))
|
||||
{
|
||||
dst_file.add(curr_fname.name());
|
||||
|
||||
const bool copia_riuscita = fcopy(curr_fname, dst_file);
|
||||
@ -242,6 +255,7 @@ void TDistribuzione_f24::elabora()
|
||||
log.log(2, msg);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//eliminazione del file sorgente
|
||||
if (delete_src_files)
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define F_PATH_SRC 101
|
||||
#define F_PATH_DST 102
|
||||
#define F_ERASE_TRANSFERRED 103
|
||||
#define F_ELIMINA_EXPR 104
|
@ -20,6 +20,11 @@ BEGIN
|
||||
WARNING "Selezionare una cartella destinazione valida!"
|
||||
END
|
||||
|
||||
STRING F_ELIMINA_EXPR 80 45
|
||||
BEGIN
|
||||
PROMPT 1 3 "Elimina i seguenti file "
|
||||
END
|
||||
|
||||
BOOLEAN F_ERASE_TRANSFERRED
|
||||
BEGIN
|
||||
PROMPT 1 4 "Eliminare i file di origine dopo la copia"
|
||||
|
@ -42,24 +42,16 @@ TLif_iterator::TLif_iterator(TLif_transfer* ht) : _ht(ht), _pi(NULL)
|
||||
{
|
||||
const TRecnotype tot = _ht->recordset().items();
|
||||
TString title;
|
||||
|
||||
title << _ht->title() << ": " << tot << ' ' << TR("righe");
|
||||
if (tot > 1)
|
||||
_pi = new TProgind(tot, title, true, true);
|
||||
else
|
||||
::begin_wait();
|
||||
|
||||
if (tot > 0)
|
||||
_ht->log(title);
|
||||
|
||||
_rec = -1;
|
||||
}
|
||||
|
||||
TLif_iterator::~TLif_iterator()
|
||||
{
|
||||
if (_pi != NULL)
|
||||
delete _pi;
|
||||
else
|
||||
::end_wait();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -613,6 +613,7 @@ void TPE_mask::save_rate()
|
||||
|
||||
const TString& codval = get(F_CODVAL);
|
||||
const real cambio = get(F_CAMBIO);
|
||||
const bool eurocambio = get_bool(F_EURO);
|
||||
|
||||
bool zeroes = FALSE; // Esistono righe effetto da cancellare
|
||||
|
||||
|
@ -100,7 +100,7 @@ error_type TContabil_tsys::write_all(TDocumento& doc, TMovimentoPN_VE & moviment
|
||||
const int iva_items = movimento.iva_items();
|
||||
const int cg_items = movimento.cg_items();
|
||||
TCurrency c(ZERO);
|
||||
const real dec = c.decimals();
|
||||
const int dec = c.decimals();
|
||||
const real molt = pow(10.0, dec);
|
||||
|
||||
if (test_swap())
|
||||
|
@ -359,13 +359,13 @@ void TStatistiche_ANIVAL_csv_recordset::aggiungi_riga(TDocument_recordset& righe
|
||||
{
|
||||
//codart
|
||||
new_rec("");
|
||||
set(0, TVariant(codart));
|
||||
set(0, codart);
|
||||
//descrart
|
||||
const TString& descrart = cache().get(LF_ANAMAG, codart, ANAMAG_DESCR);
|
||||
set(1, TVariant(descrart));
|
||||
set(1, descrart);
|
||||
|
||||
set(28, TVariant(grmerc));
|
||||
set(29, TVariant(codcf));
|
||||
set(28, grmerc);
|
||||
set(29, codcf);
|
||||
|
||||
//re-sorting per codart (serve perchè solo il recordset ordinato è scannerizzabile con il plutonico metodo dicotomico)
|
||||
switch (tipo_stat)
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <execp.h>
|
||||
#include <progind.h>
|
||||
#include <reprint.h>
|
||||
#include <sheet.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "../or/orlib.h"
|
||||
@ -265,34 +266,34 @@ void TGenera_ordini_mask::update_sheet()
|
||||
TToken_string & row = sf.row(i);
|
||||
const TString & codart = recset.get(LF_ANAMAG, ANAMAG_CODART).as_string();
|
||||
|
||||
row.add(codart, sf.cid2index(F_CODART));
|
||||
row.add(codart, sf.cid2index(SA_CODART));
|
||||
art.read(codart);
|
||||
const real giac = art.giacenza_anno(codmag, "", anno);
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_DESCR).as_string(), sf.cid2index(F_DESCR));
|
||||
row.add(recset.get("UMART.UM").as_string(), sf.cid2index(F_UM));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_DESCR).as_string(), sf.cid2index(SA_DESCR));
|
||||
row.add(recset.get("UMART.UM").as_string(), sf.cid2index(SA_UM));
|
||||
|
||||
const long codforn = recset.get(LF_ANAMAG, ANAMAG_CODFORN).as_int();
|
||||
|
||||
row.add(codforn, sf.cid2index(F_FORNITORE));
|
||||
row.add(recset.get("CLIFO.RAGSOC").as_string(), sf.cid2index(F_RAGSOC));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_GIORNIRIOR).as_string(), sf.cid2index(F_LEADTIME));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_LOTTORIOR).as_string(), sf.cid2index(F_LOTTOMIN));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_DESCRAGG).as_string(), sf.cid2index(F_DESCRAGG));
|
||||
row.add(giac.string(), sf.cid2index(F_GIACENZA));
|
||||
row.add(codforn, sf.cid2index(SA_FORNITORE));
|
||||
row.add(recset.get("CLIFO.RAGSOC").as_string(), sf.cid2index(SA_RAGSOC));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_GIORNIRIOR).as_string(), sf.cid2index(SA_LEADTIME));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_LOTTORIOR).as_string(), sf.cid2index(SA_LOTTOMIN));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_DESCRAGG).as_string(), sf.cid2index(SA_DESCRAGG));
|
||||
row.add(giac.string(), sf.cid2index(SA_GIACENZA));
|
||||
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_PPCONF).as_string(), sf.cid2index(F_PPCONF));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER1).as_string(), sf.cid2index(F_USER1));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER2).as_string(), sf.cid2index(F_USER2));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER3).as_string(), sf.cid2index(F_USER3));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER4).as_string(), sf.cid2index(F_USER4));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER5).as_string(), sf.cid2index(F_USER5));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER6).as_string(), sf.cid2index(F_USER6));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER7).as_string(), sf.cid2index(F_USER7));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER8).as_string(), sf.cid2index(F_USER8));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER9).as_string(), sf.cid2index(F_USER9));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER10).as_string(), sf.cid2index(F_USER10));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_PPCONF).as_string(), sf.cid2index(SA_PPCONF));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER1).as_string(), sf.cid2index(SA_USER1));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER2).as_string(), sf.cid2index(SA_USER2));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER3).as_string(), sf.cid2index(SA_USER3));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER4).as_string(), sf.cid2index(SA_USER4));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER5).as_string(), sf.cid2index(SA_USER5));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER6).as_string(), sf.cid2index(SA_USER6));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER7).as_string(), sf.cid2index(SA_USER7));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER8).as_string(), sf.cid2index(SA_USER8));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER9).as_string(), sf.cid2index(SA_USER9));
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_USER10).as_string(), sf.cid2index(SA_USER10));
|
||||
const real disp = art.disponibilita(codes, get(F_MAG), NULL);
|
||||
row.add(disp.string(), sf.cid2index(F_DISPON));
|
||||
row.add(disp.string(), sf.cid2index(SA_DISPON));
|
||||
sf.check_row(i);
|
||||
if (check_expr)
|
||||
{
|
||||
@ -323,7 +324,7 @@ void TGenera_ordini_mask::update_orders()
|
||||
_order_changed = false;
|
||||
TWait_cursor hourglass;
|
||||
|
||||
TSheet_field& sh = sfield(F_ORDERS);
|
||||
TSheet_field& sh = sfield(F_DOCUMENTS);
|
||||
sh.destroy();
|
||||
|
||||
TString query;
|
||||
@ -350,7 +351,7 @@ void TGenera_ordini_mask::update_orders()
|
||||
TMask& m = sh.sheet_mask();
|
||||
TRelation& rel = *orders.cursor()->relation();
|
||||
|
||||
const int status_pos = sh.cid2index(S_STATODOC);
|
||||
const int status_pos = sh.cid2index(SD_STATODOC);
|
||||
for (bool ok = orders.move_first(); ok; ok = orders.move_next())
|
||||
{
|
||||
TToken_string& row = sh.row(-1);
|
||||
@ -387,7 +388,7 @@ void TGenera_ordini_mask::next_page(int p)
|
||||
}
|
||||
if (_order_changed)
|
||||
{
|
||||
const TSheet_field& sf = sfield(F_ORDERS);
|
||||
const TSheet_field& sf = sfield(F_DOCUMENTS);
|
||||
if (win() == sf.parent())
|
||||
update_orders();
|
||||
}
|
||||
@ -734,7 +735,7 @@ void TGenera_ordini_mask::on_idle()
|
||||
{
|
||||
//si posiziona sulla qta
|
||||
TSheet_field& sf_righe = sfield(F_ARTICLES);
|
||||
const int column = sf_righe.cid2index(F_QTA);
|
||||
const int column = sf_righe.cid2index(SA_QTA);
|
||||
sf_righe.select(_riga_da_selezionare, column, true);
|
||||
_riga_da_selezionare = -1;
|
||||
sf_righe.set_focus();
|
||||
@ -772,8 +773,8 @@ TGenera_ordini_mask::TGenera_ordini_mask()
|
||||
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
const int col = sh.cid2index(F_USER1 + i -1);
|
||||
TEditable_field & f = sh_mask.efield(F_USER1 + i - 1);
|
||||
const int col = sh.cid2index(SA_USER1 + i -1);
|
||||
TEditable_field & f = sh_mask.efield(SA_USER1 + i - 1);
|
||||
|
||||
if (c.get_bool("CHK_USER", "ve", i) && c.get_bool("USERDEF", "or", i))
|
||||
{
|
||||
@ -876,7 +877,7 @@ void TCreazione_ordini::aggiorna_stato_doc_orig(const TRectype& rdoc)
|
||||
void TCreazione_ordini::generate_carics()
|
||||
{
|
||||
TGenera_ordini_mask& mask = *_mask;
|
||||
TSheet_field& sf = mask.sfield(F_ORDERS);
|
||||
TSheet_field& sf = mask.sfield(F_DOCUMENTS);
|
||||
|
||||
long minforn = 999999L;
|
||||
long maxforn = 0L;
|
||||
@ -912,21 +913,21 @@ void TCreazione_ordini::generate_carics()
|
||||
{
|
||||
if (!pi.setstatus(n))
|
||||
break;
|
||||
if (row->get_char(sf.cid2index(S_DAEVADERE) == 'X'))
|
||||
if (row->get_char(sf.cid2index(SD_DAEVADERE) == 'X'))
|
||||
{
|
||||
const real qta = row->get(sf.cid2index(S_QTADAEVADERE));
|
||||
const real qta = row->get(sf.cid2index(SD_QTADAEVADERE));
|
||||
if (!qta.is_zero())
|
||||
{
|
||||
const TString8 codforn(row->get(sf.cid2index(S_FORNITORE)));
|
||||
const TString8 codforn(row->get(sf.cid2index(SD_FORNITORE)));
|
||||
const long cod = atol(codforn);
|
||||
TString8 key; key.format("F|%ld", cod);
|
||||
const TRectype& forn = cache().get(LF_CLIFO, key);
|
||||
const TDate datacons(row->get(sf.cid2index(S_DATACONS)));
|
||||
const TDate datacons(row->get(sf.cid2index(SD_DATACONS)));
|
||||
const TString4 codval(forn.get(CLI_CODVAL));
|
||||
const TRectype& forven = cache().get(LF_CFVEN, key);
|
||||
const TString4 codiva(forven.get(CFV_ASSFIS));
|
||||
const TString commessa = row->get(sf.cid2index(S_CDC));
|
||||
const TString fase = row->get(sf.cid2index(S_FSC));
|
||||
const TString commessa = row->get(sf.cid2index(SA_CDC));
|
||||
const TString fase = row->get(sf.cid2index(SA_FSC));
|
||||
|
||||
TDocumento* d = (TDocumento*)orders.objptr(codforn);
|
||||
if (d == NULL)
|
||||
@ -1022,9 +1023,9 @@ void TCreazione_ordini::generate_carics()
|
||||
rdoc.put(RDOC_CODAGG1, row->get(sf.cid2index(F_CODAGG1)));
|
||||
rdoc.put(RDOC_CODAGG2, row->get(sf.cid2index(F_CODAGG2)));
|
||||
*/
|
||||
const TDate dataord = row->get(sf.cid2index(S_DATADOC));
|
||||
const long ndoc = row->get_long(sf.cid2index(S_NUMDOC));
|
||||
const int nriga = row->get_int(sf.cid2index(S_NUMRIGA));
|
||||
const TDate dataord = row->get(sf.cid2index(SD_DATADOC));
|
||||
const long ndoc = row->get_long(sf.cid2index(SD_NUMDOC));
|
||||
const int nriga = row->get_int(sf.cid2index(SD_NUMRIGA));
|
||||
TRectype& rigord = righedoc.curr();
|
||||
rigord.put(RDOC_PROVV, 'D');
|
||||
rigord.put(RDOC_ANNO, dataord.year());
|
||||
@ -1141,19 +1142,19 @@ void TCreazione_ordini::generate_orders()
|
||||
if (!pi.setstatus(n))
|
||||
break;
|
||||
|
||||
const real qta = row->get(sf.cid2index(F_QTA));
|
||||
const real qta = row->get(sf.cid2index(SA_QTA));
|
||||
if (!qta.is_zero())
|
||||
{
|
||||
const TString8 codforn(row->get(sf.cid2index(F_FORNITORE)));
|
||||
const TString8 codforn(row->get(sf.cid2index(SA_FORNITORE)));
|
||||
const long cod = atol(codforn);
|
||||
TString8 key; key.format("F|%ld", cod);
|
||||
const TRectype& forn = cache().get(LF_CLIFO, key);
|
||||
const TDate datacons(row->get(sf.cid2index(F_DATACONS)));
|
||||
const TDate datacons(row->get(sf.cid2index(SA_DATACONS)));
|
||||
const TString4 codval(forn.get(CLI_CODVAL));
|
||||
const TRectype& forven = cache().get(LF_CFVEN, key);
|
||||
const TString4 codiva(forven.get(CFV_ASSFIS));
|
||||
const TString commessa = row->get(sf.cid2index(F_CDC));
|
||||
const TString fase = row->get(sf.cid2index(F_FSC));
|
||||
const TString commessa = row->get(sf.cid2index(SA_CDC));
|
||||
const TString fase = row->get(sf.cid2index(SA_FSC));
|
||||
|
||||
TDocumento* d = (TDocumento*)orders.objptr(codforn);
|
||||
if (d == NULL)
|
||||
@ -1203,23 +1204,23 @@ void TCreazione_ordini::generate_orders()
|
||||
}
|
||||
|
||||
TRiga_documento& rdoc = d->new_row("01");
|
||||
const TString codart(row->get(sf.cid2index(F_CODART)));
|
||||
const TString codart(row->get(sf.cid2index(SA_CODART)));
|
||||
|
||||
rdoc.put(RDOC_CODMAG, codmag);
|
||||
rdoc.put(RDOC_CODMAGC, codmagc);
|
||||
rdoc.put(RDOC_CODART, codart);
|
||||
rdoc.put(RDOC_CODARTMAG, codart);
|
||||
rdoc.put(RDOC_CHECKED, "X");
|
||||
rdoc.put(RDOC_DESCR, row->get(sf.cid2index(F_DESCR)));
|
||||
rdoc.put(RDOC_DESCR, row->get(sf.cid2index(SA_DESCR)));
|
||||
|
||||
const TString descr_agg(row->get(sf.cid2index(F_DESCRAGG)));
|
||||
const TString descr_agg(row->get(sf.cid2index(SA_DESCRAGG)));
|
||||
if (descr_agg.full())
|
||||
{
|
||||
rdoc.put(RDOC_DESCLUNGA, "X");
|
||||
rdoc.put(RDOC_DESCEST, descr_agg);
|
||||
}
|
||||
|
||||
rdoc.put(RDOC_UMQTA, row->get(sf.cid2index(F_UM)));
|
||||
rdoc.put(RDOC_UMQTA, row->get(sf.cid2index(SA_UM)));
|
||||
rdoc.put(RDOC_QTA, qta);
|
||||
rdoc.put(RDOC_DATACONS, datacons);
|
||||
|
||||
@ -1240,10 +1241,10 @@ void TCreazione_ordini::generate_orders()
|
||||
|
||||
for (int i = 0; i < 10 ; i++)
|
||||
if (_userfld.row(i).full())
|
||||
rdoc.put(_userfld.row(i), mask.get(F_USER1 + i));
|
||||
rdoc.put(_userfld.row(i), mask.get(SA_USER1 + i));
|
||||
|
||||
rdoc.put(RDOC_CODAGG1, row->get(sf.cid2index(F_CODAGG1)));
|
||||
rdoc.put(RDOC_CODAGG2, row->get(sf.cid2index(F_CODAGG2)));
|
||||
rdoc.put(RDOC_CODAGG1, row->get(sf.cid2index(SA_CODAGG1)));
|
||||
rdoc.put(RDOC_CODAGG2, row->get(sf.cid2index(SA_CODAGG2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void TListinoPs0816::import_listino(const TMask& m)
|
||||
TRecord_text curr;
|
||||
while (file.read(curr) == NOERR)
|
||||
{
|
||||
pi.setstatus(file.read_file()->tellg());
|
||||
pi.setstatus((long)file.read_file()->tellg());
|
||||
if (pi.iscancelled())
|
||||
break;
|
||||
codart = file.get_field(curr, "CODICE ARTICOLO");
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <defmask.h>
|
||||
#include <relation.h>
|
||||
#include <reprint.h>
|
||||
#include <sheet.h>
|
||||
|
||||
#include "ps0872.h"
|
||||
#include "ps0872200a.h"
|
||||
|
@ -284,7 +284,7 @@ bool TImpPaghe::transfer()
|
||||
TRecord_text curr;
|
||||
while (_trasfile->read(curr) == NOERR)
|
||||
{
|
||||
pi.setstatus(_trasfile->read_file()->tellg());
|
||||
pi.setstatus((long)_trasfile->read_file()->tellg());
|
||||
TString impstr = curr.get(F_IMPORTO);
|
||||
real importo(impstr);
|
||||
importo = importo/100;
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <defmask.h>
|
||||
#include <relation.h>
|
||||
#include <reprint.h>
|
||||
#include <sheet.h>
|
||||
|
||||
#include "ps0920.h"
|
||||
#include "ps0920100a.h"
|
||||
|
@ -467,17 +467,17 @@ void TClosure_msk::load_sheet()
|
||||
FOR_EACH_TOKEN(rif, tok)
|
||||
row.add(tok);
|
||||
|
||||
row.add(rec.get("S1"), s.cid2index(F_CODART));
|
||||
row.add(rec.get("I1"), s.cid2index(F_PALET1));
|
||||
row.add(rec.get("I2"), s.cid2index(F_SPEZZ1));
|
||||
row.add(rec.get("I3"), s.cid2index(F_PALET2));
|
||||
row.add(rec.get("I4"), s.cid2index(F_SPEZZ2));
|
||||
row.add(rec.get("B0"), s.cid2index(F_SALDO));
|
||||
row.add(rec.get("S6"), s.cid2index(F_LOTTO));
|
||||
row.add(rec.get("D0"), s.cid2index(F_DATA));
|
||||
row.add(rec.get("B1"), s.cid2index(F_EVASA));
|
||||
row.add(rec.get("D1"), s.cid2index(F_DATEVAS));
|
||||
row.add(rec.get("CODTAB"), s.cid2index(F_RECORD));
|
||||
row.add(rec.get("S1"), s.cid2index(S_CODART));
|
||||
row.add(rec.get("I1"), s.cid2index(S_PALET1));
|
||||
row.add(rec.get("I2"), s.cid2index(S_SPEZZ1));
|
||||
row.add(rec.get("I3"), s.cid2index(S_PALET2));
|
||||
row.add(rec.get("I4"), s.cid2index(S_SPEZZ2));
|
||||
row.add(rec.get("B0"), s.cid2index(S_SALDO));
|
||||
row.add(rec.get("S6"), s.cid2index(S_LOTTO));
|
||||
row.add(rec.get("D0"), s.cid2index(S_DATA));
|
||||
row.add(rec.get("B1"), s.cid2index(S_EVASA));
|
||||
row.add(rec.get("D1"), s.cid2index(S_DATEVAS));
|
||||
row.add(rec.get("CODTAB"), s.cid2index(S_RECORD));
|
||||
|
||||
s.check_row(s.items()-1, 0x3); // Do outputs and checks
|
||||
}
|
||||
@ -498,9 +498,11 @@ bool TClosure_msk::chiudi_righe(TString_array& records, TLog_report& log)
|
||||
const TDate datadoc = get(F_DATADOC);
|
||||
int err = NOERR;
|
||||
TLocalisamfile mmag(LF_TABMOD);
|
||||
FOR_EACH_ARRAY_ROW(records, r, row) if (row->get_char(0) > ' ' && row->get_char(F_EVASA-101) > ' ')
|
||||
TSheet_field& s = sfield(F_SHEET);
|
||||
|
||||
FOR_EACH_ARRAY_ROW(records, r, row) if (row->get_char(0) > ' ' && row->get_char(s.cid2index(S_EVASA)) > ' ')
|
||||
{
|
||||
const TString16 rec = row->get(F_RECORD-101);
|
||||
const TString16 rec = row->get(s.cid2index(S_RECORD));
|
||||
mmag.put("MOD", "PS");
|
||||
mmag.put("CUST", 920);
|
||||
mmag.put("COD", "MAG");
|
||||
@ -525,25 +527,27 @@ bool TClosure_msk::chiudi_righe(TString_array& records, TLog_report& log)
|
||||
|
||||
bool TClosure_msk::evadi_ordine(TEvasione_mmag& jail, TToken_string& row, TLista_documenti& doc_in, TLista_documenti& doc_out, TLog_report& log)
|
||||
{
|
||||
TSheet_field& s = sfield(F_SHEET);
|
||||
|
||||
for (int scelta = 1; scelta <= 2; scelta++)
|
||||
{
|
||||
const int pall = row.get_int((scelta == 1 ? F_PALET1 : F_PALET2) - 101);
|
||||
const int spez = row.get_int((scelta == 1 ? F_SPEZZ1 : F_SPEZZ2) - 101);
|
||||
const int pezzi = row.get_int((scelta == 1 ? F_PEZZ1 : F_PEZZ2 ) - 101);
|
||||
const int pall = row.get_int(s.cid2index(scelta == 1 ? S_PALET1 : S_PALET2));
|
||||
const int spez = row.get_int(s.cid2index(scelta == 1 ? S_SPEZZ1 : S_SPEZZ2));
|
||||
const int pezzi = row.get_int(s.cid2index(scelta == 1 ? S_PEZZ1 : S_PEZZ2 ));
|
||||
bool sld = false;
|
||||
if (row.get_char(F_SALDO - 101) > ' ')
|
||||
if (row.get_char(s.cid2index(S_SALDO)) > ' ')
|
||||
{
|
||||
if (scelta == 1)
|
||||
sld = row.get_int(F_PEZZ2 - 101) <= 0;
|
||||
sld = row.get_int(s.cid2index(S_PEZZ2)) <= 0;
|
||||
else
|
||||
sld = pezzi > 0;
|
||||
}
|
||||
if (pezzi > 0 || sld)
|
||||
{
|
||||
const TString codart = row.get(F_CODART - 101);
|
||||
const TString codart = row.get(S_CODART - 101);
|
||||
const long codcf = atol(codart.left(3));
|
||||
const int idriga = row.get_int(F_IDRIGA - 101);
|
||||
const int lotto = row.get_long(F_LOTTO - 101);
|
||||
const int idriga = row.get_int(S_IDRIGA - 101);
|
||||
const int lotto = row.get_long(S_LOTTO - 101);
|
||||
jail.evade(scelta, codart, idriga, pezzi, sld, lotto, pall, spez);
|
||||
|
||||
TString8 s, t;
|
||||
@ -554,7 +558,7 @@ bool TClosure_msk::evadi_ordine(TEvasione_mmag& jail, TToken_string& row, TLista
|
||||
const bool good = jail.elabora(doc_in, doc_out, get_date(F_DATADOC));
|
||||
if (good)
|
||||
{
|
||||
row.add("X", F_EVASA-101);
|
||||
row.add("X", S_EVASA-101);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -581,13 +585,15 @@ bool TClosure_msk::elabora(TString_array& records, TLog_report& log)
|
||||
|
||||
const long codcf = records.row(0).get_long(1);
|
||||
const int indsped = records.row(0).get_int(2);
|
||||
TSheet_field& s = sfield(F_SHEET);
|
||||
TDocumento* mmag = NULL;
|
||||
|
||||
FOR_EACH_ARRAY_ROW(records, r, row)
|
||||
{
|
||||
const char provv = 'D';
|
||||
const int anno = row->get_int (F_ANNO -101);
|
||||
const TString4 codnum = row->get (F_CODNUM-101);
|
||||
const long ndoc = row->get_long(F_NDOC -101);
|
||||
const int anno = row->get_int (s.cid2index(S_ANNO));
|
||||
const TString4 codnum = row->get (s.cid2index(S_CODNUM));
|
||||
const long ndoc = row->get_long(s.cid2index(S_NDOC));
|
||||
if (!doc_in.find(provv, anno, codnum, ndoc))
|
||||
{
|
||||
if (mmag != NULL && doc_in.items())
|
||||
@ -666,8 +672,8 @@ bool TClosure_msk::elabora()
|
||||
|
||||
FOR_EACH_SHEET_ROW(s, r, row) if (row->get_char(0) > ' ')
|
||||
{
|
||||
const long codcf = row->get_long(s.cid2index(F_CLIFO));
|
||||
const int indsped = row->get_int(s.cid2index(F_INDSPED));
|
||||
const long codcf = row->get_long(s.cid2index(S_CLIFO));
|
||||
const int indsped = row->get_int(s.cid2index(S_INDSPED));
|
||||
if (codcf != last_cf || indsped != last_ind)
|
||||
{
|
||||
elabora(records, log);
|
||||
@ -718,7 +724,7 @@ bool TClosure_msk::cancella()
|
||||
// Elminazione su richiesta
|
||||
if (k > 0 && noyes_box(FR("Confermare l'eliminazione di %ld record?"), k))
|
||||
{
|
||||
const int nRec = s.cid2index(F_RECORD);
|
||||
const int nRec = s.cid2index(S_RECORD);
|
||||
TLocalisamfile mmag(LF_TABMOD);
|
||||
TString16 n;
|
||||
FOR_EACH_SHEET_ROW(s, r2, row2) if (row2->starts_with("X"))
|
||||
@ -746,13 +752,13 @@ bool TClosure_msk::salva()
|
||||
|
||||
TSheet_field& s = sfield(F_SHEET);
|
||||
|
||||
const int nRec = s.cid2index(F_RECORD);
|
||||
const int nPa1 = s.cid2index(F_PALET1);
|
||||
const int nSp1 = s.cid2index(F_SPEZZ1);
|
||||
const int nPa2 = s.cid2index(F_PALET2);
|
||||
const int nSp2 = s.cid2index(F_SPEZZ2);
|
||||
const int nSld = s.cid2index(F_SALDO);
|
||||
const int nLot = s.cid2index(F_LOTTO);
|
||||
const int nRec = s.cid2index(S_RECORD);
|
||||
const int nPa1 = s.cid2index(S_PALET1);
|
||||
const int nSp1 = s.cid2index(S_SPEZZ1);
|
||||
const int nPa2 = s.cid2index(S_PALET2);
|
||||
const int nSp2 = s.cid2index(S_SPEZZ2);
|
||||
const int nSld = s.cid2index(S_SALDO);
|
||||
const int nLot = s.cid2index(S_LOTTO);
|
||||
|
||||
TLocalisamfile mmag(LF_TABMOD);
|
||||
TString16 n;
|
||||
@ -869,18 +875,18 @@ bool TClosure_msk::on_field_event(TOperable_field& o, TField_event e , long joll
|
||||
enable(DLG_ELABORA, !one_empty);
|
||||
}
|
||||
break;
|
||||
case F_PALET1:
|
||||
case F_SPEZZ1:
|
||||
case F_PALET2:
|
||||
case F_SPEZZ2:
|
||||
case S_PALET1:
|
||||
case S_SPEZZ1:
|
||||
case S_PALET2:
|
||||
case S_SPEZZ2:
|
||||
if (e == fe_modify || e == fe_init)
|
||||
{
|
||||
TMask& sm = o.mask();
|
||||
const TRectype& art = cache().get(LF_ANAMAG, sm.get(F_CODART));
|
||||
const TRectype& art = cache().get(LF_ANAMAG, sm.get(S_CODART));
|
||||
const int pps = art.get_int(ANAMAG_PPCOLLO); // Pezzi per spezzone
|
||||
const int ppp = art.get_int(ANAMAG_USER1) * art.get_int(ANAMAG_USER2) * pps; // Pezzi per pallet
|
||||
const real peso = art.get(ANAMAG_PESO);
|
||||
const int id = o.dlg() < F_PALET2 ? F_PALET1 : F_PALET2;
|
||||
const int id = o.dlg() < S_PALET2 ? S_PALET1 : S_PALET2;
|
||||
sm.set(id+2, sm.get_int(id)*ppp + sm.get_int(id+1)*pps);
|
||||
sm.set(id+3, real(peso * sm.get_int(id+2)));
|
||||
|
||||
@ -888,8 +894,8 @@ bool TClosure_msk::on_field_event(TOperable_field& o, TField_event e , long joll
|
||||
enable(DLG_SAVEREC, _dirty = true);
|
||||
}
|
||||
break;
|
||||
case F_SALDO:
|
||||
case F_LOTTO:
|
||||
case S_SALDO:
|
||||
case S_LOTTO:
|
||||
if (e == fe_modify && !_dirty && is_running())
|
||||
enable(DLG_SAVEREC, _dirty = true);
|
||||
break;
|
||||
|
@ -139,41 +139,41 @@ ENDMASK
|
||||
|
||||
PAGE "Riga" -1 -1 75 12
|
||||
|
||||
BOOLEAN F_SELECT
|
||||
BOOLEAN S_SELECT
|
||||
BEGIN
|
||||
PROMPT 1 1 "Selezione"
|
||||
END
|
||||
|
||||
DATE F_DATA
|
||||
DATE S_DATA
|
||||
BEGIN
|
||||
PROMPT 21 1 "Data "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_RECORD 10
|
||||
NUMBER S_RECORD 10
|
||||
BEGIN
|
||||
PROMPT 54 1 "Record "
|
||||
FLAGS "DZ"
|
||||
END
|
||||
|
||||
NUMBER F_CLIFO 6
|
||||
NUMBER S_CLIFO 6
|
||||
BEGIN
|
||||
PROMPT 1 2 "Cliente "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CLIFO
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
OUTPUT S_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
FLAGS "DG"
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
STRING S_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 21 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_INDSPED 3
|
||||
NUMBER S_INDSPED 3
|
||||
BEGIN
|
||||
PROMPT 1 3 "Indirizzo "
|
||||
/*
|
||||
@ -186,43 +186,43 @@ BEGIN
|
||||
FLAGS "DG"
|
||||
END
|
||||
|
||||
STRING F_CODNUM 4
|
||||
STRING S_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 1 4 "Ordine "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
NUMBER S_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 17 4 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_NDOC 7
|
||||
NUMBER S_NDOC 7
|
||||
BEGIN
|
||||
PROMPT 23 4 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_IDRIGA 4
|
||||
NUMBER S_IDRIGA 4
|
||||
BEGIN
|
||||
PROMPT 33 4 "Riga "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BOOLEAN F_EVASA
|
||||
BOOLEAN S_EVASA
|
||||
BEGIN
|
||||
PROMPT 48 4 "Evasa il"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATEVAS
|
||||
DATE S_DATEVAS
|
||||
BEGIN
|
||||
PROMPT 61 4 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CODART 20
|
||||
STRING S_CODART 20
|
||||
BEGIN
|
||||
PROMPT 1 6 "Articolo "
|
||||
USE LF_ANAMAG
|
||||
@ -232,7 +232,7 @@ BEGIN
|
||||
FLAGS "DG"
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
STRING S_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 10 7 ""
|
||||
FLAGS "D"
|
||||
@ -263,37 +263,37 @@ BEGIN
|
||||
PROMPT 1 9 "@bI scelta"
|
||||
END
|
||||
|
||||
NUMBER F_LOTTO 5
|
||||
NUMBER S_LOTTO 5
|
||||
BEGIN
|
||||
PROMPT 51 8 "Lotto "
|
||||
END
|
||||
|
||||
NUMERO F_PALET1 3
|
||||
NUMERO S_PALET1 3
|
||||
BEGIN
|
||||
PROMPT 11 9 ""
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
NUMERO F_SPEZZ1 3
|
||||
NUMERO S_SPEZZ1 3
|
||||
BEGIN
|
||||
PROMPT 21 9 ""
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
NUMERO F_PEZZ1 7
|
||||
NUMERO S_PEZZ1 7
|
||||
BEGIN
|
||||
PROMPT 31 9 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMERO F_PESO1 7
|
||||
NUMERO S_PESO1 7
|
||||
BEGIN
|
||||
PROMPT 41 9 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
|
||||
BOOLEAN F_SALDO
|
||||
BOOLEAN S_SALDO
|
||||
BEGIN
|
||||
PROMPT 51 9 "Saldo"
|
||||
END
|
||||
@ -303,25 +303,25 @@ BEGIN
|
||||
PROMPT 1 10 "@bII scelta"
|
||||
END
|
||||
|
||||
NUMERO F_PALET2 3
|
||||
NUMERO S_PALET2 3
|
||||
BEGIN
|
||||
PROMPT 11 10 ""
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
NUMERO F_SPEZZ2 3
|
||||
NUMERO S_SPEZZ2 3
|
||||
BEGIN
|
||||
PROMPT 21 10 ""
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
NUMERO F_PEZZ2 7
|
||||
NUMERO S_PEZZ2 7
|
||||
BEGIN
|
||||
PROMPT 31 10 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMERO F_PESO2 7
|
||||
NUMERO S_PESO2 7
|
||||
BEGIN
|
||||
PROMPT 41 10 ""
|
||||
FLAGS "D"
|
||||
|
@ -95,7 +95,7 @@ void TLis2fil::import(const TString& filename)
|
||||
TRecord_text curr;
|
||||
while (trasfile.read(curr) == NOERR)
|
||||
{
|
||||
pi.setstatus(trasfile.read_file()->tellg());
|
||||
pi.setstatus((long)trasfile.read_file()->tellg());
|
||||
trasfile.autosave(rel, curr);
|
||||
trasfile.save_price(curr, _um);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ TMaskPt00031::TMaskPt00031()
|
||||
{
|
||||
TRelation * r = new TRelation(LF_DOC);
|
||||
r->file().set_curr(new TDocumento);
|
||||
_cur = new TCursor(r, "", 2);
|
||||
_cur = new TCursor(r, "", 4);
|
||||
((TButton_field&) field(DLG_SAVEREC)).set_exit_key(K_ENTER);
|
||||
}
|
||||
|
||||
@ -145,10 +145,11 @@ void TMaskPt00031::update_sheet()
|
||||
from.put(DOC_CODCF, codcli);
|
||||
from.put(DOC_ANNO, get(F_ANNO));
|
||||
from.put(DOC_PROVV, "D");
|
||||
from.put(DOC_CODNUM, get(F_NUM));
|
||||
|
||||
TRectype to(from);
|
||||
TString filter;
|
||||
filter << "(CODNUM==\"" << get(F_NUM) << "\")&&(G1:TOTDOC>IMPPAGATO)";
|
||||
filter << "(" << DOC_ACCSALDO "!=\"X\")";
|
||||
_cur->setfilter(filter);
|
||||
_cur->setregion(from, to);
|
||||
TDocumento & doc = (TDocumento &)_cur->curr();
|
||||
@ -250,6 +251,7 @@ void TIncassoFatture0003::main_loop()
|
||||
|
||||
pagato += val;
|
||||
doc.put(DOC_IMPPAGATO, pagato);
|
||||
doc.put(DOC_ACCSALDO, (bool)(pagato >= doc.totale_doc()));
|
||||
doc.rewrite();
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ BUTTON DLG_SAVEREC 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 "~Registra"
|
||||
PICTURE TOOL_SAVEREC
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
#include <helpbar.h>
|
||||
|
@ -225,7 +225,7 @@ bool TImpDoc0195::transfer_testata()
|
||||
|
||||
while (_trasfile->read(curr) == NOERR && !pi.iscancelled() && err == NOERR)
|
||||
{
|
||||
pi.setstatus(_trasfile->read_file()->tellg());
|
||||
pi.setstatus((long) _trasfile->read_file()->tellg());
|
||||
|
||||
if (!decifra_codici (curr, codnum, tipodoc))
|
||||
continue;
|
||||
@ -393,7 +393,7 @@ bool TImpDoc0195::transfer_dettaglio()
|
||||
curr.set_type("D");
|
||||
while (_trasfile->read(curr) == NOERR && !pi.iscancelled() && err == NOERR)
|
||||
{
|
||||
pi.setstatus(_trasfile->read_file()->tellg());
|
||||
pi.setstatus((long) _trasfile->read_file()->tellg());
|
||||
|
||||
//decifra i codici numerazione e tipo documento
|
||||
if (!decifra_codici (curr, codnum, tipodoc))
|
||||
|
Loading…
x
Reference in New Issue
Block a user