Ejemplo n.º 1
0
            }
        } else {
            $db->rollback();
            $mesg = '<div class="error">' . $localtax->error . '</div>';
        }
    } else {
        $mesg = '<div class="error">Error try do delete a line linked to a conciliated bank transaction</div>';
    }
}
/*
*	View
*/
llxHeader();
$form = new Form($db);
if ($id) {
    $vatpayment = new localtax($db);
    $result = $vatpayment->fetch($id);
    if ($result <= 0) {
        dol_print_error($db);
        exit;
    }
}
if ($_GET["action"] == 'create') {
    print "<form name='add' action=\"fiche.php\" method=\"post\">\n";
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="add">';
    print_fiche_titre($langs->transcountry("newLT2Payment", $mysoc->country_code));
    if ($mesg) {
        print $mesg;
    }
    print '<table class="border" width="100%">';
Ejemplo n.º 2
0
 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . "/compta/localtax/class/localtax.class.php";
$langs->load("compta");
$langs->load("compta");
// Security check
$socid = isset($_GET["socid"]) ? $_GET["socid"] : '';
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'tax', '', '', 'charges');
/*
 * View
 */
llxHeader();
$localtax_static = new localtax($db);
print_fiche_titre($langs->transcountry("LT2Payments", $mysoc->country_code));
$sql = "SELECT rowid, amount, label, f.datev as dm";
$sql .= " FROM " . MAIN_DB_PREFIX . "localtax as f ";
$sql .= " WHERE f.entity = " . $conf->entity;
$sql .= " ORDER BY dm DESC";
$result = $db->query($sql);
if ($result) {
    $num = $db->num_rows($result);
    $i = 0;
    $total = 0;
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre">';
    print '<td nowrap align="left">' . $langs->trans("Ref") . '</td>';
    print "<td>" . $langs->trans("Label") . "</td>";
    print '<td nowrap align="left">' . $langs->trans("DatePayment") . '</td>';