Patch level : 4.0
Files correlati : ca3 Ricompilazione Demo : [ ] Commento : Migliorato calcolo saldo precedente per correggere stampa bilancio CRPA git-svn-id: svn://10.65.10.50/trunk@15065 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f5d05ffce9
commit
c669c96a57
@ -235,7 +235,7 @@ END
|
|||||||
|
|
||||||
BOOLEAN F_BLOCCATO
|
BOOLEAN F_BLOCCATO
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 21 "Movimento bloccato"
|
PROMPT 2 20 "Movimento bloccato"
|
||||||
FIELD BLOCCATO
|
FIELD BLOCCATO
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#include <applicat.h>
|
#include "ca3.h"
|
||||||
|
#include "calib01.h"
|
||||||
|
#include "calib02.h"
|
||||||
|
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
@ -10,10 +13,6 @@
|
|||||||
|
|
||||||
#include "../cg/cglib01.h"
|
#include "../cg/cglib01.h"
|
||||||
|
|
||||||
#include "ca3.h"
|
|
||||||
#include "calib01.h"
|
|
||||||
#include "calib02.h"
|
|
||||||
|
|
||||||
#include "ca3300.h"
|
#include "ca3300.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
@ -422,7 +421,7 @@ void TReport_bilancio_verifica::set_filter(const TMask& m, int row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool movimentati = m.get_int(F_STAMPAV) == 1;
|
const bool movimentati = m.get_int(F_STAMPAV) == 1;
|
||||||
const bool nonnulli = m.get_int(F_STAMPAV) == 2;
|
const bool nonnulli = m.get_int(F_STAMPAV) == 2;
|
||||||
|
|
||||||
TSheet_field& sf = m.sfield(F_RIGHE);
|
TSheet_field& sf = m.sfield(F_RIGHE);
|
||||||
TMask& sm = sf.sheet_mask();
|
TMask& sm = sf.sheet_mask();
|
||||||
@ -460,7 +459,7 @@ TSaldo_contrapposto& TSaldo_contrapposto::operator+=(const TSaldo_contrapposto&
|
|||||||
{
|
{
|
||||||
_preventivo += sc._preventivo;
|
_preventivo += sc._preventivo;
|
||||||
_consuntivo += sc._consuntivo;
|
_consuntivo += sc._consuntivo;
|
||||||
_saldo += sc._saldo;
|
_saldo += sc._saldo;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,7 +499,6 @@ public:
|
|||||||
virtual void requery();
|
virtual void requery();
|
||||||
virtual const TString& query_text() const { CHECK(false,"Perche' mi usi?"); return EMPTY_STRING; }
|
virtual const TString& query_text() const { CHECK(false,"Perche' mi usi?"); return EMPTY_STRING; }
|
||||||
|
|
||||||
|
|
||||||
virtual unsigned int columns() const;
|
virtual unsigned int columns() const;
|
||||||
virtual const TRecordset_column_info& column_info(unsigned int column) const;
|
virtual const TRecordset_column_info& column_info(unsigned int column) const;
|
||||||
virtual const TVariant& get(unsigned int column) const { return NULL_VARIANT; }
|
virtual const TVariant& get(unsigned int column) const { return NULL_VARIANT; }
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#include "calib02.h"
|
#include "calib02.h"
|
||||||
#include "camask.h"
|
#include "camask.h"
|
||||||
|
|
||||||
#include "../cg/cglib01.h"
|
|
||||||
|
|
||||||
#include <rdoc.h>
|
#include <rdoc.h>
|
||||||
#include <pconti.h>
|
#include <pconti.h>
|
||||||
|
|
||||||
@ -465,17 +463,17 @@ void TAnal_bill::reset()
|
|||||||
_conto = _costo = _commessa = _fase = "";
|
_conto = _costo = _commessa = _fase = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int TAnal_bill::indicatore_bilancio() const
|
TIndbil TAnal_bill::indicatore_bilancio() const
|
||||||
{
|
{
|
||||||
int indbil = 0;
|
TIndbil indbil = ib_null;
|
||||||
const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA);
|
const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA);
|
||||||
TString80 conto = _conto;
|
|
||||||
|
|
||||||
for (int i = info.levels() - 1; i >= 0 && indbil <= 0; i--)
|
TString80 conto = _conto; // Codice conto da affettare in sottolivelli
|
||||||
|
for (int i = info.levels() - 1; i >= 0 && indbil == ib_null; i--)
|
||||||
{
|
{
|
||||||
const int len = info.total_len(i);
|
conto.cut(info.total_len(i));
|
||||||
conto.cut(len);
|
const TRectype& pconana = cache().get(LF_PCONANA, conto);
|
||||||
indbil = atoi(cache().get(LF_PCONANA, conto, PCONANA_INDBIL));
|
indbil = TIndbil(pconana.get_int(PCONANA_INDBIL));
|
||||||
}
|
}
|
||||||
|
|
||||||
return indbil;
|
return indbil;
|
||||||
@ -497,8 +495,7 @@ const TString& TAnal_bill::testata() const
|
|||||||
TParagraph_string str(descr, 15);
|
TParagraph_string str(descr, 15);
|
||||||
TString& tmp = get_tmp_string();
|
TString& tmp = get_tmp_string();
|
||||||
tmp = str.get(0);
|
tmp = str.get(0);
|
||||||
if (str.items() > 1)
|
tmp << '\n' << str.get(1);
|
||||||
tmp << '\n' << str.get(1);
|
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -875,9 +872,8 @@ bool TSaldi_cache::saldo_movimenti(const TAnal_bill& b,
|
|||||||
return movim;
|
return movim;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TSaldi_cache::saldi(const TAnal_bill& bill,
|
bool TSaldi_cache::saldi(const TAnal_bill& bill, const TDate& dal, const TDate& al,
|
||||||
const TDate& dal, const TDate& al, word tipo,
|
word tipo, TSaldanal& s)
|
||||||
TSaldanal& s)
|
|
||||||
{
|
{
|
||||||
if (dal.ok() || al.ok())
|
if (dal.ok() || al.ok())
|
||||||
{
|
{
|
||||||
@ -886,10 +882,15 @@ bool TSaldi_cache::saldi(const TAnal_bill& bill,
|
|||||||
const int anno_prec = _esc.date2prevesc(dal);
|
const int anno_prec = _esc.date2prevesc(dal);
|
||||||
if (anno_prec > 0)
|
if (anno_prec > 0)
|
||||||
{
|
{
|
||||||
TImporto dare, avere;
|
// Calcolo il saldo precedente solo per attivita' e passivita'
|
||||||
saldo_annuale(bill, 0, anno_prec, tipo, dare, avere);
|
const TIndbil indbil = bill.indicatore_bilancio();
|
||||||
s._ini = dare;
|
if (indbil == ib_attivita || indbil == ib_passivita)
|
||||||
s._ini += avere;
|
{
|
||||||
|
TImporto dare, avere;
|
||||||
|
saldo_annuale(bill, 0, anno_prec, tipo, dare, avere);
|
||||||
|
s._ini = dare;
|
||||||
|
s._ini += avere;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tipo & _saldanal_ultima_imm)!=0)
|
if ((tipo & _saldanal_ultima_imm)!=0)
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
#include <report.h>
|
#include <report.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __CGLIB01_H
|
||||||
|
#include "../cg/cglib01.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TAnal_bill
|
// TAnal_bill
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -32,7 +36,7 @@ public:
|
|||||||
const TString& commessa() const;
|
const TString& commessa() const;
|
||||||
const TString& fase() const;
|
const TString& fase() const;
|
||||||
|
|
||||||
int indicatore_bilancio() const;
|
TIndbil indicatore_bilancio() const;
|
||||||
const TString& testata() const;
|
const TString& testata() const;
|
||||||
bool get(const TRectype& rec);
|
bool get(const TRectype& rec);
|
||||||
void reset();
|
void reset();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user