コード例 #1
0
ファイル: fiche.php プロジェクト: remyyounes/dolibarr
	{
		dol_print_error($db);
	}
}
else
/* *************************************************************************** */
/*                                                                             */
/* Mode vue et edition                                                         */
/*                                                                             */
/* *************************************************************************** */
{
	if ($_GET["id"] > 0)
	{
		$delivery = new Livraison($db);
		$result = $delivery->fetch($_GET["id"]);
		$delivery->fetch_thirdparty();

		$expedition=new Expedition($db);
		$result = $expedition->fetch($delivery->origin_id);
		$typeobject = $expedition->origin;

		if ($delivery->origin_id)
		{
			$delivery->fetch_origin();
		}

		if ( $delivery->id > 0)
		{
			$soc = new Societe($db);
			$soc->fetch($delivery->socid);
コード例 #2
0
ファイル: card.php プロジェクト: ADDAdev/Dolibarr
$langs->load('orders');
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$backtopage = GETPOST('backtopage');
// Security check
$id = GETPOST('id', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'expedition', $id, 'livraison', 'livraison');
$object = new Livraison($db);
// Load object
if ($id > 0 || !empty($ref)) {
    $ret = $object->fetch($id, $ref);
    if ($ret > 0) {
        $ret = $object->fetch_thirdparty();
    }
    if ($ret < 0) {
        dol_print_error('', $object->error);
    }
}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('deliverycard', 'globalcard'));
/*
 * Actions
 */
$parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
// Note that $action and $object may have been modified by some hooks
if ($action == 'add') {
    $db->begin();