Patch level : 10.0 256
Files correlati : ve0.exe ve1.exe ve5.exe ve6.exe profili documento delle vendite e delle lavanderie Ricompilazione Demo : [ ] Commento : Gestione del secondo agente nei documenti git-svn-id: svn://10.65.10.50/trunk@18476 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a32a73a8f3
commit
bd981811e2
@ -179,12 +179,13 @@ Col(11)=FR_SCONTO
|
|||||||
Col(12)=FR_PERCPROV
|
Col(12)=FR_PERCPROV
|
||||||
Col(13)=FR_IMPFISUN
|
Col(13)=FR_IMPFISUN
|
||||||
Col(14)=FR_IMPFISSO
|
Col(14)=FR_IMPFISSO
|
||||||
Col(15)=FR_CODIVA
|
Col(15)=FR_PERCPROV1
|
||||||
Col(16)=FR_ADDIVA
|
Col(16)=FR_CODIVA
|
||||||
Col(17)=FR_CAUS
|
Col(17)=FR_ADDIVA
|
||||||
Col(18)=FR_CODMAGC
|
Col(18)=FR_CAUS
|
||||||
Col(19)=FR_CODDEPC
|
Col(19)=FR_CODMAGC
|
||||||
Col(20)=FR_TIPORIGA
|
Col(20)=FR_CODDEPC
|
||||||
|
Col(21)=FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -104,10 +104,10 @@ STATOSP = S_DISABILITATO //900
|
|||||||
DESSTATOSP = S_DISABILITATO //900
|
DESSTATOSP = S_DISABILITATO //900
|
||||||
DATADOCRIF = S_NORMALE //1000
|
DATADOCRIF = S_NORMALE //1000
|
||||||
NUMDOCRIF = S_NOCHECK //1000
|
NUMDOCRIF = S_NOCHECK //1000
|
||||||
CODAGVIS = S_NASCOSTO //1110
|
|
||||||
DESAGVIS = S_NASCOSTO //1110
|
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
|
CODAGVIS = S_NORMALE //1100
|
||||||
|
DESAGVIS = S_NORMALE //1100
|
||||||
CODZON = S_NORMALE //1100
|
CODZON = S_NORMALE //1100
|
||||||
DESZON = S_NORMALE //1100
|
DESZON = S_NORMALE //1100
|
||||||
CODSPMEZZO = S_OBBLIGATORIO //1200
|
CODSPMEZZO = S_OBBLIGATORIO //1200
|
||||||
@ -179,15 +179,16 @@ Col(11)=FR_SCONTO
|
|||||||
Col(12)=FR_PERCPROV
|
Col(12)=FR_PERCPROV
|
||||||
Col(13)=FR_IMPFISUN
|
Col(13)=FR_IMPFISUN
|
||||||
Col(14)=FR_IMPFISSO
|
Col(14)=FR_IMPFISSO
|
||||||
Col(15)=FR_CODIVA
|
Col(15)=FR_PERCPROV1
|
||||||
Col(16)=FR_ADDIVA
|
Col(16)=FR_CODIVA
|
||||||
Col(17)=FR_NCOLLI
|
Col(17)=FR_ADDIVA
|
||||||
Col(18)=FR_PNETTO
|
Col(18)=FR_NCOLLI
|
||||||
Col(19)=FR_TARA
|
Col(19)=FR_PNETTO
|
||||||
Col(20)=FR_CAUS
|
Col(20)=FR_TARA
|
||||||
Col(21)=FR_CODMAGC
|
Col(21)=FR_CAUS
|
||||||
Col(22)=FR_CODDEPC
|
Col(22)=FR_CODMAGC
|
||||||
Col(23)=FR_TIPORIGA
|
Col(23)=FR_CODDEPC
|
||||||
|
Col(24)=FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -91,6 +91,8 @@ DESCAMP = S_DISABILITATO //820
|
|||||||
SCONTOPERC = S_NORMALE //830
|
SCONTOPERC = S_NORMALE //830
|
||||||
DATADOCRIF = S_NORMALE //1000
|
DATADOCRIF = S_NORMALE //1000
|
||||||
NUMDOCRIF = S_NOCHECK //1000
|
NUMDOCRIF = S_NOCHECK //1000
|
||||||
|
CODAGVIS = S_NORMALE //1110
|
||||||
|
DESAGVIS = S_NORMALE //1110
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
CODZON = S_NORMALE //1100
|
CODZON = S_NORMALE //1100
|
||||||
@ -139,12 +141,13 @@ Col(11) = FR_SCONTO
|
|||||||
Col(12) = FR_PERCPROV
|
Col(12) = FR_PERCPROV
|
||||||
Col(13) = FR_IMPFISUN
|
Col(13) = FR_IMPFISUN
|
||||||
Col(14) = FR_IMPFISSO
|
Col(14) = FR_IMPFISSO
|
||||||
Col(15) = FR_CODIVA
|
Col(15) = FR_PERCPROV1
|
||||||
Col(16) = FR_ADDIVA
|
Col(16) = FR_CODIVA
|
||||||
Col(17) = FR_CAUS
|
Col(17) = FR_ADDIVA
|
||||||
Col(18) = FR_CODMAGC
|
Col(18) = FR_CAUS
|
||||||
Col(19) = FR_CODDEPC
|
Col(19) = FR_CODMAGC
|
||||||
Col(20)=FR_TIPORIGA
|
Col(20) = FR_CODDEPC
|
||||||
|
Col(21) = FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -104,8 +104,8 @@ STATOSP = S_DISABILITATO //900
|
|||||||
DESSTATOSP = S_DISABILITATO //900
|
DESSTATOSP = S_DISABILITATO //900
|
||||||
DATADOCRIF = S_NORMALE //1000
|
DATADOCRIF = S_NORMALE //1000
|
||||||
NUMDOCRIF = S_NOCHECK //1000
|
NUMDOCRIF = S_NOCHECK //1000
|
||||||
CODAGVIS = S_NASCOSTO //1110
|
CODAGVIS = S_NORMALE //1110
|
||||||
DESAGVIS = S_NASCOSTO //1110
|
DESAGVIS = S_NORMALE //1110
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
CODZON = S_NORMALE //1100
|
CODZON = S_NORMALE //1100
|
||||||
@ -179,15 +179,16 @@ Col(12) = FR_SCONTO
|
|||||||
Col(13) = FR_PERCPROV
|
Col(13) = FR_PERCPROV
|
||||||
Col(14) = FR_IMPFISUN
|
Col(14) = FR_IMPFISUN
|
||||||
Col(15) = FR_IMPFISSO
|
Col(15) = FR_IMPFISSO
|
||||||
Col(16) = FR_CODIVA
|
Col(16) = FR_PERCPROV1
|
||||||
Col(17) = FR_ADDIVA
|
Col(17) = FR_CODIVA
|
||||||
Col(18) = FR_NCOLLI
|
Col(18) = FR_ADDIVA
|
||||||
Col(19) = FR_PNETTO
|
Col(19) = FR_NCOLLI
|
||||||
Col(20) = FR_TARA
|
Col(20) = FR_PNETTO
|
||||||
Col(21) = FR_CAUS
|
Col(21) = FR_TARA
|
||||||
Col(22) = FR_CODMAGC
|
Col(22) = FR_CAUS
|
||||||
Col(23) = FR_CODDEPC
|
Col(23) = FR_CODMAGC
|
||||||
Col(24)=FR_TIPORIGA
|
Col(24) = FR_CODDEPC
|
||||||
|
Col(25) = FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -100,6 +100,8 @@ STATOSP = S_DISABILITATO //900
|
|||||||
DESSTATOSP = S_DISABILITATO //900
|
DESSTATOSP = S_DISABILITATO //900
|
||||||
DATADOCRIF = S_NORMALE //1000
|
DATADOCRIF = S_NORMALE //1000
|
||||||
NUMDOCRIF = S_NOCHECK //1000
|
NUMDOCRIF = S_NOCHECK //1000
|
||||||
|
CODAGVIS = S_NORMALE //1110
|
||||||
|
DESAGVIS = S_NORMALE //1110
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
CODZON = S_NORMALE //1100
|
CODZON = S_NORMALE //1100
|
||||||
@ -156,12 +158,13 @@ Col(11)=FR_SCONTO
|
|||||||
Col(12)=FR_PERCPROV
|
Col(12)=FR_PERCPROV
|
||||||
Col(13)=FR_IMPFISUN
|
Col(13)=FR_IMPFISUN
|
||||||
Col(14)=FR_IMPFISSO
|
Col(14)=FR_IMPFISSO
|
||||||
Col(15)=FR_CODIVA
|
Col(15)=FR_PERCPROV1
|
||||||
Col(16)=FR_ADDIVA
|
Col(16)=FR_CODIVA
|
||||||
Col(17)=FR_CAUS
|
Col(17)=FR_ADDIVA
|
||||||
Col(18)=FR_CODMAGC
|
Col(18)=FR_CAUS
|
||||||
Col(19)=FR_CODDEPC
|
Col(19)=FR_CODMAGC
|
||||||
Col(20)=FR_TIPORIGA
|
Col(20)=FR_CODDEPC
|
||||||
|
Col(21)=FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -106,8 +106,8 @@ STATOSP = S_DISABILITATO //900
|
|||||||
DESSTATOSP = S_DISABILITATO //900
|
DESSTATOSP = S_DISABILITATO //900
|
||||||
DATADOCRIF = S_NASCOSTO //1000
|
DATADOCRIF = S_NASCOSTO //1000
|
||||||
NUMDOCRIF = S_NASCOSTO //1000
|
NUMDOCRIF = S_NASCOSTO //1000
|
||||||
CODAGVIS = S_NASCOSTO //1110
|
CODAGVIS = S_NORMALE //1110
|
||||||
DESAGVIS = S_NASCOSTO //1110
|
DESAGVIS = S_NORMALE //1110
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
CODZON = S_NORMALE //1100
|
CODZON = S_NORMALE //1100
|
||||||
@ -180,12 +180,13 @@ Col(11) = FR_SCONTO
|
|||||||
Col(12) = FR_PERCPROV
|
Col(12) = FR_PERCPROV
|
||||||
Col(13) = FR_IMPFISUN
|
Col(13) = FR_IMPFISUN
|
||||||
Col(14) = FR_IMPFISSO
|
Col(14) = FR_IMPFISSO
|
||||||
Col(15) = FR_CODIVA
|
Col(15) = FR_PERCPROV1
|
||||||
Col(16) = FR_ADDIVA
|
Col(16) = FR_CODIVA
|
||||||
Col(17) = FR_CAUS
|
Col(17) = FR_ADDIVA
|
||||||
Col(18) = FR_CODMAGC
|
Col(18) = FR_CAUS
|
||||||
Col(19) = FR_CODDEPC
|
Col(19) = FR_CODMAGC
|
||||||
Col(20) = FR_TIPORIGA
|
Col(20) = FR_CODDEPC
|
||||||
|
Col(21) = FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -111,6 +111,8 @@ STATOSP = S_DISABILITATO //900
|
|||||||
DESSTATOSP = S_DISABILITATO //900
|
DESSTATOSP = S_DISABILITATO //900
|
||||||
DATADOCRIF = S_NORMALE //1000
|
DATADOCRIF = S_NORMALE //1000
|
||||||
NUMDOCRIF = S_NOCHECK //1000
|
NUMDOCRIF = S_NOCHECK //1000
|
||||||
|
CODAGVIS = S_NORMALE //1110
|
||||||
|
DESAGVIS = S_NORMALE //1110
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
CODZON = S_NORMALE //1100
|
CODZON = S_NORMALE //1100
|
||||||
@ -177,12 +179,13 @@ Col(15) = FR_SCONTO
|
|||||||
Col(16) = FR_PERCPROV
|
Col(16) = FR_PERCPROV
|
||||||
Col(17) = FR_IMPFISUN
|
Col(17) = FR_IMPFISUN
|
||||||
Col(18) = FR_IMPFISSO
|
Col(18) = FR_IMPFISSO
|
||||||
Col(19) = FR_CODIVA
|
Col(19) = FR_PERCPROV1
|
||||||
Col(20) = FR_ADDIVA
|
Col(20) = FR_CODIVA
|
||||||
Col(21) = FR_CAUS
|
Col(21) = FR_ADDIVA
|
||||||
Col(22) = FR_CODMAGC
|
Col(22) = FR_CAUS
|
||||||
Col(23) = FR_CODDEPC
|
Col(23) = FR_CODMAGC
|
||||||
Col(24) = FR_TIPORIGA
|
Col(24) = FR_CODDEPC
|
||||||
|
Col(25) = FR_TIPORIGA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
|
|
||||||
|
@ -110,8 +110,8 @@ STATOSP = S_DISABILITATO //900
|
|||||||
DESSTATOSP = S_DISABILITATO //900
|
DESSTATOSP = S_DISABILITATO //900
|
||||||
DATADOCRIF = S_NASCOSTO //1000
|
DATADOCRIF = S_NASCOSTO //1000
|
||||||
NUMDOCRIF = S_NASCOSTO //1000
|
NUMDOCRIF = S_NASCOSTO //1000
|
||||||
CODAGVIS = S_NASCOSTO //1110
|
CODAGVIS = S_NORMALE //1110
|
||||||
DESAGVIS = S_NASCOSTO //1110
|
DESAGVIS = S_NORMALE //1110
|
||||||
CODAG = S_NORMALE //1100
|
CODAG = S_NORMALE //1100
|
||||||
DESAG = S_NORMALE //1100
|
DESAG = S_NORMALE //1100
|
||||||
CODSPMEZZO = S_OBBLIGATORIO //1200
|
CODSPMEZZO = S_OBBLIGATORIO //1200
|
||||||
@ -180,12 +180,13 @@ Col(14) = FR_SCONTO
|
|||||||
Col(15) = FR_PERCPROV
|
Col(15) = FR_PERCPROV
|
||||||
Col(16) = FR_IMPFISUN
|
Col(16) = FR_IMPFISUN
|
||||||
Col(17) = FR_IMPFISSO
|
Col(17) = FR_IMPFISSO
|
||||||
Col(18) = FR_CODIVA
|
Col(18) = FR_PERCPROV1
|
||||||
Col(19) = FR_ADDIVA
|
Col(19) = FR_CODIVA
|
||||||
Col(20) = FR_CAUS
|
Col(20) = FR_ADDIVA
|
||||||
Col(21) = FR_CODMAGC
|
Col(21) = FR_CAUS
|
||||||
Col(22) = FR_CODDEPC
|
Col(22) = FR_CODMAGC
|
||||||
Col(23) = FR_TIPORIGA
|
Col(23) = FR_CODDEPC
|
||||||
|
Col(24) = FR_TIPORIGA
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
|
||||||
|
101
ve/sconti.cpp
101
ve/sconti.cpp
@ -1,5 +1,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
|
#include <utility.h>
|
||||||
|
|
||||||
#include "sconti.h"
|
#include "sconti.h"
|
||||||
|
|
||||||
@ -90,6 +91,14 @@ void TCond_vendita::set_provv(const real & provv)
|
|||||||
_riga->set(FR_PERCPROV, _provv);
|
_riga->set(FR_PERCPROV, _provv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TCond_vendita::set_provv1(const real & provv)
|
||||||
|
|
||||||
|
{
|
||||||
|
_provv1 = provv;
|
||||||
|
if (_load_mask && _riga && _riga->id2pos(FR_PERCPROV1) >= 0 && _riga->field(FR_PERCPROV1).active())
|
||||||
|
_riga->set(FR_PERCPROV1, _provv1);
|
||||||
|
}
|
||||||
|
|
||||||
void TCond_vendita::set_iva(const TString & codiva)
|
void TCond_vendita::set_iva(const TString & codiva)
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -238,7 +247,7 @@ bool TCond_vendita::cerca( int tiporicerca )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
real TCond_vendita::get_percprovv(char tipoprovv, const TString & codpr, TLocalisamfile & age) const
|
real TCond_vendita::get_percprovv(char tipoprovv, const TString & codpr, bool first, const TRectype & age) const
|
||||||
{
|
{
|
||||||
real val = ZERO;
|
real val = ZERO;
|
||||||
|
|
||||||
@ -251,7 +260,7 @@ real TCond_vendita::get_percprovv(char tipoprovv, const TString & codpr, TLocali
|
|||||||
val = _anamag.get_real(ANAMAG_PERCPROVV);
|
val = _anamag.get_real(ANAMAG_PERCPROVV);
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
val = clifo().vendite().get_real(CFV_PERCPROVV);
|
val = clifo().vendite().get_real(first ? CFV_PERCPROVV : CFV_PERCPROVV1);
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
{
|
{
|
||||||
@ -542,59 +551,87 @@ void TCond_vendita::ricerca(bool load_um_only, bool load_scagl_only)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TString16 codric;
|
||||||
if (_riga && _riga->id2pos(FR_PERCPROV) >= 0 && _riga->field(FR_PERCPROV).active())
|
if (_riga && _riga->id2pos(FR_PERCPROV) >= 0 && _riga->field(FR_PERCPROV).active())
|
||||||
{
|
{
|
||||||
const TString16 codage(_testa->get(F_CODAG));
|
const TString & codage = _testa->get(F_CODAG);
|
||||||
|
|
||||||
if (codage.not_empty())
|
if (codage.full())
|
||||||
{
|
{
|
||||||
TLocalisamfile age(LF_AGENTI);
|
const TRectype & age = cache().get(LF_AGENTI, codage);
|
||||||
|
|
||||||
age.put(AGE_CODAGE, codage);
|
if (!age.empty())
|
||||||
if (age.read() == NOERR)
|
|
||||||
{
|
{
|
||||||
TString16 seqric(age.get(AGE_SEQRIC));
|
TString16 seqric(age.get(AGE_SEQRIC));
|
||||||
TString16 fcodpr;
|
real percprovv;
|
||||||
TString16 codpr;
|
|
||||||
real percprovv = ZERO;
|
|
||||||
|
|
||||||
if (seqric[0] == '-')
|
if (seqric[0] == '-')
|
||||||
seqric = config_ditta.get( "AGETIPOPERC", "ve" );
|
seqric = config_ditta.get( "AGETIPOPERC", "ve" );
|
||||||
|
|
||||||
int len = seqric.len();
|
int len = seqric.len();
|
||||||
|
int i;
|
||||||
|
|
||||||
_load_mask |= load_scagl_only && cv_scagl;
|
_load_mask |= load_scagl_only && cv_scagl;
|
||||||
_load_mask |= load_scagl_only && cv_um;
|
_load_mask |= load_scagl_only && cv_um;
|
||||||
int i;
|
for (i = 0; percprovv.is_zero() && seqric[i] != '\0' && seqric[i] != '-'; i++)
|
||||||
for (i = 0; percprovv == ZERO && i < len && seqric[i] != '-'; i++)
|
{
|
||||||
{
|
|
||||||
if (isdigit(seqric[i]))
|
if (isdigit(seqric[i]))
|
||||||
{
|
const TString codric = age.get(format("CODRICPR%d", i+1));
|
||||||
fcodpr.format("CODRICPR%d", i+1);
|
percprovv = get_percprovv(seqric[i], codric, true, age);
|
||||||
codpr = age.get(fcodpr);
|
}
|
||||||
}
|
real percalt;
|
||||||
else
|
|
||||||
codpr.cut(0);
|
|
||||||
percprovv = get_percprovv(seqric[i], codpr, age);
|
|
||||||
}
|
|
||||||
real percalt = ZERO;
|
|
||||||
seqric = age.get(AGE_SEQALT);
|
seqric = age.get(AGE_SEQALT);
|
||||||
for (i = 0; percalt == ZERO && i < len && seqric[i] != '-'; i++)
|
for (i = 0; percalt.is_zero() && seqric[i] != '\0' && seqric[i] != '-'; i++)
|
||||||
{
|
{
|
||||||
if (isdigit(seqric[i]))
|
if (isdigit(seqric[i]))
|
||||||
{
|
const TString & codric = age.get(format("CODALTPR%d", i+1));
|
||||||
fcodpr.format("CODALTPR%d", i+1);
|
percalt = get_percprovv(seqric[i], codric, true, age);
|
||||||
codpr = age.get(fcodpr);
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
codpr.cut(0);
|
|
||||||
percalt = get_percprovv(seqric[i], codpr, age);
|
|
||||||
}
|
|
||||||
percprovv += percalt;
|
percprovv += percalt;
|
||||||
set_provv(percprovv);
|
set_provv(percprovv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (_riga && _riga->id2pos(FR_PERCPROV1) >= 0 && _riga->field(FR_PERCPROV1).active())
|
||||||
|
{
|
||||||
|
const TString & codage = _testa->get(F_CODAGVIS);
|
||||||
|
|
||||||
|
if (codage.full())
|
||||||
|
{
|
||||||
|
const TRectype & age = cache().get(LF_AGENTI, codage);
|
||||||
|
|
||||||
|
if (!age.empty())
|
||||||
|
{
|
||||||
|
TString16 seqric(age.get(AGE_SEQRIC));
|
||||||
|
real percprovv;
|
||||||
|
|
||||||
|
if (seqric[0] == '-')
|
||||||
|
seqric = config_ditta.get( "AGETIPOPERC", "ve" );
|
||||||
|
|
||||||
|
int len = seqric.len();
|
||||||
|
int i;
|
||||||
|
|
||||||
|
_load_mask |= load_scagl_only && cv_scagl;
|
||||||
|
_load_mask |= load_scagl_only && cv_um;
|
||||||
|
for (i = 0; percprovv.is_zero() && seqric[i] != '\0' && seqric[i] != '-'; i++)
|
||||||
|
{
|
||||||
|
if (isdigit(seqric[i]))
|
||||||
|
const TString & codric = age.get(format("CODRICPR%d", i+1));
|
||||||
|
percprovv = get_percprovv(seqric[i], codric, false, age);
|
||||||
|
}
|
||||||
|
real percalt;
|
||||||
|
seqric = age.get(AGE_SEQALT);
|
||||||
|
for (i = 0; percalt.is_zero() && seqric[i] != '\0' && seqric[i] != '-'; i++)
|
||||||
|
{
|
||||||
|
if (isdigit(seqric[i]))
|
||||||
|
const TString & codric = age.get(format("CODALTPR%d", i+1));
|
||||||
|
percalt = get_percprovv(seqric[i], codric, false, age);
|
||||||
|
}
|
||||||
|
percprovv += percalt;
|
||||||
|
set_provv1(percprovv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (found_condv && _testa->is_running())
|
if (found_condv && _testa->is_running())
|
||||||
update_omaggi(load_scagl_only);
|
update_omaggi(load_scagl_only);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ class TCond_vendita : public TObject
|
|||||||
TString16 _codiva;
|
TString16 _codiva;
|
||||||
real _prezzo;
|
real _prezzo;
|
||||||
real _provv;
|
real _provv;
|
||||||
|
real _provv1;
|
||||||
real _molt_sconto;
|
real _molt_sconto;
|
||||||
|
|
||||||
TDocumento_mask* _testa;
|
TDocumento_mask* _testa;
|
||||||
@ -39,6 +40,7 @@ class TCond_vendita : public TObject
|
|||||||
protected:
|
protected:
|
||||||
void set_prezzo(const real & prezzo, const char * val_rif = "");
|
void set_prezzo(const real & prezzo, const char * val_rif = "");
|
||||||
void set_provv(const real & provv);
|
void set_provv(const real & provv);
|
||||||
|
void set_provv1(const real & provv);
|
||||||
void set_iva(const TString & codiva);
|
void set_iva(const TString & codiva);
|
||||||
void update_omaggi(bool full);
|
void update_omaggi(bool full);
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ public:
|
|||||||
real sconto_val() const { return _molt_sconto;}
|
real sconto_val() const { return _molt_sconto;}
|
||||||
real get_prezzo() const { return _prezzo; }
|
real get_prezzo() const { return _prezzo; }
|
||||||
real get_provv() const { return _provv; }
|
real get_provv() const { return _provv; }
|
||||||
real get_percprovv(char tipoprovv, const TString & codpr, TLocalisamfile & age) const;
|
real get_percprovv(char tipoprovv, const TString & codpr, bool first, const TRectype & age) const;
|
||||||
const TString & get_iva() const { return _codiva; }
|
const TString & get_iva() const { return _codiva; }
|
||||||
|
|
||||||
// void set_clifo( TCli_for * clifo) { _clifo = clifo; }
|
// void set_clifo( TCli_for * clifo) { _clifo = clifo; }
|
||||||
|
@ -760,6 +760,8 @@ void TMotore_application::ini2mask(TConfig& ini, TMask& msk, bool query)
|
|||||||
msk.set(F_CODINDSP, ven_rec.get(CFV_CODINDSP), true);
|
msk.set(F_CODINDSP, ven_rec.get(CFV_CODINDSP), true);
|
||||||
if (!ini.exist(DOC_CODAG))
|
if (!ini.exist(DOC_CODAG))
|
||||||
msk.set(F_CODAG, ven_rec.get(CFV_CODAG));
|
msk.set(F_CODAG, ven_rec.get(CFV_CODAG));
|
||||||
|
if (!ini.exist(DOC_CODAGVIS))
|
||||||
|
msk.set(F_CODAG, ven_rec.get(CFV_CODAG1));
|
||||||
if (!ini.exist(DOC_CODSPMEZZO))
|
if (!ini.exist(DOC_CODSPMEZZO))
|
||||||
msk.set(F_CODSPMEZZO, ven_rec.get(CFV_CODSPMEZZO), true);
|
msk.set(F_CODSPMEZZO, ven_rec.get(CFV_CODSPMEZZO), true);
|
||||||
if (!ini.exist(DOC_CODPORTO))
|
if (!ini.exist(DOC_CODPORTO))
|
||||||
|
@ -1016,10 +1016,40 @@ DISPLAY="Descrizione@50" RAGSOC~"Codice" CODAGE
|
|||||||
OUTPUT=F_CODAG CODAGE~F_DESAG RAGSOC
|
OUTPUT=F_CODAG CODAGE~F_DESAG RAGSOC
|
||||||
SPECIAL=ADD RU pr0 -4
|
SPECIAL=ADD RU pr0 -4
|
||||||
|
|
||||||
[CODZON]
|
[CODAGVIS]
|
||||||
GROUP=1100
|
GROUP=1100
|
||||||
X=2
|
X=2
|
||||||
Y=1
|
Y=1
|
||||||
|
FIELDNAME=CODAGVIS
|
||||||
|
MSKID=F_CODAGVIS
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT="2o Agente "
|
||||||
|
SIZE=5
|
||||||
|
FLAG=UZ
|
||||||
|
USE=LF_AGENTI
|
||||||
|
INPUT=CODAGE F_CODAGVIS
|
||||||
|
DISPLAY="Codice" CODAGE~"Ragione Sociale@50" RAGSOC
|
||||||
|
OUTPUT=F_CODAGVIS CODAGE~F_DESAGVIS RAGSOC
|
||||||
|
SPECIAL=CH NORMAL~ADD RU pr0 -4
|
||||||
|
|
||||||
|
[DESAGVIS]
|
||||||
|
GROUP=1100
|
||||||
|
X=24
|
||||||
|
Y=1
|
||||||
|
MSKID=F_DESAGVIS
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT=""
|
||||||
|
SIZE=50
|
||||||
|
USE=LF_AGENTI KEY 2
|
||||||
|
INPUT=RAGSOC F_DESAGVIS
|
||||||
|
DISPLAY="Ragione Sociale@50" RAGSOC~"Codice" CODAGE
|
||||||
|
OUTPUT=F_CODAGVIS CODAGE~F_DESAGVIS RAGSOC
|
||||||
|
SPECIAL=ADD RU pr0 -4
|
||||||
|
|
||||||
|
[CODZON]
|
||||||
|
GROUP=1100
|
||||||
|
X=2
|
||||||
|
Y=2
|
||||||
FIELDNAME=ZONA
|
FIELDNAME=ZONA
|
||||||
MSKID=F_CODZON
|
MSKID=F_CODZON
|
||||||
TYPE=T_STRINGA
|
TYPE=T_STRINGA
|
||||||
@ -1035,7 +1065,7 @@ SPECIAL=CH NORMAL
|
|||||||
[DESZON]
|
[DESZON]
|
||||||
GROUP=1100
|
GROUP=1100
|
||||||
X=24
|
X=24
|
||||||
Y=1
|
Y=2
|
||||||
MSKID=F_DESZON
|
MSKID=F_DESZON
|
||||||
TYPE=T_STRINGA
|
TYPE=T_STRINGA
|
||||||
PROMPT=""
|
PROMPT=""
|
||||||
@ -1045,36 +1075,6 @@ INPUT=S0 F_DESZON
|
|||||||
DISPLAY="Descrizione@50" S0~"Codice" CODTAB
|
DISPLAY="Descrizione@50" S0~"Codice" CODTAB
|
||||||
OUTPUT=F_CODZON CODTAB~F_DESZON S0
|
OUTPUT=F_CODZON CODTAB~F_DESZON S0
|
||||||
|
|
||||||
[CODAGVIS]
|
|
||||||
GROUP=1110
|
|
||||||
X=2
|
|
||||||
Y=0
|
|
||||||
FIELDNAME=CODAGVIS
|
|
||||||
MSKID=F_CODAGVIS
|
|
||||||
TYPE=T_STRINGA
|
|
||||||
PROMPT="Agente da vis. "
|
|
||||||
SIZE=5
|
|
||||||
FLAG=UZ
|
|
||||||
USE=LF_AGENTI
|
|
||||||
INPUT=CODAGE F_CODAGVIS
|
|
||||||
DISPLAY="Codice" CODAGE~"Descrizione@50" RAGSOC
|
|
||||||
OUTPUT=F_CODAGVIS CODAGE~F_DESAGVIS RAGSOC
|
|
||||||
SPECIAL=CH NORMAL~ADD RU pr0 -4
|
|
||||||
|
|
||||||
[DESAGVIS]
|
|
||||||
GROUP=1110
|
|
||||||
X=24
|
|
||||||
Y=0
|
|
||||||
MSKID=F_DESAGVIS
|
|
||||||
TYPE=T_STRINGA
|
|
||||||
PROMPT=""
|
|
||||||
SIZE=50
|
|
||||||
USE=LF_AGENTI KEY 2
|
|
||||||
INPUT=RAGSOC F_DESAGVIS
|
|
||||||
DISPLAY="Descrizione@50" RAGSOC~"Codice" CODAGE
|
|
||||||
OUTPUT=F_CODAGVIS CODAGE~F_DESAGVIS RAGSOC
|
|
||||||
SPECIAL=ADD RU pr0 -4
|
|
||||||
|
|
||||||
[CODSPMEZZO]
|
[CODSPMEZZO]
|
||||||
GROUP=1200
|
GROUP=1200
|
||||||
X=2
|
X=2
|
||||||
|
@ -63,3 +63,4 @@ JOLLY8|2|20|Jolly|20
|
|||||||
JOLLY9|2|20|Jolly|20
|
JOLLY9|2|20|Jolly|20
|
||||||
JOLLY10|2|20|Jolly|20
|
JOLLY10|2|20|Jolly|20
|
||||||
RIDPREZZO|3|18|Riduzione prezzo|18
|
RIDPREZZO|3|18|Riduzione prezzo|18
|
||||||
|
PERCPROV|3|502|2a Perc.\nProvv.|5
|
||||||
|
24
ve/velib.h
24
ve/velib.h
@ -217,6 +217,7 @@ class TTipo_documento : public TRectype // velib03
|
|||||||
TString16 _basesconto;
|
TString16 _basesconto;
|
||||||
TString16 _spese;
|
TString16 _spese;
|
||||||
TString16 _totprovv;
|
TString16 _totprovv;
|
||||||
|
TString16 _totprovv1;
|
||||||
TString16 _valore;
|
TString16 _valore;
|
||||||
TString16 _totvalres;
|
TString16 _totvalres;
|
||||||
TString16 _totvalore;
|
TString16 _totvalore;
|
||||||
@ -283,6 +284,7 @@ public:
|
|||||||
const TString & basesconto() const { return _basesconto;}
|
const TString & basesconto() const { return _basesconto;}
|
||||||
const TString & spese() const { return _spese;}
|
const TString & spese() const { return _spese;}
|
||||||
const TString & totprovv() const { return _totprovv;}
|
const TString & totprovv() const { return _totprovv;}
|
||||||
|
const TString & totprovv1() const { return _totprovv1;}
|
||||||
const TString & valore() const { return _valore;}
|
const TString & valore() const { return _valore;}
|
||||||
const TString & totvalres() const { return _totvalres;}
|
const TString & totvalres() const { return _totvalres;}
|
||||||
const TString & totvalore() const { return _totvalore;}
|
const TString & totvalore() const { return _totvalore;}
|
||||||
@ -390,6 +392,7 @@ class TTipo_riga_documento : public TRectype // velib02
|
|||||||
TString16 _valres;
|
TString16 _valres;
|
||||||
|
|
||||||
TString16 _field_provv;
|
TString16 _field_provv;
|
||||||
|
TString16 _field_provv1;
|
||||||
TString16 _field_qta, _field_qtaevasa; // Veri campi Quantità e Quantità Evasa
|
TString16 _field_qta, _field_qtaevasa; // Veri campi Quantità e Quantità Evasa
|
||||||
TString16 _field_qta_mag, _field_qtaevasa_mag; // Veri campi Quantità e Quantità Evasa per magazzino
|
TString16 _field_qta_mag, _field_qtaevasa_mag; // Veri campi Quantità e Quantità Evasa per magazzino
|
||||||
|
|
||||||
@ -428,8 +431,8 @@ public:
|
|||||||
const TString& quantevasa() const { return _quantevasa;}
|
const TString& quantevasa() const { return _quantevasa;}
|
||||||
const TString& field_qta() const { return _field_qta;}
|
const TString& field_qta() const { return _field_qta;}
|
||||||
const TString& field_qtaevasa() const { return _field_qtaevasa;}
|
const TString& field_qtaevasa() const { return _field_qtaevasa;}
|
||||||
const TString& field_qta_mag() const { return _field_qta_mag;}
|
const TString& field_qta_mag() const { return _field_qta_mag;}
|
||||||
const TString& field_qtaevasa_mag() const { return _field_qtaevasa_mag;}
|
const TString& field_qtaevasa_mag() const { return _field_qtaevasa_mag;}
|
||||||
|
|
||||||
const int search_years() const { return _search_years;}
|
const int search_years() const { return _search_years;}
|
||||||
const TToken_string& search_nums() const { return _search_nums;}
|
const TToken_string& search_nums() const { return _search_nums;}
|
||||||
@ -442,6 +445,7 @@ public:
|
|||||||
bool select_clifo() const { return _select_clifo;}
|
bool select_clifo() const { return _select_clifo;}
|
||||||
|
|
||||||
const TString& provv() const { return _field_provv;}
|
const TString& provv() const { return _field_provv;}
|
||||||
|
const TString& provv1() const { return _field_provv1;}
|
||||||
const int incr_perc_prezzo() const { return _incrp;}
|
const int incr_perc_prezzo() const { return _incrp;}
|
||||||
const int decr_perc_prezzo() const { return _decrp;}
|
const int decr_perc_prezzo() const { return _decrp;}
|
||||||
TToken_string * genconf(int i) const { return (TToken_string *) _genconf.objptr(i);}
|
TToken_string * genconf(int i) const { return (TToken_string *) _genconf.objptr(i);}
|
||||||
@ -552,7 +556,7 @@ public:
|
|||||||
real imponibile_omaggio(int iva_calc_mode = 1) const;
|
real imponibile_omaggio(int iva_calc_mode = 1) const;
|
||||||
real iva_omaggio(int ndec, int iva_calc_mode = 1) const;
|
real iva_omaggio(int ndec, int iva_calc_mode = 1) const;
|
||||||
real imposta(bool round = true) const;
|
real imposta(bool round = true) const;
|
||||||
real provvigione(int ndec = AUTO_DECIMALS) const;
|
real provvigione(bool first = true, int ndec = AUTO_DECIMALS) const;
|
||||||
real ritenuta(const char tipor = '\0', bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
real ritenuta(const char tipor = '\0', bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
||||||
|
|
||||||
const TString& field_qta() const;
|
const TString& field_qta() const;
|
||||||
@ -640,8 +644,8 @@ class TDocumento : public TMultiple_rectype // velib03
|
|||||||
TPagamento _pag;
|
TPagamento _pag;
|
||||||
TAssoc_array _tabella_iva; // tabella di imponibili ed imposte
|
TAssoc_array _tabella_iva; // tabella di imponibili ed imposte
|
||||||
|
|
||||||
TProvvigioni_agente* _provv_agente;
|
TString8 _old_agente; // Agente originale
|
||||||
TString16 _old_agente; // Agente originale
|
TString8 _old_agente1; // Secondo Agente originale
|
||||||
|
|
||||||
TRiga_documento * _sconto; // Riga per lo sconto di testata
|
TRiga_documento * _sconto; // Riga per lo sconto di testata
|
||||||
TRiga_documento * _esenzione; // Riga per l' esenzione iva
|
TRiga_documento * _esenzione; // Riga per l' esenzione iva
|
||||||
@ -667,6 +671,9 @@ protected:
|
|||||||
virtual void put_str(const char* fieldname, const char* val);
|
virtual void put_str(const char* fieldname, const char* val);
|
||||||
virtual const TString & get_str(const char* fieldname) const ;
|
virtual const TString & get_str(const char* fieldname) const ;
|
||||||
|
|
||||||
|
int update_provvigione(bool remove, const bool first = true);
|
||||||
|
int update_provvigioni(bool remove);
|
||||||
|
|
||||||
virtual bool key_complete() { return numero() > 0; }
|
virtual bool key_complete() { return numero() > 0; }
|
||||||
void set_riga_sconto();
|
void set_riga_sconto();
|
||||||
int write_rewrite(TBaseisamfile & f, bool re) const;
|
int write_rewrite(TBaseisamfile & f, bool re) const;
|
||||||
@ -695,7 +702,7 @@ public:
|
|||||||
TAssoc_array & tabella_iva(bool solo_imponibili = false) { update_tabella_iva(solo_imponibili); return _tabella_iva; }
|
TAssoc_array & tabella_iva(bool solo_imponibili = false) { update_tabella_iva(solo_imponibili); return _tabella_iva; }
|
||||||
TCli_for & clifor() const;
|
TCli_for & clifor() const;
|
||||||
TOccasionale & occas() const;
|
TOccasionale & occas() const;
|
||||||
const TAgente & agente() const;
|
const TAgente & agente(bool first = true) const;
|
||||||
const TString & riferimento(TString& rif) const { return tipo().riferimento(*this, rif); }
|
const TString & riferimento(TString& rif) const { return tipo().riferimento(*this, rif); }
|
||||||
|
|
||||||
virtual TRecord_array& body(int logicnum = 0) const;
|
virtual TRecord_array& body(int logicnum = 0) const;
|
||||||
@ -729,8 +736,7 @@ public:
|
|||||||
|
|
||||||
void flush_rows();
|
void flush_rows();
|
||||||
|
|
||||||
TProvvigioni_agente& calc_provvigioni(const bool generata = true);
|
void calc_provvigione(TProvvigioni_agente & provv, const TString & key, bool first = true, bool generata = true);
|
||||||
int write_provvigioni();
|
|
||||||
|
|
||||||
char tipo_numerazione() const { return get_char("PROVV"); }
|
char tipo_numerazione() const { return get_char("PROVV"); }
|
||||||
int anno() const { return get_int("ANNO"); }
|
int anno() const { return get_int("ANNO"); }
|
||||||
@ -788,7 +794,7 @@ public:
|
|||||||
real basesconto() const;
|
real basesconto() const;
|
||||||
real spese() const;
|
real spese() const;
|
||||||
real ritenute(const char tipo = '\0', bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
real ritenute(const char tipo = '\0', bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
||||||
real provvigione(int ndec = AUTO_DECIMALS) const;
|
real provvigione(bool first = true, int ndec = AUTO_DECIMALS) const;
|
||||||
real valore(bool totale, bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
real valore(bool totale, bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
||||||
|
|
||||||
TPagamento & pagamento();
|
TPagamento & pagamento();
|
||||||
|
@ -99,6 +99,7 @@ void TTipo_riga_documento::read_formule()
|
|||||||
_formule.add(calcoli);
|
_formule.add(calcoli);
|
||||||
|
|
||||||
_field_provv = profile.get("PROVV");
|
_field_provv = profile.get("PROVV");
|
||||||
|
_field_provv1 = profile.get("PROVV1");
|
||||||
_field_qta = profile.get("QTA"); // Non dare un default: ingannerebbe il tipo documento
|
_field_qta = profile.get("QTA"); // Non dare un default: ingannerebbe il tipo documento
|
||||||
_field_qtaevasa = profile.get("QTAEVASA"); // Non dare un default: ingannerebbe il tipo documento
|
_field_qtaevasa = profile.get("QTAEVASA"); // Non dare un default: ingannerebbe il tipo documento
|
||||||
_field_qta_mag = profile.get("QTA_MAG");
|
_field_qta_mag = profile.get("QTA_MAG");
|
||||||
@ -659,13 +660,13 @@ real TRiga_documento::imposta(bool round) const
|
|||||||
return iva(round ? doc().decimals() : 20);
|
return iva(round ? doc().decimals() : 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
real TRiga_documento::provvigione(int ndec) const
|
real TRiga_documento::provvigione(bool first, int ndec) const
|
||||||
{
|
{
|
||||||
real val;
|
real val;
|
||||||
|
|
||||||
if (ndec == AUTO_DECIMALS)
|
if (ndec == AUTO_DECIMALS)
|
||||||
ndec = doc().decimals();
|
ndec = doc().decimals();
|
||||||
const TString & field = tipo().provv();
|
const TString & field = first ? tipo().provv() : tipo().provv1();
|
||||||
if (field.not_empty())
|
if (field.not_empty())
|
||||||
val = get_real(field);
|
val = get_real(field);
|
||||||
else
|
else
|
||||||
@ -682,7 +683,7 @@ real TRiga_documento::provvigione(int ndec) const
|
|||||||
val *= netto_testa;
|
val *= netto_testa;
|
||||||
}
|
}
|
||||||
|
|
||||||
val *= get_real(RDOC_PERCPROV) / CENTO;
|
val *= get_real(first ? RDOC_PERCPROV : RDOC_PERCPROV1) / CENTO;
|
||||||
}
|
}
|
||||||
val.round(ndec);
|
val.round(ndec);
|
||||||
return val;
|
return val;
|
||||||
@ -1005,6 +1006,7 @@ void TRiga_documento::autosave(TSheet_field& f)
|
|||||||
put( RDOC_CODAGG1, row.get( f.cid2index(FR_CODAGG1)) );
|
put( RDOC_CODAGG1, row.get( f.cid2index(FR_CODAGG1)) );
|
||||||
put( RDOC_CODAGG2, row.get( f.cid2index(FR_CODAGG2)) );
|
put( RDOC_CODAGG2, row.get( f.cid2index(FR_CODAGG2)) );
|
||||||
put( RDOC_RIDPREZZO, row.get( f.cid2index(FR_RIDPREZZO)) );
|
put( RDOC_RIDPREZZO, row.get( f.cid2index(FR_RIDPREZZO)) );
|
||||||
|
put( RDOC_PERCPROV1, row.get( f.cid2index(FR_PERCPROV1 )) );
|
||||||
|
|
||||||
for (short cdcid = FR_CDC1; cdcid <= FR_CDC12; cdcid++)
|
for (short cdcid = FR_CDC1; cdcid <= FR_CDC12; cdcid++)
|
||||||
{
|
{
|
||||||
@ -1151,6 +1153,7 @@ void TRiga_documento::autoload(TSheet_field & f)
|
|||||||
row.add( get( RDOC_CODAGG1) , f.cid2index(FR_CODAGG1));
|
row.add( get( RDOC_CODAGG1) , f.cid2index(FR_CODAGG1));
|
||||||
row.add( get( RDOC_CODAGG2) , f.cid2index(FR_CODAGG2));
|
row.add( get( RDOC_CODAGG2) , f.cid2index(FR_CODAGG2));
|
||||||
row.add( get( RDOC_RIDPREZZO) , f.cid2index(FR_RIDPREZZO));
|
row.add( get( RDOC_RIDPREZZO) , f.cid2index(FR_RIDPREZZO));
|
||||||
|
row.add( get( RDOC_PERCPROV1 ), f.cid2index(FR_PERCPROV1 ));
|
||||||
|
|
||||||
const TMask& m = f.sheet_row_mask(num);
|
const TMask& m = f.sheet_row_mask(num);
|
||||||
|
|
||||||
|
125
ve/velib03.cpp
125
ve/velib03.cpp
@ -233,7 +233,6 @@ void TDocumento::init()
|
|||||||
_tipocf = new TRecfield(*this, DOC_TIPOCF);
|
_tipocf = new TRecfield(*this, DOC_TIPOCF);
|
||||||
_codcf = new TRecfield(*this, DOC_CODCF);
|
_codcf = new TRecfield(*this, DOC_CODCF);
|
||||||
_cod_occas = new TRecfield(*this, DOC_OCFPI);
|
_cod_occas = new TRecfield(*this, DOC_OCFPI);
|
||||||
_provv_agente = new TProvvigioni_agente;
|
|
||||||
|
|
||||||
|
|
||||||
_sconto = _esenzione = NULL;
|
_sconto = _esenzione = NULL;
|
||||||
@ -282,7 +281,6 @@ TDocumento::~TDocumento()
|
|||||||
delete _codcf;
|
delete _codcf;
|
||||||
delete _cod_occas;
|
delete _cod_occas;
|
||||||
|
|
||||||
if (_provv_agente != NULL) delete _provv_agente;
|
|
||||||
if (_sconto != NULL) delete _sconto;
|
if (_sconto != NULL) delete _sconto;
|
||||||
if (_esenzione != NULL) delete _esenzione;
|
if (_esenzione != NULL) delete _esenzione;
|
||||||
}
|
}
|
||||||
@ -793,10 +791,13 @@ int TDocumento::read(TBaseisamfile& f, word op, word lockop)
|
|||||||
_docs_to_agg.remove(key);
|
_docs_to_agg.remove(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err == NOERR && _has_provv)
|
_old_agente.cut(0);
|
||||||
|
_old_agente1.cut(0);
|
||||||
|
if (err == NOERR && _has_provv)
|
||||||
|
{
|
||||||
_old_agente = get(DOC_CODAG);
|
_old_agente = get(DOC_CODAG);
|
||||||
else
|
_old_agente1 = get(DOC_CODAGVIS);
|
||||||
_old_agente.cut(0);
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@ -1274,24 +1275,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_has_provv && tipo().provvigioni() && tipo().stato_provvigioni() <= stato())
|
if (_has_provv && tipo().provvigioni() && tipo().stato_provvigioni() <= stato())
|
||||||
{
|
myself.update_provvigioni(false);
|
||||||
const TString16 agente = get(DOC_CODAG);
|
|
||||||
if (agente != _old_agente)
|
|
||||||
{
|
|
||||||
if (_old_agente.not_empty())
|
|
||||||
{
|
|
||||||
const int anno = get_int(DOC_ANNO);
|
|
||||||
const TString16 codnum = get(DOC_CODNUM);
|
|
||||||
const long numdoc = get_long(DOC_NDOC);
|
|
||||||
TProvvigioni_agente provv;
|
|
||||||
if (provv.read(_old_agente, anno, codnum, numdoc) == NOERR)
|
|
||||||
provv.remove();
|
|
||||||
}
|
|
||||||
myself._old_agente = agente;
|
|
||||||
}
|
|
||||||
if (agente.not_empty())
|
|
||||||
myself.write_provvigioni();
|
|
||||||
}
|
|
||||||
if (tipo().statistiche() && _has_stat_ven)
|
if (tipo().statistiche() && _has_stat_ven)
|
||||||
{
|
{
|
||||||
TString80 key(get(DOC_PROVV)); key << get(DOC_ANNO); key << get(DOC_CODNUM); key << get(DOC_NDOC);
|
TString80 key(get(DOC_PROVV)); key << get(DOC_ANNO); key << get(DOC_CODNUM); key << get(DOC_NDOC);
|
||||||
@ -1366,15 +1350,9 @@ int TDocumento::remove(TBaseisamfile& f) const
|
|||||||
}
|
}
|
||||||
if (_has_provv && tipo().provvigioni())
|
if (_has_provv && tipo().provvigioni())
|
||||||
{
|
{
|
||||||
const TString8 agente(get(DOC_CODAG));
|
TDocumento& myself = *((TDocumento *)this);
|
||||||
const int anno = TDocumento::anno();
|
|
||||||
const TString4 codnum(numerazione());
|
|
||||||
const long ndoc = numero();
|
|
||||||
|
|
||||||
// Legge le provvigioni per questo documento
|
myself.update_provvigioni(true);
|
||||||
_provv_agente->read(agente, anno,codnum,ndoc);
|
|
||||||
// Le rimuove
|
|
||||||
_provv_agente->remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TMultiple_rectype::remove(f);
|
return TMultiple_rectype::remove(f);
|
||||||
@ -1393,29 +1371,23 @@ void TDocumento::flush_rows()
|
|||||||
remove_body(LF_RIGHEDOC);
|
remove_body(LF_RIGHEDOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
void TDocumento::calc_provvigione(TProvvigioni_agente & provv, const TString & key, bool first, bool generata)
|
||||||
{
|
{
|
||||||
CHECK (_provv_agente, "Bad TProvvigione_agente object");
|
|
||||||
|
|
||||||
TString16 agente(get(DOC_CODAG));
|
|
||||||
const int anno = TDocumento::anno();
|
const int anno = TDocumento::anno();
|
||||||
TString16 codnum(numerazione());
|
const TString4 codnum = numerazione();
|
||||||
const long ndoc = numero();
|
const long ndoc = numero();
|
||||||
TDate datadoc(data());
|
const TDate datadoc(data());
|
||||||
|
|
||||||
while (_provv_agente->read(agente, anno,codnum,ndoc) == _islocked) // Legge le provvigioni per questo documento
|
while (provv.read(key, anno, codnum, ndoc) == _islocked) // Legge le provvigioni per questo documento
|
||||||
if (!yesno_box("Dati agente %s in uso da un altro utente. Riprovare?", (const char*) agente))
|
if (!yesno_box("Dati agente %s in uso da un altro utente. Riprovare?", (const char *) key))
|
||||||
return *_provv_agente;
|
return ;
|
||||||
|
|
||||||
const TString16 codval(TDocumento::valuta());
|
|
||||||
const real change(cambio());
|
const real change(cambio());
|
||||||
const real perc = _provv_agente->perc_fatt();
|
const real perc = provv.perc_fatt();
|
||||||
TCurrency_documento tot_doc(totale_doc(), *this);
|
TCurrency_documento tot_doc(totale_doc(), *this);
|
||||||
TCurrency_documento tot_netto(totale_netto(), *this);
|
TCurrency_documento tot_netto(totale_netto(), *this);
|
||||||
TCurrency_documento tot_provv(provvigione(), *this);
|
TCurrency_documento tot_provv(provvigione(first), *this);
|
||||||
TCurrency_documento provv_fat((tot_provv.get_num() / 100.0) * perc, *this); // Provvigione sul fatturato (rata 0)
|
TCurrency_documento provv_fat((tot_provv.get_num() / 100.0) * perc, *this); // Provvigione sul fatturato (rata 0)
|
||||||
// const int ndec = decimals();
|
|
||||||
// provv_fat.round(ndec);
|
|
||||||
TCurrency_documento provv_pag = tot_provv - provv_fat; // Provvigione sul pagato (da suddivere secondo il pagamento)
|
TCurrency_documento provv_pag = tot_provv - provv_fat; // Provvigione sul pagato (da suddivere secondo il pagamento)
|
||||||
const bool valuta = in_valuta();
|
const bool valuta = in_valuta();
|
||||||
|
|
||||||
@ -1465,7 +1437,6 @@ TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
|||||||
TCurrency zero(ZERO);
|
TCurrency zero(ZERO);
|
||||||
if (valuta)
|
if (valuta)
|
||||||
{
|
{
|
||||||
//real val1 = totimponibili * change;
|
|
||||||
TCurrency_documento val2(pagtotimposte); val2.change_to_firm_val();
|
TCurrency_documento val2(pagtotimposte); val2.change_to_firm_val();
|
||||||
TCurrency_documento val3(pagtotspese); val3.change_to_firm_val();
|
TCurrency_documento val3(pagtotspese); val3.change_to_firm_val();
|
||||||
TCurrency_documento val1(tot_doc); val1.change_to_firm_val(); val1 -= val2 - val3;
|
TCurrency_documento val1(tot_doc); val1.change_to_firm_val(); val1 -= val2 - val3;
|
||||||
@ -1508,8 +1479,8 @@ TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Crea le nuove rate provvigionali
|
// Crea le nuove rate provvigionali
|
||||||
const bool isnew = _provv_agente->items() == 0; // Il documento non ha righe provvigionali
|
const bool isnew = provv.items() == 0; // Il documento non ha righe provvigionali
|
||||||
TRate_doc& rd = _provv_agente->rate(anno, codnum, ndoc, isnew ? TRUE : FALSE);
|
TRate_doc& rd = provv.rate(anno, codnum, ndoc, isnew ? TRUE : FALSE);
|
||||||
|
|
||||||
// A questo punto rd e' vuoto: settiamo i dati del documento:
|
// A questo punto rd e' vuoto: settiamo i dati del documento:
|
||||||
TToken_string t;
|
TToken_string t;
|
||||||
@ -1543,8 +1514,7 @@ TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
|||||||
TRata& rt = rd.row(0,TRUE);
|
TRata& rt = rd.row(0,TRUE);
|
||||||
rt.set_rata(0); rt.set_datascad(datadoc); rt.set_tipopag(1);
|
rt.set_rata(0); rt.set_datascad(datadoc); rt.set_tipopag(1);
|
||||||
rt.set_imprata(anticipo.get_num()); rt.set_impprovv(provv_fat.get_num());
|
rt.set_imprata(anticipo.get_num()); rt.set_impprovv(provv_fat.get_num());
|
||||||
if (generata)
|
rt.set_generata(generata);
|
||||||
rt.set_generata();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setta le rate rimanenti
|
// Setta le rate rimanenti
|
||||||
@ -1562,8 +1532,7 @@ TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
|||||||
rt.set_tipopag(pag1.tipo_rata(index));
|
rt.set_tipopag(pag1.tipo_rata(index));
|
||||||
rt.set_imprata(pag1.importo_rata(index,valuta ? TRUE : FALSE));
|
rt.set_imprata(pag1.importo_rata(index,valuta ? TRUE : FALSE));
|
||||||
rt.set_impprovv(pag2->importo_rata(i-1,valuta ? TRUE : FALSE));
|
rt.set_impprovv(pag2->importo_rata(i-1,valuta ? TRUE : FALSE));
|
||||||
if (generata)
|
rt.set_generata(generata);
|
||||||
rt.set_generata();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rimuove eventuali righe in eccesso
|
// Rimuove eventuali righe in eccesso
|
||||||
@ -1571,11 +1540,45 @@ TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
|||||||
for (i = first_rata_ok ? nrate+1 : nrate; i < rd_items; i++)
|
for (i = first_rata_ok ? nrate+1 : nrate; i < rd_items; i++)
|
||||||
rd.remove_rata(i);
|
rd.remove_rata(i);
|
||||||
delete pag2;
|
delete pag2;
|
||||||
return *_provv_agente;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int TDocumento::write_provvigioni()
|
int TDocumento::update_provvigione(bool remove, const bool first)
|
||||||
{ return calc_provvigioni().write(); }
|
{
|
||||||
|
TProvvigioni_agente provv;
|
||||||
|
const TString8 old = first ? _old_agente : _old_agente1;
|
||||||
|
const TString8 agente = first ? get(DOC_CODAG) : get(DOC_CODAGVIS);
|
||||||
|
const int anno = TDocumento::anno();
|
||||||
|
const TString & codnum = numerazione();
|
||||||
|
const long ndoc = numero();
|
||||||
|
const TDate datadoc(data());
|
||||||
|
int err = NOERR;
|
||||||
|
|
||||||
|
if (remove || old != agente)
|
||||||
|
{
|
||||||
|
while (provv.read(old, anno, codnum, ndoc) == _islocked) // Legge le provvigioni per questo documento
|
||||||
|
if (!yesno_box("Dati agente %s in uso da un altro utente. Riprovare?", (const char *) old))
|
||||||
|
return err;
|
||||||
|
if (err != NOERR)
|
||||||
|
return err;
|
||||||
|
err = provv.remove();
|
||||||
|
if (remove)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (agente.blank())
|
||||||
|
return NOERR;
|
||||||
|
calc_provvigione(provv, agente, first);
|
||||||
|
return provv.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
int TDocumento::update_provvigioni(bool remove)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
|
if ((err = update_provvigione(remove)) == NOERR)
|
||||||
|
err = update_provvigione(remove, false);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
bool TDocumento::in_valuta() const
|
bool TDocumento::in_valuta() const
|
||||||
{
|
{
|
||||||
@ -2257,11 +2260,11 @@ TPagamento& TDocumento::pagamento()
|
|||||||
return _pag;
|
return _pag;
|
||||||
}
|
}
|
||||||
|
|
||||||
real TDocumento::provvigione(int ndec) const
|
real TDocumento::provvigione(bool first, int ndec) const
|
||||||
{
|
{
|
||||||
TString16 field = agente().campoprovv();
|
TString16 field = agente(first).campoprovv();
|
||||||
if (field.empty())
|
if (field.empty())
|
||||||
field = tipo().totprovv();
|
field = first ? tipo().totprovv() : tipo().totprovv1();
|
||||||
|
|
||||||
real val;
|
real val;
|
||||||
if (field.not_empty())
|
if (field.not_empty())
|
||||||
@ -2271,7 +2274,7 @@ real TDocumento::provvigione(int ndec) const
|
|||||||
if (ndec == AUTO_DECIMALS)
|
if (ndec == AUTO_DECIMALS)
|
||||||
ndec = decimals();
|
ndec = decimals();
|
||||||
for (int i = rows(); i > 0; i--)
|
for (int i = rows(); i > 0; i--)
|
||||||
val += ((TRiga_documento &) ((TDocumento *)this)->row(i)).provvigione(ndec);
|
val += ((TRiga_documento &) ((TDocumento *)this)->row(i)).provvigione(first, ndec);
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@ -2367,11 +2370,11 @@ TOccasionale& TDocumento::occas() const
|
|||||||
return (TOccasionale&)_occas;
|
return (TOccasionale&)_occas;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TAgente & TDocumento::agente() const
|
const TAgente & TDocumento::agente(bool first) const
|
||||||
{
|
{
|
||||||
if (_agenti == NULL)
|
if (_agenti == NULL)
|
||||||
_agenti = new TAgenti_cache;
|
_agenti = new TAgenti_cache;
|
||||||
return _agenti->agente(get(DOC_CODAG));
|
return _agenti->agente(first ? get(DOC_CODAG) : get(DOC_CODAGVIS));
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumento & TDocumento::copy(const TDocumento & d)
|
TDocumento & TDocumento::copy(const TDocumento & d)
|
||||||
|
@ -348,6 +348,23 @@ void TTipo_documento::read_formule()
|
|||||||
_formule.add(campo);
|
_formule.add(campo);
|
||||||
_formule.add(_totprovv);
|
_formule.add(_totprovv);
|
||||||
_formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV()"), TRUE);
|
_formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV()"), TRUE);
|
||||||
|
|
||||||
|
campo = prof.get("TOTPROVV1");
|
||||||
|
if (campo.empty())
|
||||||
|
campo = "TOTPROVV1";
|
||||||
|
const TRectype& frd1 = cache().get("%FRD", campo);
|
||||||
|
|
||||||
|
_totprovv1 = "_";
|
||||||
|
_totprovv1 << campo;
|
||||||
|
|
||||||
|
expr = frd1.get("S1");
|
||||||
|
if (expr.empty())
|
||||||
|
expr = "SOMMA(\"PROVV(-883,0)\")";
|
||||||
|
_formule_documento.add(_totprovv1, new TFormula_documento(_documento, _totprovv1, expr));
|
||||||
|
if (_formule.find(campo) < 0)
|
||||||
|
_formule.add(campo);
|
||||||
|
_formule.add(_totprovv1);
|
||||||
|
_formule_documento.add(campo, new TFormula_documento(_documento, campo, "TOTPROVV(-883,0)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
_totale_cont = prof.get("TOTALECONT");
|
_totale_cont = prof.get("TOTALECONT");
|
||||||
@ -461,7 +478,7 @@ int TExpr_documento::parse_user_func(const char * name, int nparms) const
|
|||||||
if (strcmp(name, "IVA") == 0)
|
if (strcmp(name, "IVA") == 0)
|
||||||
return nparms == 0 ? _iva : -1;
|
return nparms == 0 ? _iva : -1;
|
||||||
if (strcmp(name, "PROVV") == 0)
|
if (strcmp(name, "PROVV") == 0)
|
||||||
return nparms < 2 ? _provv : -1;
|
return nparms < 3 ? _provv : -1;
|
||||||
if (strcmp(name, "QUANT") == 0)
|
if (strcmp(name, "QUANT") == 0)
|
||||||
return nparms < 2 ? _quant : -1;
|
return nparms < 2 ? _quant : -1;
|
||||||
if (strcmp(name, "QUANTEVASA") == 0)
|
if (strcmp(name, "QUANTEVASA") == 0)
|
||||||
@ -689,7 +706,11 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
|
|||||||
{
|
{
|
||||||
int ndec = AUTO_DECIMALS;
|
int ndec = AUTO_DECIMALS;
|
||||||
|
|
||||||
if (nparms > 0)
|
bool first = true;
|
||||||
|
|
||||||
|
if (nparms > 1)
|
||||||
|
first = !stack.peek_real().is_zero();
|
||||||
|
if (nparms > 0)
|
||||||
ndec = (int) stack.peek_real().integer();
|
ndec = (int) stack.peek_real().integer();
|
||||||
else
|
else
|
||||||
stack.push(ZERO);
|
stack.push(ZERO);
|
||||||
@ -697,7 +718,7 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
|
|||||||
real & val = stack.peek_real();
|
real & val = stack.peek_real();
|
||||||
|
|
||||||
if (_row)
|
if (_row)
|
||||||
val = _row->provvigione(ndec);
|
val = _row->provvigione(first, ndec);
|
||||||
else
|
else
|
||||||
val = ZERO;
|
val = ZERO;
|
||||||
}
|
}
|
||||||
@ -807,13 +828,17 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
|
|||||||
{
|
{
|
||||||
int ndec = AUTO_DECIMALS;
|
int ndec = AUTO_DECIMALS;
|
||||||
|
|
||||||
|
bool first = true;
|
||||||
|
|
||||||
|
if (nparms > 1)
|
||||||
|
first = !stack.peek_real().is_zero();
|
||||||
if (nparms > 0)
|
if (nparms > 0)
|
||||||
ndec = (int) stack.peek_real().integer();
|
ndec = (int) stack.peek_real().integer();
|
||||||
else
|
else
|
||||||
stack.push(ZERO);
|
stack.push(ZERO);
|
||||||
real & val = stack.peek_real();
|
real & val = stack.peek_real();
|
||||||
|
|
||||||
val = _doc->provvigione(ndec);
|
val = _doc->provvigione(first, ndec);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _pscontot:
|
case _pscontot:
|
||||||
|
@ -65,7 +65,7 @@ void TFatturazione_bolle::campi_raggruppamento(TToken_string& campi) const
|
|||||||
|
|
||||||
// Uguali opzionalmente
|
// Uguali opzionalmente
|
||||||
const char* cond[] = { "CAMBIO", "SCONTO", "TIPODOC", "CODNUM",
|
const char* cond[] = { "CAMBIO", "SCONTO", "TIPODOC", "CODNUM",
|
||||||
"CODPAG", "CODABIA|CODCABA", "CODLIST", "CODAG",
|
"CODPAG", "CODABIA|CODCABA", "CODLIST", "CODAG|CODAGVIS",
|
||||||
"CODSPMEZZO", "CODPORTO", "CAUSTRASP", "CODVETT1|CODVETT2|CODVETT3",
|
"CODSPMEZZO", "CODPORTO", "CAUSTRASP", "CODVETT1|CODVETT2|CODVETT3",
|
||||||
"CODINDSP", "CODCMS",
|
"CODINDSP", "CODCMS",
|
||||||
NULL };
|
NULL };
|
||||||
|
@ -785,6 +785,7 @@ void TDocumento_mask::cli2mask()
|
|||||||
set(F_RAGGREFF, ven_rec.get(CFV_RAGGEFF));
|
set(F_RAGGREFF, ven_rec.get(CFV_RAGGEFF));
|
||||||
set(F_CODINDSP, ven_rec.get(CFV_CODINDSP));
|
set(F_CODINDSP, ven_rec.get(CFV_CODINDSP));
|
||||||
set(F_CODAG, ven_rec.get(CFV_CODAG));
|
set(F_CODAG, ven_rec.get(CFV_CODAG));
|
||||||
|
set(F_CODAGVIS, ven_rec.get(CFV_CODAG1));
|
||||||
set(F_CODSPMEZZO, ven_rec.get(CFV_CODSPMEZZO));
|
set(F_CODSPMEZZO, ven_rec.get(CFV_CODSPMEZZO));
|
||||||
set(F_CODPORTO, ven_rec.get(CFV_CODPORTO));
|
set(F_CODPORTO, ven_rec.get(CFV_CODPORTO));
|
||||||
set(F_CODNOTESP1, ven_rec.get(CFV_CODNOTESP1));
|
set(F_CODNOTESP1, ven_rec.get(CFV_CODNOTESP1));
|
||||||
@ -815,9 +816,9 @@ void TDocumento_mask::cli2mask()
|
|||||||
f.check();
|
f.check();
|
||||||
f.on_hit();
|
f.on_hit();
|
||||||
}
|
}
|
||||||
pos = id2pos(F_CODAG);
|
/* pos = id2pos(F_CODAG);
|
||||||
if (pos >= 0 && fld(pos).active())
|
if (pos >= 0 && fld(pos).active())
|
||||||
fld(pos).set(ven_rec.get(CFV_CODAG));
|
fld(pos).set(ven_rec.get(CFV_CODAG)); */
|
||||||
set(F_CODZON, ven_rec.get(CFV_CODZONA), 0x3);
|
set(F_CODZON, ven_rec.get(CFV_CODZONA), 0x3);
|
||||||
set(F_RAGGR, ven_rec.get(CFV_RAGGDOC));
|
set(F_RAGGR, ven_rec.get(CFV_RAGGDOC));
|
||||||
sconto_testa2mask();
|
sconto_testa2mask();
|
||||||
@ -865,6 +866,9 @@ void TDocumento_mask::cli2mask()
|
|||||||
fld(pos).check();
|
fld(pos).check();
|
||||||
check_field( F_CODCABP );
|
check_field( F_CODCABP );
|
||||||
pos = id2pos(F_CODAG);
|
pos = id2pos(F_CODAG);
|
||||||
|
if (pos >= 0 && fld(pos).active())
|
||||||
|
fld(pos).check();
|
||||||
|
pos = id2pos(F_CODAGVIS);
|
||||||
if (pos >= 0 && fld(pos).active())
|
if (pos >= 0 && fld(pos).active())
|
||||||
fld(pos).check();
|
fld(pos).check();
|
||||||
|
|
||||||
@ -3315,7 +3319,7 @@ bool TDocumento_mask::codcont_handler( TMask_field& f, KEY key )
|
|||||||
{
|
{
|
||||||
if (key == K_TAB && f.focusdirty())
|
if (key == K_TAB && f.focusdirty())
|
||||||
{
|
{
|
||||||
TDocumento_mask& m = (TDocumento_mask&)f.mask();
|
TDocumento_mask& m = (TDocumento_mask&)f.mask();
|
||||||
TLocalisamfile & cont = ((TEdit_field &) f).browse()->cursor()->file();
|
TLocalisamfile & cont = ((TEdit_field &) f).browse()->cursor()->file();
|
||||||
const TDate datadoc(f.mask().get(F_DATADOC));
|
const TDate datadoc(f.mask().get(F_DATADOC));
|
||||||
const TDate datascad(cont.get_date("VALFIN"));
|
const TDate datascad(cont.get_date("VALFIN"));
|
||||||
|
@ -105,9 +105,10 @@
|
|||||||
#define FR_JOLLY10 164
|
#define FR_JOLLY10 164
|
||||||
|
|
||||||
#define FR_RIDPREZZO 165
|
#define FR_RIDPREZZO 165
|
||||||
|
#define FR_PERCPROV1 166
|
||||||
|
|
||||||
// Ultimo campo fittizio
|
// Ultimo campo fittizio
|
||||||
#define FR_END 166
|
#define FR_END 167
|
||||||
|
|
||||||
#define MAX_COLUMNS FR_END-FR_LORDO
|
#define MAX_COLUMNS FR_END-FR_LORDO
|
||||||
|
|
||||||
|
24
ve/verig.uml
24
ve/verig.uml
@ -1230,7 +1230,7 @@ BEGIN
|
|||||||
IFDEF(X_PERCPROV)
|
IFDEF(X_PERCPROV)
|
||||||
PROMPT X_PERCPROV Y_PERCPROV PR_PERCPROV
|
PROMPT X_PERCPROV Y_PERCPROV PR_PERCPROV
|
||||||
ELSEIF
|
ELSEIF
|
||||||
PROMPT 42 13 "Perc.Provv. "
|
PROMPT 42 13 "Provvigione 1 "
|
||||||
ENDIF
|
ENDIF
|
||||||
IFDEF(FL_PERCPROV)
|
IFDEF(FL_PERCPROV)
|
||||||
FLAGS FL_PERCPROV
|
FLAGS FL_PERCPROV
|
||||||
@ -1245,6 +1245,27 @@ ENDIF
|
|||||||
END
|
END
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IFDEF(FLD_PERCPROV1)
|
||||||
|
NUMBER FR_PERCPROV1 5 2
|
||||||
|
BEGIN
|
||||||
|
IFDEF(X_PERCPROV1)
|
||||||
|
PROMPT X_PERCPROV1 Y_PERCPROV1 PR_PERCPROV1
|
||||||
|
ELSEIF
|
||||||
|
PROMPT 65 13 "2 "
|
||||||
|
ENDIF
|
||||||
|
IFDEF(FL_PERCPROV1)
|
||||||
|
FLAGS FL_PERCPROV1
|
||||||
|
ENDIF
|
||||||
|
IFDEF(MS_PERCPROV1)
|
||||||
|
MESSAGE MS_PERCPROV1
|
||||||
|
ENDIF
|
||||||
|
IFDEF(NC_PERCPROV1)
|
||||||
|
NUM_CALC NC_PERCPROV1
|
||||||
|
ENDIF
|
||||||
|
FIELD PERCPROV1
|
||||||
|
END
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IFDEF(FLD_IMPFISUN)
|
IFDEF(FLD_IMPFISUN)
|
||||||
BOOLEAN FR_IMPFISUN
|
BOOLEAN FR_IMPFISUN
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -1515,6 +1536,7 @@ ENDIF
|
|||||||
#ifdef USR_PAGE_1
|
#ifdef USR_PAGE_1
|
||||||
#include USR_PAGE_1
|
#include USR_PAGE_1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PAGE_2
|
#ifdef PAGE_2
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
@ -20,6 +20,7 @@ DEFINE_FIELD(NCOLLI)
|
|||||||
DEFINE_FIELD(DAEVADERE)
|
DEFINE_FIELD(DAEVADERE)
|
||||||
DEFINE_FIELD(SCONTO)
|
DEFINE_FIELD(SCONTO)
|
||||||
DEFINE_FIELD(PERCPROV)
|
DEFINE_FIELD(PERCPROV)
|
||||||
|
DEFINE_FIELD(PERCPROV1)
|
||||||
DEFINE_FIELD(IMPFISSO)
|
DEFINE_FIELD(IMPFISSO)
|
||||||
DEFINE_FIELD(IMPFISUN)
|
DEFINE_FIELD(IMPFISUN)
|
||||||
DEFINE_FIELD(CODIVA)
|
DEFINE_FIELD(CODIVA)
|
||||||
|
@ -28,7 +28,9 @@ F_POS(PREZZO, 42, 9,"Prezzo " )
|
|||||||
DEFINE_FIELD(SCONTO)
|
DEFINE_FIELD(SCONTO)
|
||||||
F_POS(SCONTO, 2, 11,"Sconto " )
|
F_POS(SCONTO, 2, 11,"Sconto " )
|
||||||
DEFINE_FIELD(PERCPROV)
|
DEFINE_FIELD(PERCPROV)
|
||||||
F_POS(PERCPROV, 42, 11,"Provvigione" )
|
F_POS(PERCPROV, 42, 11,"Provvigione 1 " )
|
||||||
|
DEFINE_FIELD(PERCPROV1)
|
||||||
|
F_POS(PERCPROV1, 65, 11,"2 " )
|
||||||
DEFINE_FIELD(CODIVA)
|
DEFINE_FIELD(CODIVA)
|
||||||
DEFINE_FIELD(DESIVA)
|
DEFINE_FIELD(DESIVA)
|
||||||
DEFINE_FIELD(CAUS)
|
DEFINE_FIELD(CAUS)
|
||||||
|
@ -27,7 +27,9 @@ F_POS(PREZZO, 42, 9,"Prezzo " )
|
|||||||
DEFINE_FIELD(SCONTO)
|
DEFINE_FIELD(SCONTO)
|
||||||
F_POS(SCONTO, 2, 11,"Sconto " )
|
F_POS(SCONTO, 2, 11,"Sconto " )
|
||||||
DEFINE_FIELD(PERCPROV)
|
DEFINE_FIELD(PERCPROV)
|
||||||
F_POS(PERCPROV, 42, 11,"Provvigione" )
|
F_POS(PERCPROV, 42, 11,"Provvigione 1 " )
|
||||||
|
DEFINE_FIELD(PERCPROV1)
|
||||||
|
F_POS(PERCPROV1, 65, 11,"2 " )
|
||||||
DEFINE_FIELD(CODIVA)
|
DEFINE_FIELD(CODIVA)
|
||||||
DEFINE_FIELD(DESIVA)
|
DEFINE_FIELD(DESIVA)
|
||||||
DEFINE_FIELD(CAUS)
|
DEFINE_FIELD(CAUS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user