From 164505b1329a310a5be415907351fb94c357db38 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 21 Oct 1996 10:39:19 +0000 Subject: [PATCH] *.uml Centrati meglio i bottoni nella toolbar cg2105.cpp Corretta gestione valuta nei pagamenti nuovi git-svn-id: svn://10.65.10.50/trunk@3803 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2100p.uml | 4 ++-- cg/cg2100s.uml | 6 +++--- cg/cg2105.cpp | 20 +++++++++++--------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/cg/cg2100p.uml b/cg/cg2100p.uml index e8d88c32a..2aa27e01d 100755 --- a/cg/cg2100p.uml +++ b/cg/cg2100p.uml @@ -4,12 +4,12 @@ TOOLBAR "" 0 20 0 2 BUTTON DLG_OK 10 2 BEGIN - PROMPT -12 -1 "" + PROMPT -12 -11 "" END BUTTON P_NUOVO 10 2 BEGIN - PROMPT -22 -1 "~Nuovo" + PROMPT -22 -11 "~Nuovo" PICTURE 105 END diff --git a/cg/cg2100s.uml b/cg/cg2100s.uml index 863f818dc..acf084d52 100755 --- a/cg/cg2100s.uml +++ b/cg/cg2100s.uml @@ -6,12 +6,12 @@ TOOLBAR "" 0 20 0 2 BUTTON DLG_OK 10 2 BEGIN - PROMPT -13 -1 "Conferma" + PROMPT -13 -11 "Conferma" END BUTTON DLG_DELREC 10 2 BEGIN - PROMPT -23 -1 "~Elimina" + PROMPT -23 -11 "~Elimina" PICTURE BMP_DELREC PICTURE BMP_DELRECDN MESSAGE EXIT,K_DEL @@ -19,7 +19,7 @@ END BUTTON DLG_CANCEL 10 2 BEGIN - PROMPT -33 -1 "" + PROMPT -33 -11 "" END ENDPAGE diff --git a/cg/cg2105.cpp b/cg/cg2105.cpp index 22e2499bc..26c9c4b56 100755 --- a/cg/cg2105.cpp +++ b/cg/cg2105.cpp @@ -268,7 +268,16 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, } set(S_DESCR, desfat); - const bool in_valuta = fatt.in_valuta(); + bool in_valuta = fatt.in_valuta(); +#ifdef __EXTRA__ + const bool prima_riga = p.first() == p.last(); + if (!in_valuta && prima_riga) + in_valuta = app().gestione_valuta(); + enable(E_VALUTA, prima_riga); // La valuta puo' essere cambiata solo sulle partite nuove +#endif + show(-3, in_valuta); // Visualizza campi relativi alla valuta + attiva_valuta(in_valuta); // Attiva campi e handlers relativi alla valuta + const char sez_fat = fatt.sezione(); set(S_SEZIONE_SCAD, sez_fat == 'A' ? "A" : "D"); // Sezione della riga if (assigned()) @@ -291,7 +300,6 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, _da_pagare = ZERO; } - attiva_valuta(in_valuta); set_handler(S_SALDOACC, saldo_handler); real oldimp = oldpag.get_real(in_valuta ? PAGSCA_IMPORTOVAL : PAGSCA_IMPORTO); @@ -331,17 +339,11 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, #ifdef __EXTRA__ enable(E_SEZIONE, oldpag.get_char(PAGSCA_ACCSAL) != 'S'); - - // La valuta puo' essere cambiata solo su partite nuove - const bool on = p.first() == p.last(); - enable(E_VALUTA, on); -// show(-3, in_valuta); // Attiva campi relativi alla valuta #else set_handler(S_GRUPPO, conto_handler); set_handler(S_CONTO, conto_handler); const bool mostra_conto = !sum.is_nota_credito(); show(-2, mostra_conto); // mostra/nasconde conto contropartita - show(-3, in_valuta); // Attiva campi relativi alla valuta #endif // Gestione data-pagamento: non puo' precedere la data del documento @@ -1453,7 +1455,7 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k) edit = gm.edit_fattura(game, 0); #endif - if (edit) + if (edit) { gm.set(P_ANNO, anno); gm.set(P_NUMERO, numero);