Plugins  LAST
 All Data Structures Files Functions Variables Pages
Public Member Functions
Bank_Item Class Reference
Collaboration diagram for Bank_Item:
Collaboration graph

Public Member Functions

 __construct ($id=-1)
 
 show_item ($ctl)
 show a dialog box to reconciliate or remove a record, is using the $_GET[id] for importbank.import_temp More...
 
 show_delete ($ctl)
 
 update ()
 

Detailed Description

Definition at line 27 of file class_bank_item.php.

Constructor & Destructor Documentation

Bank_Item::__construct (   $id = -1)

Definition at line 29 of file class_bank_item.php.

References $id.

30  {
31  $this->id=$id;
32  }

Member Function Documentation

Bank_Item::show_delete (   $ctl)

Definition at line 135 of file class_bank_item.php.

References $cn, $id, and $msg.

136  {
137  global $cn,$msg;
138  $id=$_GET['id'];
139  $bi=new Temp_Bank_Sql($cn,$id);
140  $jrn='';
141  if ( $bi->jrn_def_id != '')
142  {
143  $jrn=$cn->get_value('select jrn_def_name from jrn_def where jrn_def_id=$1',
144  array($bi->jrn_def_id));
145  }
146  require_once('template/delete_item.php');
147 
148  }
$msg
global $cn
Bank_Item::show_item (   $ctl)

show a dialog box to reconciliate or remove a record, is using the $_GET[id] for importbank.import_temp

Definition at line 36 of file class_bank_item.php.

References $amount, $cn, $date, $extra, $id, $msg, and $name.

37  {
38  global $cn,$msg;
39  $id=$_GET['id'];
40  $bi=new Temp_Bank_Sql($cn,$id);
41  $jrn='';
42  if ( $bi->jrn_def_id != '')
43  {
44  $jrn=$cn->get_value('select jrn_def_name from jrn_def where jrn_def_id=$1',
45  array($bi->jrn_def_id));
46  $w=new ICard();
47  $w->jrn=$bi->jrn_def_id;
48  $w->name='fiche'.$id;
49  $w->extra='filter';
50  $w->typecard='deb';
51  $w->set_dblclick("fill_ipopcard(this);");
52  $w->set_attribute('ipopup','ipopcard');
53  $w->set_attribute('label','e_third');
54  $w->set_attribute('typecard','deb');
55  $w->set_callback('filter_card');
56  $w->set_function('fill_data');
57  $w->set_attribute('inp','fiche');
58  $w->autocomplete=1;
59  $w->choice="choice_suggest".$ctl;
60  $w->choice_create=0;
61  $wConcerned=new IConcerned();
62  $wConcerned->name="e_concerned".$id;
63  $wConcerned->amount_id=abs($bi->amount);
64  $wConcerned->extra2='paid';
65  $wConcerned->label=_('op. concernée');
66  $wConcerned->table=0;
67  $wConcerned->value=$bi->tp_rec;
68  $wConcerned->tiers=$w->name;
69 
70  $name='';$status='';
71  if ( $bi->f_id != null)
72  {
73  $w->value=$cn->get_value('select ad_value from fiche_detail where f_id=$1 and ad_id=23',array($bi->f_id));
74  $name=$cn->get_value('select ad_value from fiche_detail where f_id=$1 and ad_id=1',array($bi->f_id));
75  }
76  $third=new IText('tp_third');
77  $third->value=$bi->tp_third;
78 
79  $extra=new IText('tp_extra');
80  $extra->value=$bi->tp_extra;
81  if ( strlen($bi->libelle) > 20)
82  {
83  $libelle=new ITextArea('libelle');
84  $libelle->value=$bi->libelle;
85  $libelle->heigh=3;
86  $libelle->width=60;
87 
88  }
89  else
90  {
91  $libelle=new IText('libelle');
92  $libelle->value=$bi->libelle;
93  $libelle->size=strlen($bi->libelle);
94  }
95  $amount=new INum('amount');
96  $amount->value=$bi->amount;
97 
98  $date=new IDate('tp_date');
99  $date->value=$bi->tp_date;
100 
101  switch($bi->status)
102  {
103  case 'N':
104  $status='Nouveau';
105  break;
106  case 'E':
107  $status='Erreur : '.$bi->tp_error_msg;
108  break;
109  case 'W':
110  $status='Attente';
111  break;
112  case 'T':
113  $status='Transféré';
114  $w->readOnly=true;
115  $wConcerned->readOnly=true;
116  $amount->readOnly=true;
117  $third->readOnly=true;
118  $extra->readOnly=true;
119  $libelle->readOnly=true;
120  $date->readOnly=true;
121 
122  break;
123  case 'D':
124  $status='Effacer';
125  break;
126 
127  }
128  }
129  $remove=new ICheckBox('remove');
130  $recup=new ICheckBox('recup');
131 
132 
133  require_once('template/detail_item.php');
134  }
$msg
$extra
Definition: ajax.php:33
global $cn
$name
Bank_Item::update ( )

Definition at line 149 of file class_bank_item.php.

References $cn.

150  {
151  global $cn;
152  $bi_sql=new Temp_Bank_Sql($cn,$this->id);
153  $bi_sql->f_id=$this->f_id;
154  $bi_sql->status=$this->status;
155  $bi_sql->tp_rec=$this->tp_rec;
156 
157  $bi_sql->update();
158  }
global $cn

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