* Copyright (C) 2023 SuperAdmin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file facture/card_cfdirel.php * \ingroup auriboxconsulting */ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; } // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; } if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; } // Try main.inc.php using relative path if (!$res && file_exists("../../main.inc.php")) { $res = @include "../../main.inc.php"; } if (!$res && file_exists("../../../main.inc.php")) { $res = @include "../../../main.inc.php"; } if (!$res) { die("Include of main fails"); } // Libraries require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; dol_include_once('/cfdimx/lib/product.lib.php'); // dol_include_once('/cfdimx/class/complementos.class.php'); // Translations $langs->loadLangs(array("errors", "admin", "products", "cfdimx@cfdimx")); $zona_horaria = $conf->global->CFDIMX_HUSO_HORARIO; date_default_timezone_set($zona_horaria); // Access control if (!$user->admin) { accessforbidden(); } // Parameters $id = GETPOST('id', 'int'); if (!empty($conf->global->MAIN_SECURITY_ALLOW_UNSECURED_REF_LABELS)) { $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'nohtml') : null); } else { $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'alpha') : null); } $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); // $object = new ComplementosCFDIMX($db, $id); /* * Actions */ // print '
';
//     print_r($object);
// print '
'; die; /* * View */ $object = new Product($db); $form = new Form($db); $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); } // $facture->fetch($id); // $object->fetchCFDIRelacionados($id); // $estatus = $object->estatusFactura($id); $help_url = ''; // $page_name = $langs->trans("cfdirel")." de la Factura - ".$object->getNomUrl(1); llxHeader('', 'Datos Comercio Exterior', $help_url); // Subheader // $linkback = ''.$langs->trans("BackToModuleList").''; $linkback = ''; // print load_fiche_titre($langs->trans($page_name), $linkback, 'product'); // Configuration header $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); print dol_get_fiche_head($head, 'tabCFDIMXProduct', $titre, 0, $picto); $head_produc5 = cfdimxProductPrepareHead(); print dol_get_fiche_head($head_produc5, 'datos_cce', $langs->trans("ThirdParty"), -1, $picto); print '
'; print ''; print '  '; print 'Función disponible en las siguientes versiones del Módulo de Facturación Eléctronica.'; print '
'; // Page end print dol_get_fiche_end(); llxFooter(); $db->close();