62 |
$bon->set_infotrans($user, $dt, $_POST["methode"]); |
$bon->set_infotrans($user, $dt, $_POST["methode"]); |
63 |
} |
} |
64 |
} |
} |
65 |
|
else |
66 |
|
{ |
67 |
|
dolibarr_syslog("Fichier invalide",LOG_WARN); |
68 |
|
} |
69 |
|
|
70 |
Header("Location: fiche.php?id=".$_GET["id"]); |
Header("Location: fiche.php?id=".$_GET["id"]); |
71 |
} |
} |
73 |
if ($_POST["action"] == 'infocredit') |
if ($_POST["action"] == 'infocredit') |
74 |
{ |
{ |
75 |
$bon = new BonPrelevement($db,""); |
$bon = new BonPrelevement($db,""); |
76 |
$bon->id = $_GET["id"]; |
$bon->Fetch($_GET["id"]); |
77 |
$dt = mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); |
$dt = mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); |
78 |
|
|
79 |
$bon->set_infocredit($user, $dt); |
$error = $bon->set_infocredit($user, $dt); |
80 |
|
|
81 |
Header("Location: fiche.php?id=".$_GET["id"]); |
if ($error == 0) |
82 |
|
{ |
83 |
|
Header("Location: fiche.php?id=".$_GET["id"]); |
84 |
|
} |
85 |
|
else |
86 |
|
{ |
87 |
|
Header("Location: fiche.php?id=".$_GET["id"]."&error=$error"); |
88 |
|
} |
89 |
} |
} |
90 |
|
|
91 |
llxHeader('','Bon de prélèvement'); |
llxHeader('','Bon de prélèvement'); |
128 |
{ |
{ |
129 |
dolibarr_fiche_head($head, $hselected, 'Prélèvement : '. $bon->ref); |
dolibarr_fiche_head($head, $hselected, 'Prélèvement : '. $bon->ref); |
130 |
|
|
131 |
|
if (isset($_GET["error"])) |
132 |
|
{ |
133 |
|
print '<div class="error">'.$bon->ReadError($_GET["error"]).'</div>'; |
134 |
|
} |
135 |
|
|
136 |
|
|
137 |
|
|
138 |
if ($_GET["action"] == 'credite') |
if ($_GET["action"] == 'credite') |
139 |
{ |
{ |
140 |
$html->form_confirm("fiche.php?id=".$bon->id,"Classer comme crédité","Etes-vous sûr de vouloir classer ce bon de prélèvement comme crédité sur votre compte bancaire ?","confirm_credite"); |
$html->form_confirm("fiche.php?id=".$bon->id,"Classer comme crédité","Etes-vous sûr de vouloir classer ce bon de prélèvement comme crédité sur votre compte bancaire ?","confirm_credite"); |
144 |
print '<table class="border" width="100%">'; |
print '<table class="border" width="100%">'; |
145 |
|
|
146 |
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->ref.'</td></tr>'; |
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->ref.'</td></tr>'; |
147 |
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.strftime("%d %b %Y",$bon->datec).'</td></tr>'; |
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.strftime("%e %B %Y",$bon->datec).'</td></tr>'; |
148 |
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>'; |
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>'; |
149 |
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>'; |
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>'; |
150 |
|
|
164 |
$muser->fetch(); |
$muser->fetch(); |
165 |
|
|
166 |
print '<tr><td width="20%">Date Transmission / Par</td><td>'; |
print '<tr><td width="20%">Date Transmission / Par</td><td>'; |
167 |
print strftime("%d %b %Y",$bon->date_trans); |
print strftime("%e %B %Y",$bon->date_trans); |
168 |
print ' par '.$muser->fullname.'</td></tr>'; |
print ' par '.$muser->fullname.'</td></tr>'; |
169 |
print '<tr><td width="20%">Méthode Transmission</td><td>'; |
print '<tr><td width="20%">Méthode Transmission</td><td>'; |
170 |
print $bon->methodes_trans[$bon->method_trans]; |
print $bon->methodes_trans[$bon->method_trans]; |
173 |
if($bon->date_credit <> 0) |
if($bon->date_credit <> 0) |
174 |
{ |
{ |
175 |
print '<tr><td width="20%">Crédité le</td><td>'; |
print '<tr><td width="20%">Crédité le</td><td>'; |
176 |
print strftime("%d %b %Y",$bon->date_credit); |
print strftime("%e %B %Y",$bon->date_credit); |
177 |
print '</td></tr>'; |
print '</td></tr>'; |
178 |
} |
} |
179 |
|
|