Files correlati : co0.exe co1.exe Ricompilazione Demo : [ ] Commento : aggiunta stampa progressivi conferimenti Varie stampe dei vongolari. stampa per data licenza Modificato il tracciato dell'importazione conferimenti Non genera piu' documenti se il totale documento campione e' 0 Prima prova di filtro per stampa soci INAIL Creazione report , stampa soci inail Acconto 8% sui progressivi piu' modifiche alle stampe 8% e stampa progressivi Filtro sulla stampa co2200a per data licenza Totale sulla stampa progressivi Progressivi modificabili con shift f12 aggiunta stampa registro carico scarico Dalla versione 3.2 git-svn-id: svn://10.65.10.50/trunk@20584 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			114 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			114 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| #include <applicat.h>
 | |
| #include <automask.h>
 | |
| #include <form.h>
 | |
| #include <report.h>
 | |
| #include <reprint.h>
 | |
| #include <tabutil.h>
 | |
| #include <textset.h>
 | |
| 
 | |
| #include "co2.h"
 | |
| #include "co2400a.h"
 | |
| 
 | |
| #include "socicoop.h"
 | |
| 
 | |
| #include "..\ve\velib.h"
 | |
| #include "..\ve\velib07.h"
 | |
| 
 | |
| 
 | |
| ////////////////////////////////////////////////////////
 | |
| //	MASCHERA
 | |
| ////////////////////////////////////////////////////////
 | |
| class TRegistroCS_mask : public TAutomask
 | |
| {
 | |
| protected:
 | |
|   bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | |
| public:
 | |
|   TRegistroCS_mask();
 | |
|   virtual ~TRegistroCS_mask() {};
 | |
| };
 | |
|   
 | |
| TRegistroCS_mask::TRegistroCS_mask() :TAutomask ("co2400a")
 | |
| {
 | |
| }  
 | |
| 
 | |
| bool TRegistroCS_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
 | |
| { 
 | |
| 	return true;
 | |
| }
 | |
| 
 | |
| /////////////////////////////////////////////////////////////
 | |
| //  REPORT
 | |
| /////////////////////////////////////////////////////////////
 | |
| class TRegistroCS_report : public TReport
 | |
| {
 | |
| protected:
 | |
| virtual bool use_mask() { return false; }
 | |
| public:
 | |
|   TRegistroCS_report() {}
 | |
| };
 | |
| 
 | |
| 
 | |
| ////////////////////////////////////////////////////////
 | |
| //	APPLICAZIONE
 | |
| ////////////////////////////////////////////////////////
 | |
| 
 | |
| class TRegistroCS : public TSkeleton_application
 | |
| {
 | |
| public:
 | |
|   virtual void main_loop();
 | |
| };
 | |
| 
 | |
| 
 | |
| 
 | |
| ////////////////////////////////////////////////////////
 | |
| //	APPLICAZIONE
 | |
| ////////////////////////////////////////////////////////
 | |
| 
 | |
| class TEstrattoConto : public TSkeleton_application
 | |
| {
 | |
| public:
 | |
|   virtual void main_loop();
 | |
| };
 | |
| 
 | |
| void TEstrattoConto::main_loop()
 | |
| {
 | |
|   TRegistroCS_mask m;
 | |
|   while (m.run() == K_ENTER)
 | |
|   {
 | |
| 		TReport_book book;
 | |
| 		TRegistroCS_report rep;
 | |
| 		if (rep.load("co2400a"))
 | |
| 		{
 | |
| 			const TString8 codnum = m.get(F_CODNUM);
 | |
| 			const TString8 tipodoc = m.get(F_TIPODOC);
 | |
| 			const int anno = m.get_int(F_ANNO);
 | |
| 			const int perc = m.get_int(F_PERC);
 | |
| 			
 | |
| 			// creo recordset dei soci da stampare
 | |
| 			TISAM_recordset soci("USE SOCICOOP\nFROM CODCF=#DASOCIO\nTO CODCF=#ASOCIO");
 | |
| 			soci.set_var("#DASOCIO", m.get_long(F_DASOCIO));
 | |
| 			soci.set_var("#ASOCIO", m.get_long(F_ASOCIO));
 | |
| 
 | |
| 			for (bool ok = soci.move_first(); ok; ok = soci.move_next())
 | |
| 			{
 | |
| 				TRecordset* r = rep.recordset();
 | |
| 				long codcf = soci.get(SC_CODCF).as_int();
 | |
| 				r->set_var("#SOCIO", soci.get("CODCF"));
 | |
| 				r->set_var("#ANNO", TVariant(long(anno)));
 | |
| 				r->set_var("#CODNUM", codnum);
 | |
| 				r->set_var("#TIPODOC", tipodoc);
 | |
| 				r->set_var("#PERC", TVariant(long(perc)), true);     				
 | |
| 				book.add(rep);
 | |
| 			}
 | |
| 			book.print_or_preview();
 | |
| 		}
 | |
| 	}
 | |
| }
 | |
| 
 | |
| int co2400(int argc, char* argv[])
 | |
| {
 | |
|   TEstrattoConto a;
 | |
|   a.run(argc, argv, TR("Stampa registro carico e scarico"));
 | |
|   return 0;
 | |
| }
 |