Plugins  LAST
 All Data Structures Files Functions Variables Pages
Public Member Functions
Impacc_Operation Class Reference

Redirect to CSV or other format. More...

Collaboration diagram for Impacc_Operation:
Collaboration graph

Public Member Functions

 record_file (Impacc_File $p_file)
 call the right filter to import operation More...
 
 check (Impacc_File $p_file)
 call the check and validate import , depending of the format (CSV...) More...
 
 transfer (Impacc_File $p_file)
 Transfer operation from uploaded file to the tables of Noalyss. More...
 

Detailed Description

Redirect to CSV or other format.

Definition at line 27 of file class_impacc_operation.php.

Member Function Documentation

Impacc_Operation::check ( Impacc_File  $p_file)

call the check and validate import , depending of the format (CSV...)

Definition at line 51 of file class_impacc_operation.php.

52  {
53  switch ($p_file->format)
54  {
55  case 'CSV':
56 
57  $csv=new Impacc_CSV();
58  $csv->check($p_file);
59  break;
60 
61  default:
62  break;
63  }
64  }
Used by all Import CSV Operation , contains the setting (delimiter,thousand ...)
Impacc_Operation::record_file ( Impacc_File  $p_file)

call the right filter to import operation

Following the ledger type we have to use impacc_csv_bank, sale_purchase or mis_operation

Definition at line 30 of file class_impacc_operation.php.

31  {
32  // in p_file we have the type CSV , XML NOALYSS or XML FEC
33  switch ($p_file->format)
34  {
35  case "CSV":
36  /**
37  * Following the ledger type we have to use impacc_csv_bank,
38  * sale_purchase or mis_operation
39  *
40  */
41  $csv=new Impacc_CSV();
42 
43  $csv->record($p_file);
44  break;
45 
46  default:
47  throw new Exception(_("Non supporté"), 1);
48  }
49  }
Used by all Import CSV Operation , contains the setting (delimiter,thousand ...)
Impacc_Operation::transfer ( Impacc_File  $p_file)

Transfer operation from uploaded file to the tables of Noalyss.

Parameters
$p_fileImpacc_File $p_file

Definition at line 68 of file class_impacc_operation.php.

References $obj.

69  {
70  switch($p_file->format)
71  {
72  case 'CSV':
73  $csv=new Impacc_CSV();
74  $obj=$csv->make_csv_class($p_file->import_file->id);
75  $obj->transfer();
76  break;
77  default:
78  throw new Exception(_("Non supporté"), 1);
79 
80  }
81  }
Used by all Import CSV Operation , contains the setting (delimiter,thousand ...)

The documentation for this class was generated from the following file: