diff --git a/cg/cg0500b.uml b/cg/cg0500b.uml index 13abef9be..83e2373e6 100755 --- a/cg/cg0500b.uml +++ b/cg/cg0500b.uml @@ -2,7 +2,7 @@ PAGE "" -1 -1 68 11 -STRING 101 22 +STRING 101 21 BEGIN PROMPT 1 1 "Tipo " FLAGS "D" diff --git a/cg/cg2104.cpp b/cg/cg2104.cpp index f0f7060d9..456cdc090 100755 --- a/cg/cg2104.cpp +++ b/cg/cg2104.cpp @@ -632,16 +632,16 @@ int TPrimanota_application::nuovo_pagamento(TPartita& partita, int rata, int rmo caus = 2; break; } + TBill bill; causale().bill(caus, bill); // Legge conto contropartita + if (bill.empty()) causale().bill(caus = 1, bill); + bill.put(part, TRUE); + // PART_TIPOC viene preso dalla partita base // PART_GRUPPO viene preso dalla partita base // PART_CONTO viene preso dalla partita base // PART_SOTTOCONTO viene preso dalla partita base - TBill bill; causale().bill(caus, bill); - if (bill.empty()) causale().bill(caus = 1, bill); - bill.put(part, TRUE); - - bill.get(partita.riga(1)); + bill.get(part); // Legge conto principale if (bill.tipo() > ' ') // Se cliente o fornitore cerca sua banca { TRelation cliforel(LF_CLIFO); @@ -823,7 +823,7 @@ bool TPrimanota_application::edit_pagamento(TPartita& p, TRectype& part) m.set(S_IMPORTOVAL, scaden.get(SCAD_IMPORTOVAL)); // " in valuta m.set(S_RATA, scaden.get(SCAD_NRATA)); - const char sez = part.get_char(PART_SEZ); // Sezione importo e rituenute + const char sez = parbas.get_char(PART_SEZ); // Sezione importo e rituenute const char controsez = sez == 'D' ? 'A' : 'D'; // Sezione opposta // Memorizza importi prima di eventuali variazioni @@ -852,10 +852,10 @@ bool TPrimanota_application::edit_pagamento(TPartita& p, TRectype& part) const TImporto new_importo(controsez, part.get_real(PART_IMPORTO)); if (!new_importo.is_zero()) { - TBill conto; conto.get(part); - const int riga = bill2pos(conto, 'I'); + TBill new_conto; conto.get(part, TRUE); + const int riga = bill2pos(new_conto, 'I'); if (riga < 0) - set_cgs_row(riga, new_importo, conto, part.get(PART_DESCR), 'I'); + set_cgs_row(riga, new_importo, new_conto, part.get(PART_DESCR), 'I'); else add_cgs_imp(riga, new_importo); }