Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :modulo co allineato alla 3.2 git-svn-id: svn://10.65.10.50/trunk@16918 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5b0dd3a10b
commit
31f2f059a5
@ -188,7 +188,6 @@ void TImportazioneConf::main_loop()
|
|||||||
r.put(RDOC_SCONTO, ritprezzo);
|
r.put(RDOC_SCONTO, ritprezzo);
|
||||||
}
|
}
|
||||||
update_spese_doc(codmercato, *d);
|
update_spese_doc(codmercato, *d);
|
||||||
d->stato(d->tipo().stato_finale_inserimento());
|
|
||||||
d->write();
|
d->write();
|
||||||
delete d;
|
delete d;
|
||||||
d = NULL;
|
d = NULL;
|
||||||
@ -273,7 +272,6 @@ void TImportazioneConf::main_loop()
|
|||||||
r.put(RDOC_SCONTO, ritprezzo);
|
r.put(RDOC_SCONTO, ritprezzo);
|
||||||
}
|
}
|
||||||
update_spese_doc(codmercato, *d);
|
update_spese_doc(codmercato, *d);
|
||||||
d->stato(d->tipo().stato_finale_inserimento());
|
|
||||||
d->write();
|
d->write();
|
||||||
}
|
}
|
||||||
input_docs.close();
|
input_docs.close();
|
||||||
|
@ -12,9 +12,6 @@ int main(int argc, char** argv)
|
|||||||
case 3:
|
case 3:
|
||||||
co1400(argc, argv); // Fatturazione Conferimenti
|
co1400(argc, argv); // Fatturazione Conferimenti
|
||||||
break;
|
break;
|
||||||
//case 4:
|
|
||||||
// co1500(argc, argv); // Invio mov.coop. a TeamSystem
|
|
||||||
// break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
1
co/co1.h
1
co/co1.h
@ -1,3 +1,2 @@
|
|||||||
int co1300(int argc, char* argv[]);
|
int co1300(int argc, char* argv[]);
|
||||||
int co1400(int argc, char* argv[]);
|
int co1400(int argc, char* argv[]);
|
||||||
//int co1500(int argc, char* argv[]);
|
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <automask.h>
|
#include <automask.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
#include <textset.h>
|
|
||||||
|
|
||||||
#include "co1.h"
|
#include "co1.h"
|
||||||
#include "co1300a.h"
|
#include "co1300a.h"
|
||||||
|
|
||||||
#include <socicoop.h>
|
|
||||||
|
|
||||||
#include "..\ve\velib.h"
|
|
||||||
#include "..\ve\velib07.h"
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
// MASCHERA
|
// MASCHERA
|
||||||
@ -37,26 +31,11 @@ bool TEstrattoConto_mask::on_field_event(TOperable_field& f, TField_event e, lon
|
|||||||
// REPORT
|
// REPORT
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class TEstrattoConto_rep : public TDocument_report
|
// vediamo se serve
|
||||||
{
|
|
||||||
protected:
|
|
||||||
virtual bool use_mask() {return false;}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
// APPLICAZIONE
|
// APPLICAZIONE
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
struct TRiga_totale
|
|
||||||
{
|
|
||||||
TString80 _descr;
|
|
||||||
real _qta;
|
|
||||||
real _acc;
|
|
||||||
real _impcredito;
|
|
||||||
real _impdebito;
|
|
||||||
};
|
|
||||||
|
|
||||||
class TEstrattoConto : public TSkeleton_application
|
class TEstrattoConto : public TSkeleton_application
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -65,67 +44,14 @@ public:
|
|||||||
|
|
||||||
void TEstrattoConto::main_loop()
|
void TEstrattoConto::main_loop()
|
||||||
{
|
{
|
||||||
TEstrattoConto_mask m;
|
TEstrattoConto_mask mask;
|
||||||
while (m.run() == K_ENTER)
|
while (mask.run() == K_ENTER)
|
||||||
{
|
{
|
||||||
|
//report e book dei report
|
||||||
TReport_book book;
|
TReport_book book;
|
||||||
TEstrattoConto_rep rep;
|
TReport rep;
|
||||||
rep.load("co1300a");
|
rep.load("co1300a");
|
||||||
|
book.add(rep);
|
||||||
const TDate dataini = m.get_date(F_DATAINI);
|
|
||||||
const TDate datafin = m.get_date(F_DATAFIN);
|
|
||||||
const int anno = dataini.year();
|
|
||||||
|
|
||||||
// creo recordset dei soci da stampare
|
|
||||||
TISAM_recordset soci("USE SOCICOOP\nFROM CODCF=#DASOCIO\nTO CODCF=#ASOCIO");
|
|
||||||
soci.set_var("#DASOCIO", m.get_long(F_DASOCIO));
|
|
||||||
soci.set_var("#ASOCIO", m.get_long(F_ASOCIO));
|
|
||||||
|
|
||||||
for (bool ok = soci.move_first(); ok; ok = soci.move_next())
|
|
||||||
{
|
|
||||||
TRecordset * r = rep.recordset();
|
|
||||||
long codcf = soci.get(SC_CODCF).as_int();
|
|
||||||
r->set_var("#SOCIO", soci.get("CODCF"));
|
|
||||||
r->set_var("#ANNO", TVariant(long(anno)));
|
|
||||||
r->set_var("#DATAINI", dataini);
|
|
||||||
r->set_var("#DATAFIN", datafin);
|
|
||||||
|
|
||||||
// calcolo totali per articolo
|
|
||||||
TAssoc_array totali_art;
|
|
||||||
|
|
||||||
TReport_section& body2 = rep.section('B', 12);
|
|
||||||
for (bool ok = r->move_first(); ok; ok = r->move_next())
|
|
||||||
{
|
|
||||||
TRecordset* rr = rep.section('B', 11).recordset();
|
|
||||||
for (bool okr = rr->move_first(); okr; okr = rr->move_next())
|
|
||||||
{
|
|
||||||
const TString& codart = rr->get(RDOC_CODART).as_string();
|
|
||||||
TRiga_totale* rt = (TRiga_totale*) totali_art.objptr(codart);
|
|
||||||
if (rt == NULL)
|
|
||||||
{
|
|
||||||
rt = new TRiga_totale;
|
|
||||||
rt->_descr = rr->get(RDOC_DESCR).as_string();
|
|
||||||
totali_art.add(codart, (TObject*) rt);
|
|
||||||
}
|
|
||||||
// sommare qta e importi
|
|
||||||
real qta = rr->get(RDOC_QTA).as_real();
|
|
||||||
rt->_qta += qta;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// devo passare il recordset al report
|
|
||||||
TCSV_recordset csv("");
|
|
||||||
|
|
||||||
FOR_EACH_ASSOC_OBJECT(totali_art, o, k, it)
|
|
||||||
{
|
|
||||||
TRiga_totale& rt = (TRiga_totale&) *it;
|
|
||||||
csv.new_rec("");
|
|
||||||
TVariant descr = rt._descr;
|
|
||||||
csv.set(0, descr);
|
|
||||||
csv.set(1, rt._qta);
|
|
||||||
}
|
|
||||||
body2.set_recordset(&csv);
|
|
||||||
book.add(rep);
|
|
||||||
}
|
|
||||||
book.print_or_preview();
|
book.print_or_preview();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
107
co/co1300a.rep
107
co/co1300a.rep
@ -2,7 +2,17 @@
|
|||||||
<report name="co1300a" orientation="2" lpi="6">
|
<report name="co1300a" orientation="2" lpi="6">
|
||||||
<description>Stampa Estratto Conto Socio</description>
|
<description>Stampa Estratto Conto Socio</description>
|
||||||
<font face="Courier New" size="8" />
|
<font face="Courier New" size="8" />
|
||||||
<section type="Head">
|
<section type="Head" />
|
||||||
|
<section type="Head" level="1" />
|
||||||
|
<section type="Head" level="2" page_break="1">
|
||||||
|
<groupby>CODCF</groupby>
|
||||||
|
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2.101
|
||||||
|
MESSAGE RESET,F2.102
|
||||||
|
MESSAGE RESET,F2.103
|
||||||
|
MESSAGE RESET,F2.104
|
||||||
|
MESSAGE RESET,F2.105
|
||||||
|
MESSAGE RESET,F2.106
|
||||||
|
MESSAGE RESET,F2.107</prescript>
|
||||||
<field x="1" y="1" type="Stringa" width="10" pattern="1">
|
<field x="1" y="1" type="Stringa" width="10" pattern="1">
|
||||||
<source>101@.CODCF</source>
|
<source>101@.CODCF</source>
|
||||||
</field>
|
</field>
|
||||||
@ -65,8 +75,7 @@
|
|||||||
<field x="128" y="8" type="Testo" align="right" width="10" pattern="1" text="Imposta" />
|
<field x="128" y="8" type="Testo" align="right" width="10" pattern="1" text="Imposta" />
|
||||||
<field x="140" y="8" type="Testo" width="20" pattern="1" text="Mercato" />
|
<field x="140" y="8" type="Testo" width="20" pattern="1" text="Mercato" />
|
||||||
</section>
|
</section>
|
||||||
<section type="Head" level="1" />
|
<section type="Head" level="3" />
|
||||||
<section type="Head" level="2" />
|
|
||||||
<section type="Body" />
|
<section type="Body" />
|
||||||
<section type="Body" level="1" />
|
<section type="Body" level="1" />
|
||||||
<section type="Head" level="11" />
|
<section type="Head" level="11" />
|
||||||
@ -109,7 +118,7 @@ ELSE
|
|||||||
#107 ENABLE
|
#107 ENABLE
|
||||||
THEN</prescript>
|
THEN</prescript>
|
||||||
</field>
|
</field>
|
||||||
<field x="52" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###,@@">
|
<field x="52" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###.@@">
|
||||||
<groups>1</groups>
|
<groups>1</groups>
|
||||||
<source>QTA</source>
|
<source>QTA</source>
|
||||||
<postscript description="B11.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
<postscript description="B11.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||||
@ -125,13 +134,12 @@ THEN</prescript>
|
|||||||
<field x="85" type="Prezzo" align="right" width="10" id="104" pattern="1" hide_zero="1" text="#########,@@">
|
<field x="85" type="Prezzo" align="right" width="10" id="104" pattern="1" hide_zero="1" text="#########,@@">
|
||||||
<groups>1</groups>
|
<groups>1</groups>
|
||||||
<source>IMPCNN-IMPCNS</source>
|
<source>IMPCNN-IMPCNS</source>
|
||||||
<postscript description="B11.104 POSTSCRIPT">MESSAGE ADD,F2.104</postscript>
|
<prescript description="B11.104 PRESCRIPT">MESSAGE ADD,F2.104</prescript>
|
||||||
</field>
|
</field>
|
||||||
<field x="96" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@">
|
<field x="96" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@">
|
||||||
<groups>1</groups>
|
<groups>1</groups>
|
||||||
<source>IMPCNS</source>
|
<source>IMPCNS</source>
|
||||||
<postscript description="B11.105 POSTSCRIPT">MESSAGE ADD,F2.105
|
<postscript description="B11.105 POSTSCRIPT">MESSAGE ADD,F2.105</postscript>
|
||||||
MESSAGE ADD,F2.115</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="112" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@">
|
<field x="112" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@">
|
||||||
<groups>2</groups>
|
<groups>2</groups>
|
||||||
@ -144,86 +152,27 @@ MESSAGE ADD,F2.115</postscript>
|
|||||||
</field>
|
</field>
|
||||||
</section>
|
</section>
|
||||||
<section type="Foot" level="11" />
|
<section type="Foot" level="11" />
|
||||||
<section type="Head" level="12" />
|
|
||||||
<section deactivated="1" type="Body" level="12" hidden="1">
|
|
||||||
<sql>USE RDOC
|
|
||||||
SELECT (TIPORIGA='CO')||(TIPORIGA='06')
|
|
||||||
JOIN %SPP ALIAS 201 INTO CODTAB==CODART
|
|
||||||
FROM CODNUM=#PARENT.CODNUM ANNO=#PARENT.ANNO PROVV=#PARENT.PROVV NDOC=#PARENT.NDOC
|
|
||||||
TO CODNUM=#PARENT.CODNUM ANNO=#PARENT.ANNO PROVV=#PARENT.PROVV NDOC=#PARENT.NDOC
|
|
||||||
</sql>
|
|
||||||
<field x="13" type="Stringa" width="30" pattern="1">
|
|
||||||
<source>DESCR</source>
|
|
||||||
</field>
|
|
||||||
<field x="142" type="Stringa" hidden="1" align="right" bg_color="#00FFFF" width="12" id="100" pattern="1">
|
|
||||||
<font face="Arial" size="10" />
|
|
||||||
<source>34.TIPORIGA</source>
|
|
||||||
<prescript>#THIS @
|
|
||||||
"CO" = \ confronta tiporiga con "CO"
|
|
||||||
IF
|
|
||||||
#101 ENABLE
|
|
||||||
#102 ENABLE
|
|
||||||
#103 ENABLE
|
|
||||||
#104 ENABLE
|
|
||||||
#105 ENABLE
|
|
||||||
#106 DISABLE
|
|
||||||
#107 ENABLE
|
|
||||||
ELSE
|
|
||||||
#101 DISABLE
|
|
||||||
#102 DISABLE
|
|
||||||
#103 DISABLE
|
|
||||||
#104 DISABLE
|
|
||||||
#105 DISABLE
|
|
||||||
#106 ENABLE
|
|
||||||
#107 ENABLE
|
|
||||||
THEN</prescript>
|
|
||||||
</field>
|
|
||||||
<field x="53" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###.@@">
|
|
||||||
<source>QTA</source>
|
|
||||||
<postscript>MESSAGE ADD,F2.101</postscript>
|
|
||||||
</field>
|
|
||||||
<field x="64" type="Prezzo" align="right" width="10" id="102" pattern="1" hide_zero="1" text="#########,@@">
|
|
||||||
<source>PREZZONN</source>
|
|
||||||
</field>
|
|
||||||
<field x="75" type="Prezzo" align="right" width="10" id="103" pattern="1" hide_zero="1" text="#########,@@">
|
|
||||||
<source>PREZZONS</source>
|
|
||||||
</field>
|
|
||||||
<field x="86" type="Prezzo" align="right" width="10" id="104" pattern="1" hide_zero="1" text="#########,@@">
|
|
||||||
<source>IMPCNN-IMPCNS</source>
|
|
||||||
<prescript>MESSAGE ADD,F2.104</prescript>
|
|
||||||
</field>
|
|
||||||
<field x="97" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@">
|
|
||||||
<source>IMPCNS</source>
|
|
||||||
<postscript>MESSAGE ADD,F2.105</postscript>
|
|
||||||
</field>
|
|
||||||
<field x="113" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@">
|
|
||||||
<source>IMPCNS</source>
|
|
||||||
<postscript>MESSAGE ADD,F2.106</postscript>
|
|
||||||
</field>
|
|
||||||
<field x="129" type="Prezzo" align="right" width="10" id="107" pattern="1" hide_zero="1" text="#########,@@">
|
|
||||||
<source>IMPOSTA</source>
|
|
||||||
<postscript>MESSAGE ADD,F2.107</postscript>
|
|
||||||
</field>
|
|
||||||
</section>
|
|
||||||
<section type="Foot" level="12" />
|
|
||||||
<section type="Foot" />
|
<section type="Foot" />
|
||||||
<section type="Foot" level="1" />
|
<section type="Foot" level="1" />
|
||||||
<section type="Foot" level="2">
|
<section type="Foot" level="2">
|
||||||
<field x="30" type="Testo" width="10" pattern="1" text="TOTALI" />
|
<field border="1" y="1" type="Linea" width="160" height="0" pattern="1" />
|
||||||
<field x="92" y="3" type="Testo" width="35" pattern="1" text="Progressivo annuo conferimenti" />
|
<field x="24" y="2" type="Testo" width="10" pattern="1" text="TOTALI" />
|
||||||
<field x="52" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###,@@">
|
<field x="140" y="2" type="Testo" width="10" pattern="1" text="Saldo" />
|
||||||
<postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
<field x="52" y="2" type="Numero" align="right" width="10" id="101" pattern="1" />
|
||||||
|
<field x="85" y="2" type="Prezzo" align="right" width="10" id="104" pattern="1" hide_zero="1" text="#########,@@" />
|
||||||
|
<field x="96" y="2" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@" />
|
||||||
|
<field x="112" y="2" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@" />
|
||||||
|
<field x="128" y="2" type="Prezzo" align="right" width="10" id="107" pattern="1" hide_zero="1" text="#########,@@" />
|
||||||
|
<field x="146" y="2" type="Prezzo" align="right" width="15" id="108" pattern="1" hide_zero="1" text="#########,@@">
|
||||||
|
<source>#105-#106</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="96" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@" />
|
|
||||||
<field x="112" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@" />
|
|
||||||
<field x="128" type="Prezzo" align="right" width="15" id="107" pattern="1" hide_zero="1" text="#########,@@" />
|
|
||||||
<field x="128" y="3" type="Prezzo" align="right" width="15" id="115" pattern="1" text="###.###.###,@@" />
|
|
||||||
</section>
|
</section>
|
||||||
|
<section type="Foot" level="3" />
|
||||||
<sql>USE DOC
|
<sql>USE DOC
|
||||||
KEY 2
|
KEY 2
|
||||||
SELECT (NUM(ANSI(DATADOC)E;=ANSI(#DATAINI)))(NUM(ANSI(DATADOC)C;=ANSI(#DATAFIN)))
|
SELECT (NUM(ANSI(DATADOC)E;=ANSI(#DATAINI)))(NUM(ANSI(DATADOC)C;=ANSI(#DATAFIN)))
|
||||||
JOIN CLIFO ALIAS 101 INTO TIPOCF==TIPOCF CODCF==CODCF
|
JOIN CLIFO ALIAS 101 INTO TIPOCF==TIPOCF CODCF==CODCF
|
||||||
JOIN COMUNI TO 101@ INTO STATO==STATOCF COM==COMCF
|
JOIN COMUNI TO 101@ INTO STATO==STATOCF COM==COMCF
|
||||||
FROM TIPOCF='F' CODCF=#SOCIO PROVV='D' ANNO=#ANNO DATADOC=#DATAINI
|
FROM TIPOCF='F' CODCF=#DASOCIO PROVV='D'
|
||||||
TO TIPOCF='F' CODCF=#SOCIO PROVV='D' ANNO=#ANNO DATADOC=#DATAFIN</sql>
|
TO TIPOCF='F' CODCF=#ASOCIO PROVV='D'</sql>
|
||||||
</report>
|
</report>
|
@ -1,19 +1,15 @@
|
|||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
|
|
||||||
|
#include "../ve/velib04.h"
|
||||||
#include "../ve/ve6200.h"
|
#include "../ve/ve6200.h"
|
||||||
#include "../ve/ve6200a.h"
|
#include "../ve/ve6200a.h"
|
||||||
|
|
||||||
#include <doc.h>
|
#include <doc.h>
|
||||||
class TFatturazione_cooperative : public TFatturazione_bolle
|
class TFatturazione_cooperative : TFatturazione_bolle
|
||||||
{
|
{
|
||||||
virtual void campi_raggruppamento_righe(TToken_string& campi_riga) const;
|
void campi_raggruppamento_righe(TToken_string& campi_riga) const;
|
||||||
virtual void campi_raggruppamento(TToken_string& campi) const;
|
void campi_raggruppamento(TToken_string& campi) const;
|
||||||
virtual bool doc_raggruppabile(const TDocumento & doc) const { return true; }
|
void add_rows(TRiga_documento & rout, TRiga_documento & rin);
|
||||||
virtual bool doc_raggruppabile(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const;
|
|
||||||
virtual void add_rows(TRiga_documento & rout, TRiga_documento & rin);
|
|
||||||
virtual void create_row(TDocumento& doc_out, const TRiga_documento & rin);
|
|
||||||
virtual const TString & get_tipo_out(const TDocumento & doc_out);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TFatturazione_cooperative(const char* cod) : TFatturazione_bolle(cod) {}
|
TFatturazione_cooperative(const char* cod) : TFatturazione_bolle(cod) {}
|
||||||
@ -22,7 +18,7 @@ public:
|
|||||||
|
|
||||||
void TFatturazione_cooperative::campi_raggruppamento_righe(TToken_string& campi_riga) const
|
void TFatturazione_cooperative::campi_raggruppamento_righe(TToken_string& campi_riga) const
|
||||||
{
|
{
|
||||||
campi_riga = "CODART|UMQTA!CODIVA"; // Uguali sempre
|
campi_riga = "CODART|UMQTA"; // Uguali sempre
|
||||||
}
|
}
|
||||||
|
|
||||||
void TFatturazione_cooperative::campi_raggruppamento(TToken_string& campi) const
|
void TFatturazione_cooperative::campi_raggruppamento(TToken_string& campi) const
|
||||||
@ -32,62 +28,21 @@ void TFatturazione_cooperative::campi_raggruppamento(TToken_string& campi) const
|
|||||||
|
|
||||||
void TFatturazione_cooperative::add_rows(TRiga_documento & rout, TRiga_documento & rin)
|
void TFatturazione_cooperative::add_rows(TRiga_documento & rout, TRiga_documento & rin)
|
||||||
{
|
{
|
||||||
real valore = rout.get_real(RDOC_PREZZO);
|
if (rin.get(RDOC_CODAGG1).full())
|
||||||
|
|
||||||
valore += rin.doc().imponibile();
|
|
||||||
rout.put(RDOC_PREZZO, valore);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TFatturazione_cooperative::doc_raggruppabile(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const
|
|
||||||
{
|
|
||||||
if (doc_in.physical_rows() > 0 && doc_out.physical_rows() > 0)
|
|
||||||
{
|
{
|
||||||
const TRiga_documento & rout = doc_out[1];
|
real valore = rout.get_real(RDOC_PREZZO);
|
||||||
const TRiga_documento & rin = doc_in[1];
|
|
||||||
const TString art_in = rin.get(RDOC_CODART);
|
|
||||||
const TString art_out = rout.get(RDOC_CODART);
|
|
||||||
bool raggruppa = art_in == art_out;
|
|
||||||
|
|
||||||
if (raggruppa)
|
valore += rin.get_real(RDOC_PREZZO);
|
||||||
{
|
|
||||||
const TString iva_in = rin.get(RDOC_CODIVA);
|
|
||||||
const TString iva_out = rout.get(RDOC_CODIVA);
|
|
||||||
raggruppa = iva_in == iva_out;
|
|
||||||
}
|
|
||||||
return raggruppa;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TFatturazione_cooperative::create_row(TDocumento& doc_out, const TRiga_documento & rin)
|
|
||||||
{
|
|
||||||
if (rin.get_int(RDOC_NRIGA) == 1)
|
|
||||||
{
|
|
||||||
TFatturazione_bolle::create_row(doc_out, rin);
|
|
||||||
TRiga_documento & rout = doc_out[1];
|
|
||||||
const real valore = rin.doc().imponibile();
|
|
||||||
|
|
||||||
rout.put(RDOC_QTA, 1);
|
|
||||||
rout.put(RDOC_PREZZO, valore);
|
rout.put(RDOC_PREZZO, valore);
|
||||||
rout.zero(RDOC_SCONTO);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const TString & TFatturazione_cooperative::get_tipo_out(const TDocumento & doc_out)
|
|
||||||
{
|
|
||||||
const TString & art = doc_out[1].get(RDOC_CODARTMAG);
|
|
||||||
const TString & tipodoc = cache().get(LF_ANAMAG, art, ANAMAG_USER2);
|
|
||||||
|
|
||||||
if (tipodoc.full() && !cache().get("%TIP", tipodoc).empty())
|
|
||||||
return tipodoc;
|
|
||||||
else
|
else
|
||||||
return get("S8");
|
TFatturazione_bolle::add_rows(rout, rin);
|
||||||
};
|
}
|
||||||
|
|
||||||
class TFatturazione_cooperative_app : public TFatturazione_bolle_app
|
class TFatturazione_cooperative_app : public TFatturazione_bolle_app
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual TFatturazione_bolle * elab(const TString & cod) const { return new TFatturazione_cooperative(cod);}
|
virtual TElaborazione * elab(const TString & cod) { return new TFatturazione_bolle(cod);}
|
||||||
};
|
};
|
||||||
|
|
||||||
int co1400(int argc, char *argv[])
|
int co1400(int argc, char *argv[])
|
||||||
|
@ -81,7 +81,8 @@ void update_spese_doc(const long codmercato, TDocumento& doc)
|
|||||||
// devo ora sistemare le % e qta/prezzo sulle spese
|
// devo ora sistemare le % e qta/prezzo sulle spese
|
||||||
real totqta = ZERO;
|
real totqta = ZERO;
|
||||||
real totcasse = ZERO;
|
real totcasse = ZERO;
|
||||||
for (int i = 1; i <= doc.rows(); i++)
|
int i;
|
||||||
|
for (i = 1; i <= doc.rows(); i++)
|
||||||
{
|
{
|
||||||
const TRiga_documento& riga_doc = doc[i];
|
const TRiga_documento& riga_doc = doc[i];
|
||||||
if (riga_doc.is_merce())
|
if (riga_doc.is_merce())
|
||||||
@ -197,7 +198,7 @@ int compagnia2soci(const TDocumento& doc_orig, const TString& codcomp, const lon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; i < listadoc.items(); i++)
|
for (int i = 0; i < listadoc.items(); i++)
|
||||||
{
|
{
|
||||||
listadoc[i].put(DOC_RAGGR, true);
|
listadoc[i].put(DOC_RAGGR, true);
|
||||||
update_spese_doc(codmercato, listadoc[i]);
|
update_spese_doc(codmercato, listadoc[i]);
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "../ve/velib.h"
|
#include "../ve/velib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "../ve/velib04.h"
|
||||||
|
|
||||||
// crea la lista documenti per tutti i soci
|
// crea la lista documenti per tutti i soci
|
||||||
int compagnia2soci(const TDocumento& doc_compagnia, const TString& codcomp, const long codmercato, TLista_documenti& docs_soci);
|
int compagnia2soci(const TDocumento& doc_compagnia, const TString& codcomp, const long codmercato, TLista_documenti& docs_soci);
|
||||||
void update_spese_doc(const long codmercato, TDocumento& doc);
|
void update_spese_doc(const long codmercato, TDocumento& doc);
|
||||||
|
@ -5,20 +5,30 @@ Module = 29
|
|||||||
Flags = ""
|
Flags = ""
|
||||||
Item_01 = "Configurazione modulo", "co0 -2", "F"
|
Item_01 = "Configurazione modulo", "co0 -2", "F"
|
||||||
Item_02 = "Archivi e tabelle", [COMENU_011]
|
Item_02 = "Archivi e tabelle", [COMENU_011]
|
||||||
Item_03 = "Conferimenti e prestazioni", [COMENU_012]
|
Item_03 = "Stampa archivi e tabelle", [COMENU_11]
|
||||||
Item_04 = "Stampe", [COMENU_013]
|
Item_04 = "Conferimenti e prestazioni", [COMENU_013]
|
||||||
|
Item_05 = "Stampe", [COMENU_014]
|
||||||
|
|
||||||
[COMENU_011]
|
[COMENU_011]
|
||||||
Caption = "Archivi e tabelle"
|
Caption = "Archivi e tabelle"
|
||||||
Picture = <ve00>
|
Picture = <ba02>
|
||||||
Module = 29
|
Module = 29
|
||||||
Flags = ""
|
Flags = ""
|
||||||
Item_01 = "Tabella compagnie", "co0 -0 %CMP", "F"
|
Item_01 = "Tabella compagnie", "co0 -0 %CMP", ""
|
||||||
Item_02 = "Tabella correlazione articoli", "co0 -0 %COA", "F"
|
Item_02 = "Tabella correlazione articoli", "co0 -0 %COA", ""
|
||||||
Item_03 = "Anagrafica mercati", "co0 -4", "F"
|
Item_03 = "Anagrafica mercati", "co0 -4", "F"
|
||||||
Item_04 = "Anagrafica soci", "co0 -5", "F"
|
Item_04 = "Anagrafica soci", "co0 -5", "F"
|
||||||
|
|
||||||
[COMENU_012]
|
[COMENU_012]
|
||||||
|
Caption = "Stampa archivi e tabelle"
|
||||||
|
Picture = <ba03>
|
||||||
|
Module = 29
|
||||||
|
Flags = ""
|
||||||
|
Item_01 = "Tabella compagnie", "ba3 -1 %CMP", ""
|
||||||
|
Item_02 = "Tabella correlazione articoli", "ba3 -1 %COA", ""
|
||||||
|
|
||||||
|
|
||||||
|
[COMENU_013]
|
||||||
Caption = "Conferimenti e prestazioni"
|
Caption = "Conferimenti e prestazioni"
|
||||||
Picture = <ve00>
|
Picture = <ve00>
|
||||||
Module = 29
|
Module = 29
|
||||||
@ -26,14 +36,13 @@ Flags = ""
|
|||||||
Item_01 = "Gestione conferimenti/prestazioni", "co0 -6", "F"
|
Item_01 = "Gestione conferimenti/prestazioni", "co0 -6", "F"
|
||||||
Item_02 = "Importazione conferimenti", "co0 -7", "F"
|
Item_02 = "Importazione conferimenti", "co0 -7", "F"
|
||||||
Item_03 = "Aggiornamento prezzi", "co0 -8", "F"
|
Item_03 = "Aggiornamento prezzi", "co0 -8", "F"
|
||||||
|
Item_04 = "Fatturazione conferimenti", "co1 -3", "F"
|
||||||
|
|
||||||
[COMENU_013]
|
[COMENU_014]
|
||||||
Caption = "Stampe"
|
Caption = "Stampe"
|
||||||
Picture = <ve00>
|
Picture = <ba03>
|
||||||
Module = 29
|
Module = 29
|
||||||
Flags = ""
|
Flags = ""
|
||||||
Item_01 = "Stampa libro soci", "ba8 -4 co1100a", "F"
|
Item_01 = "Stampa libro soci", "ba8 -4 co1100a", "F"
|
||||||
Item_02 = "Stampa conferimenti", "ve1 -3 co1200a", "F"
|
Item_02 = "Stampa conferimenti", "ve1 -3 co1200a", "F"
|
||||||
Item_02 = "Stampa estratto conto", "ve1 -3 co1300a", "F"
|
Item_03 = "Stampa estratto conto", "ve1 -3 co1300a", "F"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user