Fix: Label missing
Fix: Cancel not working
This commit is contained in:
parent
d2aacdb04b
commit
d92b46c9f9
@ -31,7 +31,8 @@ $langs->load("compta");
|
||||
$langs->load("banks");
|
||||
$langs->load("bills");
|
||||
|
||||
$id=$_REQUEST["id"];
|
||||
$id=GETPOST("id");
|
||||
$action=GETPOST('action');
|
||||
|
||||
$mesg = '';
|
||||
|
||||
@ -40,17 +41,25 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
$tva = new Tva($db);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('taxvatcard'));
|
||||
|
||||
|
||||
/**
|
||||
* Action ajout paiement tva
|
||||
*/
|
||||
if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
{
|
||||
$tva = new Tva($db);
|
||||
|
||||
/**
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_POST["cancel"] == $langs->trans("Cancel"))
|
||||
{
|
||||
header("Location: reglement.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]);
|
||||
@ -74,13 +83,12 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
{
|
||||
$db->rollback();
|
||||
$mesg='<div class="error">'.$tva->error.'</div>';
|
||||
$_GET["action"]="create";
|
||||
$action="create";
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'delete')
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$tva = new Tva($db);
|
||||
$result=$tva->fetch($_GET['id']);
|
||||
|
||||
if ($tva->rappro == 0)
|
||||
@ -143,7 +151,7 @@ if ($id)
|
||||
}
|
||||
|
||||
// Formulaire saisie tva
|
||||
if ($_GET["action"] == 'create')
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<form name='add' action=\"fiche.php\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -223,6 +231,9 @@ if ($id)
|
||||
print $vatpayment->ref;
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$vatpayment->label.'</td></tr>';
|
||||
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("DatePayment").'</td><td colspan="3">';
|
||||
print dol_print_date($vatpayment->datep,'day');
|
||||
@ -273,5 +284,4 @@ if ($id)
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user