Ejemplo n.º 1
0
}
if (!empty($search_ledger_code)) {
    $filter['t.code_journal'] = $search_ledger_code;
    $options .= '&search_ledger_code=' . $search_ledger_code;
}
if (!empty($search_mvt_num)) {
    $filter['t.piece_num'] = $search_mvt_num;
    $options .= '&search_mvt_num=' . $search_mvt_num;
}
/*
 * Action
 */
if ($action == 'delbookkeeping') {
    $import_key = GETPOST('importkey', 'alpha');
    if (!empty($import_key)) {
        $result = $object->deleteByImportkey($import_key);
        if ($result < 0) {
            setEventMessages($object->error, $object->errors, 'errors');
        }
        Header("Location: list.php");
        exit;
    }
} elseif ($action == 'delbookkeepingyearconfirm') {
    $delyear = GETPOST('delyear', 'int');
    if (!empty($delyear)) {
        $result = $object->deleteByYear($delyear);
        if ($result < 0) {
            setEventMessages($object->error, $object->errors, 'errors');
        }
        Header("Location: list.php");
        exit;