Corretta gestione anni di esercizio brevi (meno di 4 cifre) in stampa schede magazzino
git-svn-id: svn://10.65.10.50/branches/R_10_00@22894 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7e2e92a480
commit
c9dc6931b2
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#define VALUE_NOT_SET "~~"
|
#define VALUE_NOT_SET "~~"
|
||||||
|
|
||||||
TCausale_magazzino& get_cau(const char* codcaus)
|
inline TCausale_magazzino& get_cau(const char* codcaus)
|
||||||
{ return cached_causale_magazzino(codcaus); }
|
{ return cached_causale_magazzino(codcaus); }
|
||||||
|
|
||||||
class TForm_schedemag : public TForm_stampemg
|
class TForm_schedemag : public TForm_stampemg
|
||||||
@ -555,7 +555,7 @@ void TForm_schedemag::set_date_limite(const int anno, const TDate& d, const TDat
|
|||||||
TEsercizi_contabili ec;
|
TEsercizi_contabili ec;
|
||||||
|
|
||||||
_annoes = anno;
|
_annoes = anno;
|
||||||
_anno_prec.format("%4d",ec.pred(anno));
|
_anno_prec.format("%04d",ec.pred(anno));
|
||||||
_magazzino_chiuso = (ec.pred(anno) == 0) || !(ec.esercizio(atoi(_anno_prec)).chiusura_mag().empty());
|
_magazzino_chiuso = (ec.pred(anno) == 0) || !(ec.esercizio(atoi(_anno_prec)).chiusura_mag().empty());
|
||||||
|
|
||||||
_data_inizio = d;
|
_data_inizio = d;
|
||||||
@ -705,12 +705,12 @@ void TStampa_schede_mag::setprint_perarticoli()
|
|||||||
char subordine =m.get(F_SUBORDINE)[0];
|
char subordine =m.get(F_SUBORDINE)[0];
|
||||||
_cur = _form->cursor();
|
_cur = _form->cursor();
|
||||||
// filtering ANNOES
|
// filtering ANNOES
|
||||||
filter << '(' << LF_MOVMAG << "->ANNOES==" << m.get(F_ANNOES)<< ")&&" ;
|
filter << "(STR(" << LF_MOVMAG << "->ANNOES==" << m.get(F_ANNOES)<< "))&&" ;
|
||||||
// filtering from/to MAGS
|
// filtering from/to MAGS
|
||||||
if (m.get(F_DAMAG)[0])
|
if (m.get(F_DAMAG).full())
|
||||||
filter << "(" << LF_RMOVMAG << "->CODMAG[1,3]>=" <<'"' << m.get(F_DAMAG)<< "\")&&" ;
|
filter << "(" << LF_RMOVMAG << "->CODMAG[1,3]>=" <<'"' << m.get(F_DAMAG) << "\")&&" ;
|
||||||
if (m.get(F_AMAG)[0])
|
if (m.get(F_AMAG).full())
|
||||||
filter << "(" << LF_RMOVMAG << "->CODMAG[1,3]<=" <<'"' << m.get(F_AMAG)<< "\")&&" ;
|
filter << "(" << LF_RMOVMAG << "->CODMAG[1,3]<=" <<'"' << m.get(F_AMAG) << "\")&&" ;
|
||||||
|
|
||||||
if (m.get(F_DADEP).full())
|
if (m.get(F_DADEP).full())
|
||||||
filter << "(" << LF_RMOVMAG << "->CODMAG[4,]>=" <<'"' << m.get(F_DADEP)<< "\")&&" ;
|
filter << "(" << LF_RMOVMAG << "->CODMAG[4,]>=" <<'"' << m.get(F_DADEP)<< "\")&&" ;
|
||||||
@ -808,6 +808,11 @@ void TStampa_schede_mag::setprint_perarticoli()
|
|||||||
rmovmag->setregion(darecr,arecr,tilde);
|
rmovmag->setregion(darecr,arecr,tilde);
|
||||||
if (tiposcheda() != s_giac)
|
if (tiposcheda() != s_giac)
|
||||||
rmovmag->cursor().set_filterfunction(cau_filter);
|
rmovmag->cursor().set_filterfunction(cau_filter);
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
rmovmag->first();
|
||||||
|
#endif
|
||||||
|
|
||||||
_cur->relation()->replace(rmovmag,1, _form->rmov_joinexp() );
|
_cur->relation()->replace(rmovmag,1, _form->rmov_joinexp() );
|
||||||
|
|
||||||
TLocalisamfile *mag=new TLocalisamfile(LF_MAG);
|
TLocalisamfile *mag=new TLocalisamfile(LF_MAG);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user