Patch level : 10.0 358
Files correlati : ba3.exe Ricompilazione Demo : [ ] Commento Bug 0001350 cg5.exe -1 - Paramtri di contabilità Lanciando il pgm Parametri ditta e poi premendo "FINE" evidenzia qs errore: "Non esiste probabilmente nessun libro giornale per l'anno 2009" . La base dati in oggetto è:FRATELLIALDROVANDI; è stata posta nell'area FTP nella cartella Ilaria. In riferimento a qs errore, verificando i registri inseriti, scorro con i pulsanti avanti e indietro l'anno 2009, mi si blocca sul registro degli acquisti, anno 2009, premendo FINE evidenzia l'errore "Attività non prevista per questa ditta". L'attività pero' esiste..... git-svn-id: svn://10.65.10.50/trunk@19079 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c9da0b30fd
commit
85fc022fbf
@ -4,6 +4,7 @@
|
|||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
|
#include <utility.h>
|
||||||
|
|
||||||
#include <attiv.h>
|
#include <attiv.h>
|
||||||
|
|
||||||
@ -58,36 +59,35 @@ void TParametri_ditta::check_registers(int year)
|
|||||||
const byte R_ALL = R_ACQ | R_VEN;
|
const byte R_ALL = R_ACQ | R_VEN;
|
||||||
TRelation relreg("REG");
|
TRelation relreg("REG");
|
||||||
TRectype & reg = relreg.curr();
|
TRectype & reg = relreg.curr();
|
||||||
bool is_giornale = FALSE;
|
bool is_giornale = false;
|
||||||
|
|
||||||
for (int i = 0; i < _atts.items(); i++)
|
for (int i = 0; i < _atts.items(); i++)
|
||||||
{
|
{
|
||||||
byte flags = 0x00;
|
byte flags = 0x00;
|
||||||
const TString& att = (TString&)_atts[i];
|
const TString& att = (TString&)_atts[i];
|
||||||
TString filter;
|
|
||||||
|
|
||||||
reg.put("CODTAB", year);
|
reg.put("CODTAB", year);
|
||||||
filter.format("(S8==\"\")||(S8==\"%s\")", (const char *) att);
|
|
||||||
|
|
||||||
TCursor cur(&relreg, filter, 1, ®, ®);
|
TCursor cur(&relreg, "I0==5", 1, ®, ®);
|
||||||
|
|
||||||
|
is_giornale = cur.items() > 0;
|
||||||
|
|
||||||
|
const TString80 filter(format("(S8==\"\")||(S8==\"%s\")", (const char *) att));
|
||||||
|
|
||||||
|
cur.setfilter(filter);
|
||||||
const TRecnotype items = cur.items();
|
const TRecnotype items = cur.items();
|
||||||
|
|
||||||
cur.freeze();
|
|
||||||
for (cur = 0L; (flags != R_ALL || !is_giornale) && (cur.pos() < items); ++cur)
|
for (cur = 0L; (flags != R_ALL || !is_giornale) && (cur.pos() < items); ++cur)
|
||||||
{
|
{
|
||||||
if (reg.get_int("I0") == 5)
|
switch (reg.get_int("I0"))
|
||||||
is_giornale = TRUE;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
switch (reg.get_int("I0"))
|
case 1: // vendite
|
||||||
{
|
flags |= R_VEN; break;
|
||||||
case 1: // vendite
|
case 2: // acquisti
|
||||||
flags |= R_VEN; break;
|
flags |= R_ACQ; break;
|
||||||
case 2: // acquisti
|
default:
|
||||||
flags |= R_ACQ; break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flags < R_ALL)
|
if (flags < R_ALL)
|
||||||
|
@ -159,7 +159,7 @@ STRING F_ATTIVITA 5
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 8 "Codice attivita' "
|
PROMPT 1 8 "Codice attivita' "
|
||||||
FIELD S8
|
FIELD S8
|
||||||
FLAGS "URZ"
|
FLAGS "UZ"
|
||||||
GROUP GRP_VENDITE GRP_ACQUISTI GRP_RIEPIVA GRP_NOINTENTI
|
GROUP GRP_VENDITE GRP_ACQUISTI GRP_RIEPIVA GRP_NOINTENTI
|
||||||
USE LF_ATTIV
|
USE LF_ATTIV
|
||||||
INPUT CODDITTA F_CODDITTA SELECT
|
INPUT CODDITTA F_CODDITTA SELECT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user