Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@18644 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
03365b1098
commit
9c3df44481
@ -128,6 +128,7 @@ BEGIN
|
||||
ITEM "Fine\nDot.Temp."
|
||||
ITEM "Importo\nfisso"
|
||||
ITEM "Prezzo\nDanneggiati@11"
|
||||
ITEM "Prezzo\nNolo@11"
|
||||
ITEM "Val.\nconvenzionale@13"
|
||||
ITEM "Articolo\nbloccato@9"
|
||||
ITEM "Calcolo\nconsegnato@9"
|
||||
@ -811,7 +812,7 @@ END
|
||||
|
||||
BOOLEAN S_RITAUDTTMP
|
||||
BEGIN
|
||||
PROMPT 56 15 "Ritiro automatico dotazione"
|
||||
PROMPT 55 15 "Ritiro automatico dotazione"
|
||||
FIELD RITAUDTTMP
|
||||
END
|
||||
|
||||
|
@ -28,7 +28,7 @@ protected:
|
||||
virtual bool doc_raggruppabile(const TDocumento & doc) const { return true; }
|
||||
virtual bool gestione_riferimenti() const { return true; }
|
||||
virtual bool riferimenti_in_testa() const { return true; }
|
||||
virtual TRiga_documento& find_or_create_row(TDocumento& doc_out, const TString& codart,const char lavtype);
|
||||
virtual TRiga_documento& find_or_create_row(TDocumento& doc_out, const TRiga_documento & rin,const char lavtype);
|
||||
|
||||
public:
|
||||
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||
@ -206,8 +206,9 @@ void TFatturazione_lavanderie::add_rows(TRiga_documento & rout, TRiga_documento
|
||||
} */
|
||||
}
|
||||
|
||||
TRiga_documento& TFatturazione_lavanderie::find_or_create_row(TDocumento& doc_out, const TString& codart,const char lavtype)
|
||||
TRiga_documento& TFatturazione_lavanderie::find_or_create_row(TDocumento& doc_out, const TRiga_documento & rin,const char lavtype)
|
||||
{
|
||||
const TString80 codart=rin.get(RDOC_CODARTMAG);
|
||||
int r;
|
||||
for (r=doc_out.physical_rows();r>0;r--)
|
||||
{
|
||||
@ -219,9 +220,10 @@ TRiga_documento& TFatturazione_lavanderie::find_or_create_row(TDocumento& doc_ou
|
||||
if (r<=0)
|
||||
{
|
||||
TRiga_documento& row=doc_out.new_row("01");
|
||||
row.put(RDOC_CODART,codart);
|
||||
row.put(RDOC_CODARTMAG,codart);
|
||||
row.put(RDOC_CHECKED,"X");
|
||||
doc_out.copy_data(row,rin);
|
||||
row.zero(RDOC_CODAGG1);
|
||||
row.zero(RDOC_QTA);
|
||||
row.zero(RDOC_QTAGG1);
|
||||
row.put("LVTYPE",lavtype);
|
||||
r=row.get_int(RDOC_NRIGA);
|
||||
}
|
||||
@ -244,32 +246,42 @@ void TFatturazione_lavanderie::create_row(TDocumento& doc_out, const TRiga_docum
|
||||
const real qta1=rin.get_real(RDOC_QTAGG1);
|
||||
|
||||
// Guardo se è una causale di rotto e se è abilitato nella testata del contratto la fatturazione dei rotti
|
||||
if (cau.get_bool("B4") && contr.get_int(LVCONDV_ADDCAPROT) && !qta1.is_zero())
|
||||
if (cau.get_bool("B3") && contr.get_int(LVCONDV_ADDCAPROT) && !qta1.is_zero())
|
||||
{
|
||||
TRiga_documento& rd=find_or_create_row(doc_out,codart,'D');
|
||||
TRiga_documento& rd=find_or_create_row(doc_out,rin,'D');
|
||||
rd.add(RDOC_QTA, qta1);
|
||||
rd.put(RDOC_PREZZO,contr.row(codart).get_real(LVRCONDV_PREZDAN));
|
||||
}
|
||||
if (cau.get_bool("B0")) // movimenta ritirato
|
||||
{
|
||||
const TCausale_magazzino& rit = cached_causale_magazzino(cau.get("S1"));
|
||||
TRiga_documento& rr=find_or_create_row(doc_out,codart,'R');
|
||||
TRiga_documento& rr=find_or_create_row(doc_out,rin,'R');
|
||||
rr.add(RDOC_QTA,rit.sgn(s_consmese) * qta1);
|
||||
}
|
||||
if (cau.get_bool("B1") && !qta.is_zero()) // movimenta consegnato
|
||||
{
|
||||
const TCausale_magazzino& con = cached_causale_magazzino(cau.get("S2"));
|
||||
|
||||
const real sgntmp=con.sgn(s_dottm);
|
||||
if (!sgntmp.is_zero() && contr.get_bool(LVCONDV_DOTTMPPRZD))
|
||||
{
|
||||
TRiga_documento& rt=find_or_create_row(doc_out,codart,'T');
|
||||
TRiga_documento& rt=find_or_create_row(doc_out,rin,'T');
|
||||
rt.add(RDOC_QTA,sgntmp * qta);
|
||||
rt.put(RDOC_PREZZO,contr.row(codart).get_real(LVRCONDV_PRZDTTMP));
|
||||
}
|
||||
else
|
||||
|
||||
const real sgndotin=con.sgn(s_dotin);
|
||||
if (!sgndotin.is_zero())
|
||||
{
|
||||
TRiga_documento& rc=find_or_create_row(doc_out,codart,'C');
|
||||
rc.add(RDOC_QTA,con.sgn(s_consmese) * qta);
|
||||
TRiga_documento& rc=find_or_create_row(doc_out,rin,'I');
|
||||
rc.add(RDOC_QTA,sgndotin * qta);
|
||||
}
|
||||
|
||||
const real sgncons=con.sgn(s_consmese);
|
||||
if (!sgncons.is_zero())
|
||||
{
|
||||
TRiga_documento& rc=find_or_create_row(doc_out,rin,'C');
|
||||
rc.add(RDOC_QTA,sgncons * qta);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,13 +10,12 @@ PAGE "Fatturazione" -1 -1 40 5
|
||||
DATE F_DADATA
|
||||
BEGIN
|
||||
PROMPT 2 1 "Fattura dal "
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
DATE F_ADATA
|
||||
BEGIN
|
||||
PROMPT 45 1 "al "
|
||||
FLAGS "H"
|
||||
FLAGS "A"
|
||||
END
|
||||
|
||||
DATE F_DATAFAT
|
||||
|
Loading…
x
Reference in New Issue
Block a user