Files correlati : pec.frm sc2.exe sc3100c.msk sc3100s.msk sc1400a.msk Ricompilazione Demo : [ ] Commento : 0001609: 002435 - Pharmatex - valute e stampe Il cliente richiede che nella stampa dell'estratto conto ed in quella dei mastrini venga indicato se la fattura è stata emessa in valuta. Se possibile dare la possibilità (tramite un flag nelle tabelle ditta) di riportare valuta ed importo nella descrizione aggiuntiva documento contabile. git-svn-id: svn://10.65.10.50/branches/R_10_00@21145 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#include <currency.h>
 | 
						|
 | 
						|
#include "sc2102.h"
 | 
						|
 | 
						|
///////////////////////////////////////////////////////////
 | 
						|
// Totalizzatore
 | 
						|
///////////////////////////////////////////////////////////
 | 
						|
 | 
						|
TTotal::TTotal(const TImporto& imp, const real& sca, 
 | 
						|
               const real& esp, const real& eur)
 | 
						|
      : _importo(imp), _scaduto(sca), _esposto(esp), _importo_euro(eur)
 | 
						|
{ }      
 | 
						|
 | 
						|
TTotal::TTotal(const TImporto& uns)
 | 
						|
      : _unassigned(uns)
 | 
						|
{ }      
 | 
						|
 | 
						|
void TTotalizer::add(const TImporto& imp, const real& sca, const real& esp, 
 | 
						|
                     const real& impeur, const TString& val)
 | 
						|
{              
 | 
						|
  TString4 codice(val);
 | 
						|
  if (is_firm_value(codice))
 | 
						|
    codice.cut(0);
 | 
						|
   
 | 
						|
  TObject* obj = objptr(codice);
 | 
						|
  if (obj != NULL)
 | 
						|
  {
 | 
						|
    TTotal& tot = (TTotal&)*obj;
 | 
						|
    tot.importo() += imp;
 | 
						|
    tot.scaduto() += sca;
 | 
						|
    tot.esposto() += esp;
 | 
						|
    tot.importo_euro() += impeur;
 | 
						|
  }
 | 
						|
  else
 | 
						|
  {                     
 | 
						|
    obj = new TTotal(imp, sca, esp, impeur);
 | 
						|
    TAssoc_array::add(codice, obj);
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
void TTotalizer::add(const TImporto& uns, const TString& val)
 | 
						|
{              
 | 
						|
  TString16 codice(val);
 | 
						|
  if (codice == TCurrency::get_firm_val())
 | 
						|
    codice.cut(0);
 | 
						|
   
 | 
						|
  TObject* obj = objptr(codice);
 | 
						|
  if (obj != NULL)
 | 
						|
  {
 | 
						|
    TTotal& tot = (TTotal&)*obj;
 | 
						|
    tot.unassigned() += uns;
 | 
						|
  }
 | 
						|
  else
 | 
						|
  {                     
 | 
						|
    obj = new TTotal(uns);
 | 
						|
    TAssoc_array::add(codice, obj);
 | 
						|
  }
 | 
						|
}
 |