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