diff --git a/cg/cg2100p.uml b/cg/cg2100p.uml index 2fafb736c..843cdc370 100755 --- a/cg/cg2100p.uml +++ b/cg/cg2100p.uml @@ -106,8 +106,8 @@ BEGIN ITEM "Descrizione@20" ITEM "Importo Lire@14" ITEM "Importo Valuta@14" - ITEM "Num. reg." - ITEM "Data reg.@10" + ITEM "Num. op. " + ITEM "Data op.@10" ITEM "Num. doc." ITEM "Prot. IVA" ITEM "Pagamento" @@ -145,7 +145,7 @@ END DATA 103 BEGIN - PROMPT 1 4 "Data documento " + PROMPT 1 4 "Data documento " END STRING 104 7 @@ -211,12 +211,12 @@ END NUMBER 108 5 BEGIN - PROMPT 1 3 "Numero reg. " + PROMPT 1 3 "Numero op. " END DATE 109 BEGIN - PROMPT 41 3 "Data reg. " + PROMPT 41 3 "Data op. " END STRING 110 7 diff --git a/cg/cg2100s.uml b/cg/cg2100s.uml index 0f523ba53..e19c5d023 100755 --- a/cg/cg2100s.uml +++ b/cg/cg2100s.uml @@ -174,7 +174,6 @@ BEGIN ITEM "7|Tratta accettata" ITEM "8|Rapporti interbancari diretti" ITEM "9|Bonifico" - ITEM "0|Altro" END DATE S_DATAPAG diff --git a/cg/cg2101.cpp b/cg/cg2101.cpp index 65f02c532..a0d0c74b2 100755 --- a/cg/cg2101.cpp +++ b/cg/cg2101.cpp @@ -129,14 +129,16 @@ bool TMovimentoPN::controlla_liquidazione(const TDate& data, TRegistro& registro lim.setkey(1); lim.put("CODTAB", key); if (lim.read() == NOERR) + { calcolata = data.month() <= registro.mese_stampa_ultima_liq(); // Controlla se progressivi ricalcolati (registri) - if (reset) - { - // Resetta i flag di calcolato sulla liquidazione IVA del mese di registrazione - lim.zero("B0"); // calcolato - lim.zero("B1"); // progressivi ricalcolati - lim.rewrite(); + if (reset) + { + // Resetta i flag di calcolato sulla liquidazione IVA del mese di registrazione + lim.zero("B0"); // calcolato + lim.zero("B1"); // progressivi ricalcolati + lim.rewrite(); + } } if (reset) diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index 07ec9008d..efb3d37b4 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -1678,7 +1678,7 @@ bool TPrimanota_application::datadoc_handler(TMask_field& f, KEY key) const TDate dd(f.get()); // Fattura o nota credito if (dd.ok()) { - if (m.get(F_ANNORIF).empty()) + if (m.get(F_ANNORIF).empty() && m.insert_mode()) m.set(F_ANNORIF, dd.year()); // copia anno documento if (app().is_fattura()) { diff --git a/cg/cg2104.cpp b/cg/cg2104.cpp index b1efa1078..41058f0d4 100755 --- a/cg/cg2104.cpp +++ b/cg/cg2104.cpp @@ -352,10 +352,11 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key) { TMask& m = f.mask(); const bool empty = f.get().blank() && !m.get_bool(F_SOLAIVA); + const TString16 numprot(m.get(app()._npart_is_prot ? F_PROTIVA : F_NUMDOC)); - if (empty && f.focusdirty() && m.insert_mode()) + if (empty && numprot.not_empty() && f.focusdirty() && m.insert_mode()) { - f.set(m.get(app()._npart_is_prot ? F_PROTIVA : F_NUMDOC)); + f.set(numprot); if (m.get(F_CODPAG).empty()) { TMask_field& clifo = m.field(app().iva() == iva_vendite ? F_CLIENTE : F_FORNITORE); @@ -370,7 +371,7 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key) if (key == K_ENTER && m.edit_mode()) { const TPartita* old = app().partite().first(); - if (old && empty) // Se esisteva una partita ma ora non piu' + if (old && old->anno() > 0 && empty) // Se esisteva una partita ma ora non piu' { const KEY k = yesnocancel_box("Attenzione la fattura della partita %d %s verra' eliminata.\n" "Premere SI per cancellarla, NO per ripristinarla, ANNULLA per modificarla", @@ -476,13 +477,12 @@ bool TPrimanota_application::recalc_handler(TMask_field& f, KEY key) ps.enable_column(3, recalc_aut); ps.sheet_mask().enable(DLG_DELREC, !recalc_aut); TPagamento& pag = app().pagamento(); - if (pag.tipo_prima_rata() >= 4) - { - ps.enable_cell(0, 1, !recalc_aut); - ps.enable_cell(0, 2, !recalc_aut); - if (recalc_aut) - ps.disable_cell(0, 3); - } + const bool on = pag.tipo_prima_rata() < 4 || !recalc_aut; + ps.enable_cell(0, 1, on); + ps.enable_cell(0, 2, on); +// if (recalc_aut) +// ps.disable_cell(0, 3, ); + ps.enable_cell(0, 3, on); ps.force_update(); } diff --git a/cg/cg2105.cpp b/cg/cg2105.cpp index d1e96220f..8b8799b62 100755 --- a/cg/cg2105.cpp +++ b/cg/cg2105.cpp @@ -611,6 +611,9 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) if (k == K_TAB) { + const bool changing_row = gm._riga_partite != r; + if (!changing_row) + return TRUE; gm._riga_partite = r; TSheet_field& sheet = gm.scadenze(); @@ -824,7 +827,9 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) gm._valfirst = prima_valuta; } - sheet.force_update(); + sheet.force_update(); + if (sheet.items() > 0 && sheet.selected() > 0) + sheet.select(0, TRUE); } if (k == K_INS) { @@ -1388,8 +1393,9 @@ void TGame_mask::fill_partite() aggiorna_residuo(); if (a.items() > 1) - { - partite().select(r, TRUE); + { + _riga_partite = -1; + partite().select(r, TRUE); } else { diff --git a/cg/pagament.cpp b/cg/pagament.cpp index 30a6862c0..bf6739dfd 100755 --- a/cg/pagament.cpp +++ b/cg/pagament.cpp @@ -1668,7 +1668,7 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad) for (int d = sf.items()-1; d >= i; d--) sf.destroy(d, FALSE); - sf.enable_column(2, in_valuta); + // sf.enable_column(2, in_valuta); } else { @@ -1696,9 +1696,9 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad) // disabilita campi da non toccare sulla prima rata if (_inited) { - sf.enable_cell(0, 1, abilita); // importo - sf.enable_cell(0, 2, abilita); // in valuta - sf.enable_cell(0, 3, abilita); // percentuale +// sf.enable_cell(0, 1, abilita); // importo +// sf.enable_cell(0, 2, abilita); // in valuta +// sf.enable_cell(0, 3, abilita); // percentuale } else {