Corretta gestione insoluti nel nuovo saldaconto per Nuova Bienne
git-svn-id: svn://10.65.10.50/branches/R_10_00@22704 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									8572e8db24
								
							
						
					
					
						commit
						3da47503ab
					
				@ -43,7 +43,7 @@ bool TNew_game_mask::on_field_event(TOperable_field& o, TField_event e, long jol
 | 
				
			|||||||
        ok = p.last() <= 0;
 | 
					        ok = p.last() <= 0;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (!ok)
 | 
					      if (!ok)
 | 
				
			||||||
        error_box("La partita %d/%s esiste già", anno, (const char*)part);
 | 
					        error_box(FR("La partita %d/%s esiste già"), anno, (const char*)part);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  default:
 | 
					  default:
 | 
				
			||||||
@ -515,13 +515,16 @@ bool TEasySolder_mask::on_field_event(TOperable_field& o, TField_event e, long j
 | 
				
			|||||||
          const TString8 num = m.get(S_PARTITA);
 | 
					          const TString8 num = m.get(S_PARTITA);
 | 
				
			||||||
          const int nriga = m.get_int(S_RIGAF);
 | 
					          const int nriga = m.get_int(S_RIGAF);
 | 
				
			||||||
          const int nrata = m.get_int(S_RATA);
 | 
					          const int nrata = m.get_int(S_RATA);
 | 
				
			||||||
            TPartita& game = app().partite().partita(_conto, anno, num);
 | 
					          const TPartita& game = app().partite().partita(_conto, anno, num);
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (game.esiste(nriga, nrata))
 | 
					            if (game.esiste(nriga, nrata))
 | 
				
			||||||
              residuo = game.rata(nriga, nrata).residuo(true).valore();
 | 
					              residuo = game.rata(nriga, nrata).residuo(true).valore();
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          if (!residuo.is_zero())
 | 
					          if (!residuo.is_zero())
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            m.set(S_IMPORTO, residuo);
 | 
					            m.set(S_IMPORTO, residuo);
 | 
				
			||||||
 | 
					            if (_tipomov != tm_insoluto && _tipomov != tm_nota_credito)
 | 
				
			||||||
              m.set(S_SALDO, true);
 | 
					              m.set(S_SALDO, true);
 | 
				
			||||||
            if (in_valuta())
 | 
					            if (in_valuta())
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
@ -938,7 +941,7 @@ void TEasySolder_mask::fill_sheet()
 | 
				
			|||||||
  const TString& codval = get(G_VALUTA);
 | 
					  const TString& codval = get(G_VALUTA);
 | 
				
			||||||
  const real cambio = get(G_CAMBIO);
 | 
					  const real cambio = get(G_CAMBIO);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  s.enable_column(S_SALDO, _tipomov != tm_insoluto);
 | 
					  s.enable_column(S_SALDO, _tipomov != tm_insoluto && _tipomov != tm_nota_credito);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const bool in_val = in_valuta();
 | 
					  const bool in_val = in_valuta();
 | 
				
			||||||
  s.enable_column(S_IMPORTO_EUR, in_val);
 | 
					  s.enable_column(S_IMPORTO_EUR, in_val);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user