38 |
|
|
39 |
|
|
40 |
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; |
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; |
41 |
|
$orig_account=isset($_GET["orig_account"])?$_GET["orig_account"]:$_POST["orig_account"]; |
42 |
|
|
43 |
$html = new Form($db); |
$html = new Form($db); |
44 |
|
|
185 |
// Confirmations |
// Confirmations |
186 |
if ($_GET["action"] == 'delete_categ') |
if ($_GET["action"] == 'delete_categ') |
187 |
{ |
{ |
188 |
$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"],"Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ"); |
$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,"Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ"); |
189 |
print '<br>'; |
print '<br>'; |
190 |
} |
} |
191 |
|
|
198 |
$acct->fetch($objp->fk_account); |
$acct->fetch($objp->fk_account); |
199 |
$account = $acct->id; |
$account = $acct->id; |
200 |
|
|
201 |
|
// Tableau sur 4 colonne si déja rapproché, sinon sur 5 colonnes |
202 |
|
|
203 |
// Author |
// Author |
204 |
print "<tr><td>".$langs->trans("Author")."</td>"; |
print '<tr><td width="20%">'.$langs->trans("Author")."</td>"; |
205 |
if ($objp->fk_user_author) |
if ($objp->fk_user_author) |
206 |
{ |
{ |
207 |
$author=new User($db,$objp->fk_user_author); |
$author=new User($db,$objp->fk_user_author); |
208 |
$author->fetch(); |
$author->fetch(); |
209 |
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php.id='.$author->id.'">'; |
print '<td colspan="4"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$author->id.'">'; |
210 |
print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.'</td>'; |
print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.'</td>'; |
211 |
} |
} |
212 |
else |
else |
213 |
{ |
{ |
214 |
print "<td colspan=\"3\"> </td>"; |
print '<td colspan="3"> </td>'; |
215 |
} |
} |
216 |
print "</tr>"; |
print "</tr>"; |
217 |
|
|
218 |
$i++; |
$i++; |
|
} |
|
|
|
|
|
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">"; |
|
|
print "<input type=\"hidden\" name=\"action\" value=\"update\">"; |
|
219 |
|
|
220 |
// Account |
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">"; |
221 |
print "<tr><td>".$langs->trans("Account")."</td><td colspan=\"3\">"; |
print "<input type=\"hidden\" name=\"action\" value=\"update\">"; |
222 |
if (! $objp->rappro) |
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">"; |
|
{ |
|
|
$html->select_comptes($acct->id,'accountid',0); |
|
|
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
|
|
} |
|
|
else |
|
|
{ |
|
|
print "<a href=\"account.php?account=".$acct->id."\">".$acct->label."</a>"; |
|
|
} |
|
|
print "</td></tr>"; |
|
223 |
|
|
224 |
// Date ope |
// Account |
225 |
if (! $objp->rappro) |
print "<tr><td>".$langs->trans("Account")."</td>"; |
226 |
{ |
/* |
227 |
print '<tr><td>'.$langs->trans("Date")."</td><td colspan=\"3\">"; |
if (! $objp->rappro) |
228 |
$html->select_date($objp->do,'do'); |
{ |
229 |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
if ($user->rights->banque->modifier && $acct->type != 2 && $acct->rappro) // Si non compte cash et si rapprochable |
230 |
print '</tr>'; |
{ |
231 |
} |
print '<td colspan="3">'; |
232 |
|
$html->select_comptes($acct->id,'accountid',0); |
233 |
// Value date |
print '</td>'; |
234 |
if (! $objp->rappro) |
//print '<td align="center">'; |
235 |
{ |
//print '<input type="submit" class="button" name="conciliate" value="'.$langs->trans("Conciliate").'">'; |
236 |
print "<tr><td>".$langs->trans("DateValue")."</td><td colspan=\"3\">"; |
//print '</td>'; |
237 |
$html->select_date($objp->dv,'dv'); |
} |
238 |
print ' '; |
else |
239 |
print '<a href="ligne.php?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">'; |
{ |
240 |
print img_edit_remove() . "</a> "; |
print '<td colspan="3">'; |
241 |
print '<a href="ligne.php?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">'; |
$html->select_comptes($acct->id,'accountid',0); |
242 |
print img_edit_add() ."</a>"; |
print '</td>'; |
243 |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
} |
244 |
|
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
245 |
|
} |
246 |
|
else |
247 |
|
{ |
248 |
|
*/ |
249 |
|
print '<td colspan="4"><a href="account.php?account='.$acct->id."\">".$acct->label."</a></td>"; |
250 |
|
/* |
251 |
|
} |
252 |
|
*/ |
253 |
print '</tr>'; |
print '</tr>'; |
254 |
} |
|
255 |
|
// Date ope |
256 |
|
print '<tr><td>'.$langs->trans("Date").'</td>'; |
257 |
|
print '<td colspan="3">'; |
258 |
|
if (! $objp->rappro) |
259 |
|
{ |
260 |
|
$html->select_date($objp->do,'do'); |
261 |
|
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
262 |
|
} |
263 |
|
else |
264 |
|
{ |
265 |
|
print dolibarr_print_date($objp->do); |
266 |
|
} |
267 |
|
print '</td></tr>'; |
268 |
|
|
269 |
|
// Value date |
270 |
|
print "<tr><td>".$langs->trans("DateValue")."</td>"; |
271 |
|
print '<td colspan="3">'; |
272 |
|
if (! $objp->rappro) |
273 |
|
{ |
274 |
|
$html->select_date($objp->dv,'dv'); |
275 |
|
print ' '; |
276 |
|
print '<a href="ligne.php?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">'; |
277 |
|
print img_edit_remove() . "</a> "; |
278 |
|
print '<a href="ligne.php?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">'; |
279 |
|
print img_edit_add() ."</a>"; |
280 |
|
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">'; |
281 |
|
} |
282 |
|
else |
283 |
|
{ |
284 |
|
print dolibarr_print_date($objp->dv); |
285 |
|
} |
286 |
|
print "</td></tr>"; |
287 |
|
|
288 |
|
// Description |
289 |
|
print "<tr><td>".$langs->trans("Label")."</td>"; |
290 |
|
if (! $objp->rappro) |
291 |
|
{ |
292 |
|
print '<td colspan="3">'; |
293 |
|
} |
294 |
|
else |
295 |
|
{ |
296 |
|
print '<td colspan="2">'; |
297 |
|
} |
298 |
|
print '<input name="label" class="flat" value="'.$objp->label.'" size="50">'; |
299 |
|
print '</td>'; |
300 |
|
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">'; |
301 |
|
print '</td></tr>'; |
302 |
|
|
303 |
// Description |
// Amount |
304 |
print "<tr><td>".$langs->trans("Label")."</td><td colspan=\"3\">"; |
print "<tr><td>".$langs->trans("Amount")."</td>"; |
305 |
print '<input name="label" class="flat" value="'.$objp->label.'" size="50">'; |
print '<td colspan="3">'; |
306 |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
if (! $objp->rappro) |
307 |
print '</tr>'; |
{ |
308 |
|
print '<input name="amount" class="flat" value="'.price($objp->amount).'">'; |
309 |
// Amount |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">'; |
310 |
if (! $objp->rappro) |
} |
311 |
{ |
else |
312 |
print "<tr><td>".$langs->trans("Amount")."</td><td colspan=\"3\">"; |
{ |
313 |
print '<input name="amount" class="flat" value="'.price($objp->amount).'">'; |
print price($objp->amount); |
314 |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
} |
315 |
print '</tr>'; |
print "</td></tr>"; |
316 |
} |
|
317 |
|
print "</form>"; |
318 |
print "</form>"; |
|
319 |
|
// Type paiement |
320 |
// Type paiement |
print "<tr><td>".$langs->trans("Type")."</td><td colspan=\"3\">"; |
|
print "<tr><td>".$langs->trans("Type")."</td><td colspan=\"3\">"; |
|
|
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">"; |
|
|
print '<input type="hidden" name="action" value="type">'; |
|
|
print $html->select_types_paiements($objp->fk_type,"value",'',2); |
|
|
print '<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ? '' : $objp->num_chq).'">'; |
|
|
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">'; |
|
|
print "</form>"; |
|
|
print "</td></tr>"; |
|
|
|
|
|
// Releve rappro |
|
|
if ($acct->rappro) |
|
|
{ |
|
321 |
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">"; |
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">"; |
322 |
print '<input type="hidden" name="action" value="num_releve">'; |
print '<input type="hidden" name="action" value="type">'; |
323 |
print "<tr><td>".$langs->trans("Conciliation")."</td><td colspan=\"3\">"; |
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">"; |
324 |
print $langs->trans("AccountStatement").' <input name="num_rel" class="flat" value="'.$objp->num_releve.'">'; |
print $html->select_types_paiements($objp->fk_type,"value",'',2); |
325 |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
print '<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ? '' : $objp->num_chq).'">'; |
326 |
print '</tr>'; |
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">'; |
327 |
print '</form>'; |
print "</form>"; |
328 |
|
print "</td></tr>"; |
329 |
|
|
330 |
|
// Releve rappro |
331 |
|
if ($acct->rappro) // Si compte rapprochable |
332 |
|
{ |
333 |
|
print "<tr><td>".$langs->trans("Conciliation")."</td>"; |
334 |
|
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">"; |
335 |
|
print '<input type="hidden" name="action" value="num_releve">'; |
336 |
|
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">"; |
337 |
|
print '<td colspan="3">'; |
338 |
|
print $langs->trans("AccountStatement").' <input name="num_rel" class="flat" value="'.$objp->num_releve.'">'; |
339 |
|
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>'; |
340 |
|
print '</form>'; |
341 |
|
print '</tr>'; |
342 |
|
} |
343 |
|
|
344 |
|
print "</table>"; |
345 |
|
|
346 |
} |
} |
347 |
|
|
|
print "</table>"; |
|
|
|
|
348 |
$db->free($result); |
$db->free($result); |
349 |
} |
} |
350 |
print '</div>'; |
print '</div>'; |
351 |
|
|
|
print '<br>'; |
|
352 |
|
|
353 |
|
/* |
354 |
|
* Boutons actions |
355 |
|
*/ |
356 |
|
/* |
357 |
|
print '<div class="tabsAction">'; |
358 |
|
|
359 |
|
if ($orig_account) |
360 |
|
{ |
361 |
|
$acct=new Account($db,$orig_account); |
362 |
|
$acct->fetch($orig_account); |
363 |
|
print '<a class="tabAction" href="rappro.php?account='.$orig_account.'">'.$langs->trans("BackToConciliate",$acct->label).'</a>'; |
364 |
|
} |
365 |
|
|
366 |
|
print '</div>'; |
367 |
|
*/ |
368 |
|
|
369 |
// Liste les categories |
// Liste les categories |
370 |
|
|
371 |
|
print '<br>'; |
372 |
print '<table class="noborder" width="100%">'; |
print '<table class="noborder" width="100%">'; |
373 |
|
|
374 |
print "<form method=\"post\" action=\"ligne.php?rowid=$rowid&account=$account\">"; |
print "<form method=\"post\" action=\"ligne.php?rowid=$rowid&account=$account\">"; |
375 |
print "<input type=\"hidden\" name=\"action\" value=\"class\">"; |
print "<input type=\"hidden\" name=\"action\" value=\"class\">"; |
376 |
|
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">"; |
377 |
print "<tr class=\"liste_titre\"><td>".$langs->trans("Categories")."</td><td colspan=\"2\">"; |
print "<tr class=\"liste_titre\"><td>".$langs->trans("Categories")."</td><td colspan=\"2\">"; |
378 |
print "<select class=\"flat\" name=\"cat1\">$options"; |
print "<select class=\"flat\" name=\"cat1\">$options"; |
379 |
print "</select> "; |
print "</select> "; |