Corretta gestione ulteriori classificazioni
git-svn-id: svn://10.65.10.50/trunk@2098 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6ffb5fc2b5
commit
01f6871d6b
@ -37,6 +37,7 @@ BEGIN
|
||||
PROMPT 1 5 "Tipo pagamento "
|
||||
SHEET "Codice|Tipo pagamento@32"
|
||||
INPUT 105
|
||||
ITEM " |Altro pagamento"
|
||||
ITEM "1|Rimessa diretta o contanti"
|
||||
ITEM "2|Tratta"
|
||||
ITEM "3|Ricevuta Bancaria"
|
||||
@ -44,14 +45,15 @@ BEGIN
|
||||
ITEM "5|Paghero'"
|
||||
ITEM "6|Lettera di credito"
|
||||
ITEM "7|Tratta accettata"
|
||||
ITEM "8|Altro pagamento"
|
||||
ITEM "8|Rapporti interban. diretti"
|
||||
ITEM "9|Bonifici"
|
||||
OUTPUT 105
|
||||
OUTPUT 107
|
||||
END
|
||||
|
||||
STRING 106 1
|
||||
BEGIN
|
||||
PROMPT 1 6 "Ulter. class. "
|
||||
PROMPT 21 5 "Ulter. class. "
|
||||
USE %CLR
|
||||
INPUT CODTAB[1,1] 105 SELECT
|
||||
INPUT CODTAB[2,2] 106
|
||||
@ -62,7 +64,7 @@ BEGIN
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING 107 32
|
||||
STRING 107 50 32
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descrizione "
|
||||
FLAGS "D"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <applicat.h>
|
||||
#include <utility.h>
|
||||
#include "pagament.h"
|
||||
|
||||
@ -599,7 +600,7 @@ const char* TPagamento::desc_tipo(int tipo, char ulc) const
|
||||
{
|
||||
case 1: o = "Rimessa diretta o contanti"; break;
|
||||
case 2: o = "Tratta"; break;
|
||||
case 3: o = "Ricevuta bancaria"; break;
|
||||
case 3: o = "Ricevuta Bancaria"; break;
|
||||
case 4: o = "Cessione"; break;
|
||||
case 5: o = "Paghero'"; break;
|
||||
case 6: o = "Lettera di credito"; break;
|
||||
@ -1232,6 +1233,8 @@ int TPagamento::remove(TTable& r)
|
||||
|
||||
void TPagamento::set_rate_auto()
|
||||
{
|
||||
main_app().begin_wait();
|
||||
|
||||
// vedi rate esistenti e tipo prima rata
|
||||
// deve fare riferimento ad un tipo pagamento esistente
|
||||
// e sensato
|
||||
@ -1278,6 +1281,8 @@ void TPagamento::set_rate_auto()
|
||||
// prima rata
|
||||
if (_tpr > 0 && _tpr < 4)
|
||||
set_imprata(0, tpay_rata(0) + _secndr);
|
||||
|
||||
main_app().end_wait();
|
||||
}
|
||||
|
||||
|
||||
@ -1337,6 +1342,8 @@ void TPagamento::set_total(const real& imponibile, const real& imposta, const re
|
||||
|
||||
void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
{
|
||||
main_app().begin_wait();
|
||||
|
||||
if (_inited && _rate.items() > 0)
|
||||
{
|
||||
const bool in_valuta = _cambio != 1.0;
|
||||
@ -1369,16 +1376,19 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
ts.add(paid ? "X" : "", 11); // 11 - Pagaya
|
||||
}
|
||||
|
||||
// destroy remaining
|
||||
while (sf.items() > i)
|
||||
sf.destroy(sf.items()-1);
|
||||
// destroy remaining but avoid screen update by now
|
||||
TString_array& arr = sf.rows_array();
|
||||
for (int d = arr.items()-1; d >= i; d--)
|
||||
arr.destroy(d);
|
||||
|
||||
sf.enable_column(2, in_valuta);
|
||||
}
|
||||
else
|
||||
if (_rate.items() > 0) // not inited: set edit sheet
|
||||
{
|
||||
if (sf.items() > 0) sf.destroy();
|
||||
TString_array& arr = sf.rows_array();
|
||||
arr.destroy(); // Avoid screen update by now
|
||||
|
||||
for (int i = 0, scr = 0; i < n_rate(); i++)
|
||||
{
|
||||
TToken_string& s = sf.row(-1);
|
||||
@ -1430,6 +1440,7 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
}
|
||||
|
||||
sf.force_update();
|
||||
main_app().end_wait();
|
||||
}
|
||||
|
||||
TPagamento::TPagamento(const char* codtab, const char* data) :
|
||||
|
@ -600,6 +600,9 @@ int TRiga_partite::rata_con_abbuoni_diffcam() const
|
||||
// TPartita
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
char TPartita::_cli_align = 'L';
|
||||
char TPartita::_for_align = 'L';
|
||||
|
||||
TPartita::TPartita(const TBill& clifo, int anno, const char* num)
|
||||
: _part(LF_PARTITE, PART_NRIGA), _unassigned(LF_PAGSCA, "NRIGP")
|
||||
{
|
||||
@ -641,6 +644,24 @@ int TPartita::compare(const TSortable& s) const
|
||||
return strcmp(key, par);
|
||||
}
|
||||
|
||||
void TPartita::modifica_allineamento(char ac, char af)
|
||||
{
|
||||
CHECK(ac == 'L' || ac == 'R', "Allineamento clienti errato");
|
||||
_cli_align = ac;
|
||||
CHECK(af == 'L' || af == 'R', "Allineamento fornitori errato");
|
||||
_for_align = af;
|
||||
}
|
||||
|
||||
// Ritorna l'allineamento corrente del numero partita
|
||||
// L = Sinistra, R = Destra, ' ' = indeterminato
|
||||
char TPartita::allineamento_corrente() const
|
||||
{
|
||||
char all = numero()[0] == ' ' ? 'R' : 'L';
|
||||
if (all == 'L' && numero()[6] != ' ')
|
||||
all = ' ';
|
||||
return all;
|
||||
}
|
||||
|
||||
// Costruisce le righe della partita
|
||||
bool TPartita::read(const TBill& clifo, int year, const char* num)
|
||||
{
|
||||
|
@ -183,10 +183,13 @@ class TPartita : public TSortable
|
||||
TBill _conto;
|
||||
int _anno;
|
||||
TString16 _num;
|
||||
char _align; // current _num alignment
|
||||
|
||||
TRecord_array _part;
|
||||
TRecord_array _unassigned;
|
||||
|
||||
static char _cli_align, _for_align; // default _num alignment
|
||||
|
||||
protected:
|
||||
const char* build_key(TString& key) const;
|
||||
|
||||
@ -247,6 +250,14 @@ public:
|
||||
bool update);
|
||||
bool modifica_pagamento(const TRectype& new_pag);
|
||||
|
||||
static void modifica_allineamento(char a_cli, char a_for);
|
||||
static char allineamento_clienti() { return _cli_align; }
|
||||
static char allineamento_fornitori() { return _for_align; }
|
||||
|
||||
bool allinea();
|
||||
char allineamento_iniziale() const { return _align; }
|
||||
char allineamento_corrente() const;
|
||||
|
||||
TPartita(const TBill& clifo, int anno, const char* num);
|
||||
TPartita(const TRectype& part);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user