forked from Wavyzz/dolibarr
Fix: fetch_client is deprecated
This commit is contained in:
@@ -575,7 +575,7 @@ class Propal extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$this->fetch_client();
|
$this->fetch_thirdparty();
|
||||||
|
|
||||||
// Insertion dans la base
|
// Insertion dans la base
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propal (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propal (";
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
if ( is_null($propal->client) )
|
if ( is_null($propal->client) )
|
||||||
$propal->fetch_client();
|
$propal->fetch_thirdparty();
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
if ( is_null($propal->client) )
|
if ( is_null($propal->client) )
|
||||||
$propal->fetch_client();
|
$propal->fetch_thirdparty();
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
if ( is_null($propal->client) )
|
if ( is_null($propal->client) )
|
||||||
$propal->fetch_client();
|
$propal->fetch_thirdparty();
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
if ( is_null($commande->client) )
|
if ( is_null($commande->client) )
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$commande->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$commande->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes'
|
|||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
$commande->fetch($_GET['id']);
|
$commande->fetch($_GET['id']);
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $commande->delete_line($_GET['lineid']);
|
$result = $commande->delete_line($_GET['lineid']);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
@@ -182,7 +182,7 @@ if ($_POST['action'] == 'add' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
$commande->socid=$_POST['socid'];
|
$commande->socid=$_POST['socid'];
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer)
|
|||||||
dol_print_error($db,$commande->error);
|
dol_print_error($db,$commande->error);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$ret=$commande->fetch_client();
|
$ret=$commande->fetch_thirdparty();
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$suffixe = $_POST['idprod'] ? '_prod' : '';
|
$suffixe = $_POST['idprod'] ? '_prod' : '';
|
||||||
@@ -514,7 +514,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POS
|
|||||||
{
|
{
|
||||||
$commande = new Commande($db,'',$_POST['id']);
|
$commande = new Commande($db,'',$_POST['id']);
|
||||||
if (! $commande->fetch($_POST['id']) > 0) dol_print_error($db);
|
if (! $commande->fetch($_POST['id']) > 0) dol_print_error($db);
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$date_start='';
|
$date_start='';
|
||||||
@@ -613,7 +613,7 @@ if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes' &
|
|||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
$commande->fetch($_GET['id']); // Load order and lines
|
$commande->fetch($_GET['id']); // Load order and lines
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
$result=$commande->valid($user);
|
$result=$commande->valid($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@@ -655,7 +655,7 @@ if ($_GET['action'] == 'modif' && $user->rights->commande->creer)
|
|||||||
*/
|
*/
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
$commande->fetch($_GET['id']); // Load order and lines
|
$commande->fetch($_GET['id']); // Load order and lines
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $commande->set_draft($user);
|
$result = $commande->set_draft($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@@ -682,7 +682,7 @@ if ($_GET['action'] == 'up' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
$commande = new Commande($db,'',$_GET['id']);
|
$commande = new Commande($db,'',$_GET['id']);
|
||||||
$commande->fetch($_GET['id']);
|
$commande->fetch($_GET['id']);
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
$commande->line_up($_GET['rowid']);
|
$commande->line_up($_GET['rowid']);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@@ -706,7 +706,7 @@ if ($_GET['action'] == 'down' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
$commande = new Commande($db,'',$_GET['id']);
|
$commande = new Commande($db,'',$_GET['id']);
|
||||||
$commande->fetch($_GET['id']);
|
$commande->fetch($_GET['id']);
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
$commande->line_down($_GET['rowid']);
|
$commande->line_down($_GET['rowid']);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@@ -735,7 +735,7 @@ if ($_REQUEST['action'] == 'builddoc') // In get or post
|
|||||||
// Sauvegarde le dernier modele choisi pour generer un document
|
// Sauvegarde le dernier modele choisi pour generer un document
|
||||||
$commande = new Commande($db, 0, $_REQUEST['id']);
|
$commande = new Commande($db, 0, $_REQUEST['id']);
|
||||||
$result=$commande->fetch($_REQUEST['id']);
|
$result=$commande->fetch($_REQUEST['id']);
|
||||||
$commande->fetch_client();
|
$commande->fetch_thirdparty();
|
||||||
|
|
||||||
if ($_REQUEST['model'])
|
if ($_REQUEST['model'])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ if ($_REQUEST['action'] == 'confirm_deleteproductline' && $_REQUEST['confirm'] =
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $fac->deleteline($_GET['rowid'], $user);
|
$result = $fac->deleteline($_GET['rowid'], $user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
@@ -306,7 +306,7 @@ if ($_REQUEST['action'] == 'confirm_valid' && $_REQUEST['confirm'] == 'yes' && $
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $fac->validate($user);
|
$result = $fac->validate($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@@ -334,7 +334,7 @@ if ($_GET['action'] == 'modif' && $user->rights->facture->unvalidate)
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
// On verifie si la facture a des paiements
|
// On verifie si la facture a des paiements
|
||||||
$sql = 'SELECT pf.amount';
|
$sql = 'SELECT pf.amount';
|
||||||
@@ -430,7 +430,7 @@ if ($_REQUEST['action'] == 'confirm_converttoreduc' && $_REQUEST['confirm'] == '
|
|||||||
|
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
$fac->fetch_lines();
|
$fac->fetch_lines();
|
||||||
|
|
||||||
if (! $fac->paye) // protection against multiple submit
|
if (! $fac->paye) // protection against multiple submit
|
||||||
@@ -529,7 +529,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
|
|||||||
{
|
{
|
||||||
// This is a replacement invoice
|
// This is a replacement invoice
|
||||||
$result=$facture->fetch($_POST['fac_replacement']);
|
$result=$facture->fetch($_POST['fac_replacement']);
|
||||||
$facture->fetch_client();
|
$facture->fetch_thirdparty();
|
||||||
|
|
||||||
$facture->date = $datefacture;
|
$facture->date = $datefacture;
|
||||||
$facture->note_public = trim($_POST['note_public']);
|
$facture->note_public = trim($_POST['note_public']);
|
||||||
@@ -820,7 +820,7 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
|
|||||||
dol_print_error($db,$fac->error);
|
dol_print_error($db,$fac->error);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$ret=$fac->fetch_client();
|
$ret=$fac->fetch_thirdparty();
|
||||||
|
|
||||||
$suffixe = $_POST['idprod'] ? '_predef' : '';
|
$suffixe = $_POST['idprod'] ? '_predef' : '';
|
||||||
$date_start=dol_mktime($_POST['date_start'.$suffixe.'hour'],$_POST['date_start'.$suffixe.'min'],$_POST['date_start'.$suffixe.'sec'],$_POST['date_start'.$suffixe.'month'],$_POST['date_start'.$suffixe.'day'],$_POST['date_start'.$suffixe.'year']);
|
$date_start=dol_mktime($_POST['date_start'.$suffixe.'hour'],$_POST['date_start'.$suffixe.'min'],$_POST['date_start'.$suffixe.'sec'],$_POST['date_start'.$suffixe.'month'],$_POST['date_start'.$suffixe.'day'],$_POST['date_start'.$suffixe.'year']);
|
||||||
@@ -956,7 +956,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->facture->creer && $_POST
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db,'',$_POST['facid']);
|
$fac = new Facture($db,'',$_POST['facid']);
|
||||||
if (! $fac->fetch($_POST['facid']) > 0) dol_print_error($db);
|
if (! $fac->fetch($_POST['facid']) > 0) dol_print_error($db);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$date_start='';
|
$date_start='';
|
||||||
@@ -1054,7 +1054,7 @@ if ($_GET['action'] == 'up' && $user->rights->facture->creer)
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db,'',$_GET['facid']);
|
$fac = new Facture($db,'',$_GET['facid']);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
$fac->line_up($_GET['rowid']);
|
$fac->line_up($_GET['rowid']);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@@ -1077,7 +1077,7 @@ if ($_GET['action'] == 'down' && $user->rights->facture->creer)
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db,'',$_GET['facid']);
|
$fac = new Facture($db,'',$_GET['facid']);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
$fac->line_down($_GET['rowid']);
|
$fac->line_down($_GET['rowid']);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@@ -1306,7 +1306,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db, 0, $_GET['facid']);
|
$fac = new Facture($db, 0, $_GET['facid']);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
if ($_REQUEST['model'])
|
if ($_REQUEST['model'])
|
||||||
{
|
{
|
||||||
@@ -1383,7 +1383,7 @@ if ($_GET['action'] == 'create')
|
|||||||
$classname = ucfirst($subelement);
|
$classname = ucfirst($subelement);
|
||||||
$object = new $classname($db);
|
$object = new $classname($db);
|
||||||
$object->fetch($_GET['originid']);
|
$object->fetch($_GET['originid']);
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$projectid = (!empty($object->fk_project)?$object->fk_project:'');
|
$projectid = (!empty($object->fk_project)?$object->fk_project:'');
|
||||||
$ref_client = (!empty($object->ref_client)?$object->ref_client:'');
|
$ref_client = (!empty($object->ref_client)?$object->ref_client:'');
|
||||||
@@ -1930,7 +1930,7 @@ else
|
|||||||
{
|
{
|
||||||
if ($user->societe_id>0 && $user->societe_id!=$fac->socid) accessforbidden('',0);
|
if ($user->societe_id>0 && $user->societe_id!=$fac->socid) accessforbidden('',0);
|
||||||
|
|
||||||
$result=$fac->fetch_client();
|
$result=$fac->fetch_thirdparty();
|
||||||
|
|
||||||
$soc = new Societe($db, $fac->socid);
|
$soc = new Societe($db, $fac->socid);
|
||||||
$soc->fetch($fac->socid);
|
$soc->fetch($fac->socid);
|
||||||
|
|||||||
@@ -1321,7 +1321,7 @@ class Facture extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$this->fetch_client();
|
$this->fetch_thirdparty();
|
||||||
$this->fetch_lines();
|
$this->fetch_lines();
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
if ($facture->fetch($id, $ref) > 0)
|
if ($facture->fetch($id, $ref) > 0)
|
||||||
{
|
{
|
||||||
$facture->fetch_client();
|
$facture->fetch_thirdparty();
|
||||||
|
|
||||||
$head = facture_prepare_head($facture);
|
$head = facture_prepare_head($facture);
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$facture->fetch_client();
|
$facture->fetch_thirdparty();
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$facture->client->getNomUrl(1).'</td>';
|
print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$facture->client->getNomUrl(1).'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ if ($_POST['action'] == 'confirm_paiement' && $_POST['confirm'] == 'yes')
|
|||||||
$facid = $key;
|
$facid = $key;
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($facid);
|
$fac->fetch($facid);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
$acc->add_url_line($bank_line_id,
|
$acc->add_url_line($bank_line_id,
|
||||||
$paiement_id,
|
$paiement_id,
|
||||||
DOL_URL_ROOT.'/compta/paiement/fiche.php?id=',
|
DOL_URL_ROOT.'/compta/paiement/fiche.php?id=',
|
||||||
@@ -241,7 +241,7 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P
|
|||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$facture->fetch_client();
|
$facture->fetch_thirdparty();
|
||||||
|
|
||||||
$title='';
|
$title='';
|
||||||
if ($facture->type != 2) $title.=$langs->trans("EnterPaymentReceivedFromCustomer");
|
if ($facture->type != 2) $title.=$langs->trans("EnterPaymentReceivedFromCustomer");
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer)
|
|||||||
dol_print_error($db,$commande->error);
|
dol_print_error($db,$commande->error);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$ret=$contrat->fetch_client();
|
$ret=$contrat->fetch_thirdparty();
|
||||||
|
|
||||||
$date_start='';
|
$date_start='';
|
||||||
$date_end='';
|
$date_end='';
|
||||||
|
|||||||
@@ -453,15 +453,6 @@ class CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Replaced by fetch_thirdparty
|
|
||||||
* Kept for backward compatibility
|
|
||||||
*/
|
|
||||||
function fetch_client()
|
|
||||||
{
|
|
||||||
return $this->fetch_thirdparty();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge le projet d'id $this->fk_project dans this->projet
|
* \brief Charge le projet d'id $this->fk_project dans this->projet
|
||||||
* \return int <0 if KO, >=0 if OK
|
* \return int <0 if KO, >=0 if OK
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ if ($_REQUEST["action"] == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $
|
|||||||
{
|
{
|
||||||
$expedition = new Expedition($db);
|
$expedition = new Expedition($db);
|
||||||
$expedition->fetch($_GET["id"]);
|
$expedition->fetch($_GET["id"]);
|
||||||
$expedition->fetch_client();
|
$expedition->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $expedition->valid($user);
|
$result = $expedition->valid($user);
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
// Sauvegarde le dernier modele choisi pour generer un document
|
// Sauvegarde le dernier modele choisi pour generer un document
|
||||||
$shipment = new Expedition($db, 0, $_REQUEST['id']);
|
$shipment = new Expedition($db, 0, $_REQUEST['id']);
|
||||||
$shipment->fetch($_REQUEST['id']);
|
$shipment->fetch($_REQUEST['id']);
|
||||||
$shipment->fetch_client();
|
$shipment->fetch_thirdparty();
|
||||||
|
|
||||||
if ($_REQUEST['model'])
|
if ($_REQUEST['model'])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
if ( is_null($fichinter->client) )
|
if ( is_null($fichinter->client) )
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$fichinter->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$fichinter->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ llxHeader("","",$langs->trans("InterventionCard"));
|
|||||||
|
|
||||||
if ($object->id)
|
if ($object->id)
|
||||||
{
|
{
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$soc = new Societe($db, $object->societe->id);
|
$soc = new Societe($db, $object->societe->id);
|
||||||
$soc->fetch($object->societe->id);
|
$soc->fetch($object->societe->id);
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes')
|
|||||||
{
|
{
|
||||||
$fichinter = new Fichinter($db);
|
$fichinter = new Fichinter($db);
|
||||||
$fichinter->fetch($_GET["id"]);
|
$fichinter->fetch($_GET["id"]);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $fichinter->setValid($user, $conf->fichinter->outputdir);
|
$result = $fichinter->setValid($user, $conf->fichinter->outputdir);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@@ -115,7 +115,7 @@ if ($_REQUEST['action'] == 'confirm_modify' && $_REQUEST['confirm'] == 'yes')
|
|||||||
{
|
{
|
||||||
$fichinter = new Fichinter($db);
|
$fichinter = new Fichinter($db);
|
||||||
$fichinter->fetch($_GET["id"]);
|
$fichinter->fetch($_GET["id"]);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $fichinter->setDraft($user);
|
$result = $fichinter->setDraft($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@@ -196,7 +196,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
{
|
{
|
||||||
$fichinter = new Fichinter($db);
|
$fichinter = new Fichinter($db);
|
||||||
$fichinter->fetch($_GET['id']);
|
$fichinter->fetch($_GET['id']);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
$fichinter->fetch_lines();
|
$fichinter->fetch_lines();
|
||||||
|
|
||||||
if ($_REQUEST['model'])
|
if ($_REQUEST['model'])
|
||||||
@@ -258,7 +258,7 @@ if ($_POST['action'] == "addligne" && $user->rights->ficheinter->creer)
|
|||||||
{
|
{
|
||||||
$fichinter = new Fichinter($db);
|
$fichinter = new Fichinter($db);
|
||||||
$ret=$fichinter->fetch($_POST['fichinterid']);
|
$ret=$fichinter->fetch($_POST['fichinterid']);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
|
|
||||||
$desc=$_POST['np_desc'];
|
$desc=$_POST['np_desc'];
|
||||||
$date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
|
$date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
|
||||||
@@ -305,7 +305,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_P
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
|
|
||||||
$desc=$_POST['np_desc'];
|
$desc=$_POST['np_desc'];
|
||||||
$date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
|
$date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
|
||||||
@@ -390,7 +390,7 @@ if ($_GET['action'] == 'up' && $user->rights->ficheinter->creer)
|
|||||||
{
|
{
|
||||||
$fichinter = new Fichinter($db);
|
$fichinter = new Fichinter($db);
|
||||||
$fichinter->fetch($_GET['id']);
|
$fichinter->fetch($_GET['id']);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
$fichinter->line_up($_GET['rowid']);
|
$fichinter->line_up($_GET['rowid']);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@@ -412,7 +412,7 @@ if ($_GET['action'] == 'down' && $user->rights->ficheinter->creer)
|
|||||||
{
|
{
|
||||||
$fichinter = new Fichinter($db);
|
$fichinter = new Fichinter($db);
|
||||||
$fichinter->fetch($_GET['id']);
|
$fichinter->fetch($_GET['id']);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
$fichinter->line_down($_GET['rowid']);
|
$fichinter->line_down($_GET['rowid']);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@@ -549,7 +549,7 @@ elseif ($fichinterid)
|
|||||||
/*
|
/*
|
||||||
* Affichage en mode visu
|
* Affichage en mode visu
|
||||||
*/
|
*/
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
|
|
||||||
$societe=new Societe($db);
|
$societe=new Societe($db);
|
||||||
$societe->fetch($fichinter->socid);
|
$societe->fetch($fichinter->socid);
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ if ($id > 0)
|
|||||||
$facture = new FactureFournisseur($db);
|
$facture = new FactureFournisseur($db);
|
||||||
if ($facture->fetch($_GET['facid'], $user->societe_id) > 0)
|
if ($facture->fetch($_GET['facid'], $user->societe_id) > 0)
|
||||||
{
|
{
|
||||||
$facture->fetch_client();
|
$facture->fetch_thirdparty();
|
||||||
|
|
||||||
$head = facturefourn_prepare_head($facture);
|
$head = facturefourn_prepare_head($facture);
|
||||||
|
|
||||||
|
|||||||
@@ -905,7 +905,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->SetXY(102,$posy-5);
|
$pdf->SetXY(102,$posy-5);
|
||||||
$pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":");
|
$pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":");
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
// Cadre client destinataire
|
// Cadre client destinataire
|
||||||
$pdf->rect(100, $posy, 100, $hautcadre);
|
$pdf->rect(100, $posy, 100, $hautcadre);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
//Verification de la configuration
|
//Verification de la configuration
|
||||||
if ($conf->expedition->dir_output."/sending")
|
if ($conf->expedition->dir_output."/sending")
|
||||||
{
|
{
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
//Creation de l expediteur
|
//Creation de l expediteur
|
||||||
$this->expediteur = $mysoc;
|
$this->expediteur = $mysoc;
|
||||||
@@ -478,7 +478,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$blSocY = 1;
|
$blSocY = 1;
|
||||||
$pdf->Rect($blExpX, $Yoff, $blW, 20);
|
$pdf->Rect($blExpX, $Yoff, $blW, 20);
|
||||||
|
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
// If SHIPPING contact defined on order, we use it
|
// If SHIPPING contact defined on order, we use it
|
||||||
$usecontact=false;
|
$usecontact=false;
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
{
|
{
|
||||||
global $user,$conf,$langs;
|
global $user,$conf,$langs;
|
||||||
|
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ function facture_meta_create($db, $facid, $message="")
|
|||||||
|
|
||||||
$fac = new Facture($db,"",$facid);
|
$fac = new Facture($db,"",$facid);
|
||||||
$fac->fetch($facid);
|
$fac->fetch($facid);
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
if ($conf->facture->dir_output)
|
if ($conf->facture->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$ret=$fac->fetch($id);
|
$ret=$fac->fetch($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
$deja_regle = $fac->getSommePaiement();
|
$deja_regle = $fac->getSommePaiement();
|
||||||
$amount_credit_notes_included = $fac->getSumCreditNotesUsed();
|
$amount_credit_notes_included = $fac->getSumCreditNotesUsed();
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$fac = new Facture($this->db);
|
$fac = new Facture($this->db);
|
||||||
$ret=$fac->fetch($id);
|
$ret=$fac->fetch($id);
|
||||||
}
|
}
|
||||||
$fac->fetch_client();
|
$fac->fetch_thirdparty();
|
||||||
|
|
||||||
$deja_regle = $fac->getSommePaiement();
|
$deja_regle = $fac->getSommePaiement();
|
||||||
$amount_credit_notes_included = $fac->getSumCreditNotesUsed();
|
$amount_credit_notes_included = $fac->getSumCreditNotesUsed();
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
// Client destinataire
|
// Client destinataire
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('Arial','B',12);
|
$pdf->SetFont('Arial','B',12);
|
||||||
$fichinter->fetch_client();
|
$fichinter->fetch_thirdparty();
|
||||||
$pdf->SetXY(102,42);
|
$pdf->SetXY(102,42);
|
||||||
$pdf->MultiCell(86,5, $outputlangs->convToOutputCharset($carac_client_name));
|
$pdf->MultiCell(86,5, $outputlangs->convToOutputCharset($carac_client_name));
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$nblignes = sizeof($object->lignes);
|
$nblignes = sizeof($object->lignes);
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$nblignes = sizeof($object->lignes);
|
$nblignes = sizeof($object->lignes);
|
||||||
|
|
||||||
|
|||||||
@@ -452,7 +452,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
// Cadre client destinataire
|
// Cadre client destinataire
|
||||||
$pdf->rect(100, $posy, 100, $hautcadre);
|
$pdf->rect(100, $posy, 100, $hautcadre);
|
||||||
|
|
||||||
$object->fetch_client();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
// Recipient name
|
// Recipient name
|
||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$propale = new Propal($this->db,"",$id);
|
$propale = new Propal($this->db,"",$id);
|
||||||
$ret=$propale->fetch($id);
|
$ret=$propale->fetch($id);
|
||||||
}
|
}
|
||||||
$propale->fetch_client();
|
$propale->fetch_thirdparty();
|
||||||
$deja_regle = "";
|
$deja_regle = "";
|
||||||
|
|
||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$propale = new Propal($this->db,"",$id);
|
$propale = new Propal($this->db,"",$id);
|
||||||
$ret=$propale->fetch($id);
|
$ret=$propale->fetch($id);
|
||||||
}
|
}
|
||||||
$propale->fetch_client();
|
$propale->fetch_thirdparty();
|
||||||
$deja_regle = "";
|
$deja_regle = "";
|
||||||
|
|
||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ if ($_REQUEST["action"] == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $
|
|||||||
{
|
{
|
||||||
$delivery = new Livraison($db);
|
$delivery = new Livraison($db);
|
||||||
$delivery->fetch($_GET["id"]);
|
$delivery->fetch($_GET["id"]);
|
||||||
$delivery->fetch_client();
|
$delivery->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $delivery->valid($user);
|
$result = $delivery->valid($user);
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ else
|
|||||||
{
|
{
|
||||||
$delivery = new Livraison($db);
|
$delivery = new Livraison($db);
|
||||||
$result = $delivery->fetch($_GET["id"]);
|
$result = $delivery->fetch($_GET["id"]);
|
||||||
$delivery->fetch_client();
|
$delivery->fetch_thirdparty();
|
||||||
|
|
||||||
$expedition=new Expedition($db);
|
$expedition=new Expedition($db);
|
||||||
$result = $expedition->fetch($delivery->expedition_id);
|
$result = $expedition->fetch($delivery->expedition_id);
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
{
|
{
|
||||||
$element = new $classname($db);
|
$element = new $classname($db);
|
||||||
$element->fetch($elementarray[$i]);
|
$element->fetch($elementarray[$i]);
|
||||||
$element->fetch_client();
|
$element->fetch_thirdparty();
|
||||||
//print $classname;
|
//print $classname;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ if ($_REQUEST["amount"] == 'order')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result=$order->fetch_client($order->socid);
|
$result=$order->fetch_thirdparty($order->socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$amount=$order->total_ttc;
|
$amount=$order->total_ttc;
|
||||||
@@ -322,7 +322,7 @@ if ($_REQUEST["amount"] == 'invoice')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result=$invoice->fetch_client($invoice->socid);
|
$result=$invoice->fetch_thirdparty($invoice->socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$amount=$invoice->total_ttc - $invoice->getSommePaiement();
|
$amount=$invoice->total_ttc - $invoice->getSommePaiement();
|
||||||
@@ -401,7 +401,7 @@ if ($_REQUEST["amount"] == 'contractline')
|
|||||||
$result=$contract->fetch($contractline->fk_contrat);
|
$result=$contract->fetch($contractline->fk_contrat);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$result=$contract->fetch_client($contract->socid);
|
$result=$contract->fetch_thirdparty($contract->socid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$soc->fetch($socid);
|
||||||
$soc->fetch_client();
|
$soc->fetch_thirdparty();
|
||||||
|
|
||||||
/*if ($_REQUEST['model'])
|
/*if ($_REQUEST['model'])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
|
|||||||
$localobject=new Commande($this->savdb);
|
$localobject=new Commande($this->savdb);
|
||||||
$localobject->fetch(1);
|
$localobject->fetch(1);
|
||||||
|
|
||||||
$result=$localobject->fetch_client();
|
$result=$localobject->fetch_thirdparty();
|
||||||
|
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$this->assertLessThanOrEqual($result,0);
|
$this->assertLessThanOrEqual($result,0);
|
||||||
|
|||||||
Reference in New Issue
Block a user