diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3328f7d91537709f88b101e416a1f8df6993217b..1502418f9a07912b317cc409de5e19c18c259d51 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -575,7 +575,7 @@ class Propal extends CommonObject $this->db->begin(); - $this->fetch_client(); + $this->fetch_thirdparty(); // Insertion dans la base $sql = "INSERT INTO ".MAIN_DB_PREFIX."propal ("; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index e7e19ad818bf763c23cc5ea621b9c36d8ac66934..77180a4d22fa193c47a0b0919c913f7bfd69bc8d 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref)) // Customer if ( is_null($propal->client) ) - $propal->fetch_client(); + $propal->fetch_thirdparty(); print "<tr><td>".$langs->trans("Company")."</td>"; print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>'; diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index f00b6d291535fd4823085cc7398e3b6578ee05b5..337acb8bdf19dcf0067c1e75e8f9ae4b21893071 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -174,7 +174,7 @@ if ($id > 0 || ! empty($ref)) // Customer if ( is_null($propal->client) ) - $propal->fetch_client(); + $propal->fetch_thirdparty(); print "<tr><td>".$langs->trans("Company")."</td>"; print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>'; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 053995640689913110e4581a343f50d45fe68fc9..d75df348f83b5f04c01ca42fe8999a67bdee0f19 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -133,7 +133,7 @@ if ($id > 0 || ! empty($ref)) // Customer if ( is_null($propal->client) ) - $propal->fetch_client(); + $propal->fetch_thirdparty(); print "<tr><td>".$langs->trans("Company")."</td>"; print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>'; diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index a959db0b1596e4ab10602ec79e6679b31435b26f..2dfbf8c829e59fe9fd420ca2b29ce2ea9915ea72 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref)) // Customer if ( is_null($commande->client) ) - $commande->fetch_client(); + $commande->fetch_thirdparty(); print "<tr><td>".$langs->trans("Company")."</td>"; print '<td colspan="3">'.$commande->client->getNomUrl(1).'</td></tr>'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 9f6d13a1c4228780c69201939bd601d4efcfbe73..0b90191304d1c47bbc9880ff0cf0e7f80f3688b9 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -139,7 +139,7 @@ if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes' { $commande = new Commande($db); $commande->fetch($_GET['id']); - $commande->fetch_client(); + $commande->fetch_thirdparty(); $result = $commande->delete_line($_GET['lineid']); if ($result > 0) @@ -182,7 +182,7 @@ if ($_POST['action'] == 'add' && $user->rights->commande->creer) $commande = new Commande($db); $commande->socid=$_POST['socid']; - $commande->fetch_client(); + $commande->fetch_thirdparty(); $db->begin(); @@ -377,7 +377,7 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer) dol_print_error($db,$commande->error); exit; } - $ret=$commande->fetch_client(); + $ret=$commande->fetch_thirdparty(); // Clean parameters $suffixe = $_POST['idprod'] ? '_prod' : ''; @@ -514,7 +514,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POS { $commande = new Commande($db,'',$_POST['id']); if (! $commande->fetch($_POST['id']) > 0) dol_print_error($db); - $commande->fetch_client(); + $commande->fetch_thirdparty(); // Clean parameters $date_start=''; @@ -613,7 +613,7 @@ if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes' & { $commande = new Commande($db); $commande->fetch($_GET['id']); // Load order and lines - $commande->fetch_client(); + $commande->fetch_thirdparty(); $result=$commande->valid($user); if ($result >= 0) @@ -655,7 +655,7 @@ if ($_GET['action'] == 'modif' && $user->rights->commande->creer) */ $commande = new Commande($db); $commande->fetch($_GET['id']); // Load order and lines - $commande->fetch_client(); + $commande->fetch_thirdparty(); $result = $commande->set_draft($user); if ($result >= 0) @@ -682,7 +682,7 @@ if ($_GET['action'] == 'up' && $user->rights->commande->creer) { $commande = new Commande($db,'',$_GET['id']); $commande->fetch($_GET['id']); - $commande->fetch_client(); + $commande->fetch_thirdparty(); $commande->line_up($_GET['rowid']); // Define output language @@ -706,7 +706,7 @@ if ($_GET['action'] == 'down' && $user->rights->commande->creer) { $commande = new Commande($db,'',$_GET['id']); $commande->fetch($_GET['id']); - $commande->fetch_client(); + $commande->fetch_thirdparty(); $commande->line_down($_GET['rowid']); // Define output language @@ -735,7 +735,7 @@ if ($_REQUEST['action'] == 'builddoc') // In get or post // Sauvegarde le dernier modele choisi pour generer un document $commande = new Commande($db, 0, $_REQUEST['id']); $result=$commande->fetch($_REQUEST['id']); - $commande->fetch_client(); + $commande->fetch_thirdparty(); if ($_REQUEST['model']) { diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a56536a308e16e47e74b7e9a20fec67167606fe3..a56b37dcf54940a75cf0273b0bd580c485b2212e 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -142,7 +142,7 @@ if ($_REQUEST['action'] == 'confirm_deleteproductline' && $_REQUEST['confirm'] = { $fac = new Facture($db); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); $result = $fac->deleteline($_GET['rowid'], $user); if ($result > 0) @@ -306,7 +306,7 @@ if ($_REQUEST['action'] == 'confirm_valid' && $_REQUEST['confirm'] == 'yes' && $ { $fac = new Facture($db); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); $result = $fac->validate($user); if ($result >= 0) @@ -334,7 +334,7 @@ if ($_GET['action'] == 'modif' && $user->rights->facture->unvalidate) { $fac = new Facture($db); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); // On verifie si la facture a des paiements $sql = 'SELECT pf.amount'; @@ -430,7 +430,7 @@ if ($_REQUEST['action'] == 'confirm_converttoreduc' && $_REQUEST['confirm'] == ' $fac = new Facture($db); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); $fac->fetch_lines(); if (! $fac->paye) // protection against multiple submit @@ -529,7 +529,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) { // This is a replacement invoice $result=$facture->fetch($_POST['fac_replacement']); - $facture->fetch_client(); + $facture->fetch_thirdparty(); $facture->date = $datefacture; $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); exit; } - $ret=$fac->fetch_client(); + $ret=$fac->fetch_thirdparty(); $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']); @@ -956,7 +956,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->facture->creer && $_POST { $fac = new Facture($db,'',$_POST['facid']); if (! $fac->fetch($_POST['facid']) > 0) dol_print_error($db); - $fac->fetch_client(); + $fac->fetch_thirdparty(); // Clean parameters $date_start=''; @@ -1054,7 +1054,7 @@ if ($_GET['action'] == 'up' && $user->rights->facture->creer) { $fac = new Facture($db,'',$_GET['facid']); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); $fac->line_up($_GET['rowid']); // Define output language @@ -1077,7 +1077,7 @@ if ($_GET['action'] == 'down' && $user->rights->facture->creer) { $fac = new Facture($db,'',$_GET['facid']); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); $fac->line_down($_GET['rowid']); // Define output language @@ -1306,7 +1306,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post { $fac = new Facture($db, 0, $_GET['facid']); $fac->fetch($_GET['facid']); - $fac->fetch_client(); + $fac->fetch_thirdparty(); if ($_REQUEST['model']) { @@ -1383,7 +1383,7 @@ if ($_GET['action'] == 'create') $classname = ucfirst($subelement); $object = new $classname($db); $object->fetch($_GET['originid']); - $object->fetch_client(); + $object->fetch_thirdparty(); $projectid = (!empty($object->fk_project)?$object->fk_project:''); $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); - $result=$fac->fetch_client(); + $result=$fac->fetch_thirdparty(); $soc = new Societe($db, $fac->socid); $soc->fetch($fac->socid); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index db2e5b249bdd37f5eafb4db544ddf882cb4c8329..0ff4eb26d266639ad4fd81b5d33a70bd1195a9eb 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1321,7 +1321,7 @@ class Facture extends CommonObject $this->db->begin(); - $this->fetch_client(); + $this->fetch_thirdparty(); $this->fetch_lines(); // Check parameters diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 3fc107c564236a42ee9183f1142f87839bed1960..c4920758aab69ecf29ee10d415c00049eaf59684 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -168,7 +168,7 @@ if ($id > 0 || ! empty($ref)) $facture = new Facture($db); if ($facture->fetch($id, $ref) > 0) { - $facture->fetch_client(); + $facture->fetch_thirdparty(); $head = facture_prepare_head($facture); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 4a4ce2632704e3a4a35ca6d34a57aea52458c38b..d0829a1a13cbbcd00e675bc83cf98c03442f49f8 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -118,7 +118,7 @@ if ($_GET["action"] == 'create') 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 '<td>'; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index f84f698eac25381a21c72d62338c281af6e402bc..fef83324fa6e972ac216fd79af42f5b206203f43 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -178,7 +178,7 @@ if ($_POST['action'] == 'confirm_paiement' && $_POST['confirm'] == 'yes') $facid = $key; $fac = new Facture($db); $fac->fetch($facid); - $fac->fetch_client(); + $fac->fetch_thirdparty(); $acc->add_url_line($bank_line_id, $paiement_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) { - $facture->fetch_client(); + $facture->fetch_thirdparty(); $title=''; if ($facture->type != 2) $title.=$langs->trans("EnterPaymentReceivedFromCustomer"); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 27e37f8694714de3e2b8b98583404bf652efc01e..509485483239231ebb4a6b76d4a76f5d755325ff 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -189,7 +189,7 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer) dol_print_error($db,$commande->error); exit; } - $ret=$contrat->fetch_client(); + $ret=$contrat->fetch_thirdparty(); $date_start=''; $date_end=''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5540a6c490931a8c2f4476447566c7afc8bf728c..db873d2b015ece6babb3663bccfb729090da6d18 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -453,15 +453,6 @@ class CommonObject 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 * \return int <0 if KO, >=0 if OK diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index d6628bdc5be2a2ecccaee15cfe006539dbedba88..1a2aed2789b7c6a0bc662efa4eed7235cbfeba2b 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -149,7 +149,7 @@ if ($_REQUEST["action"] == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $ { $expedition = new Expedition($db); $expedition->fetch($_GET["id"]); - $expedition->fetch_client(); + $expedition->fetch_thirdparty(); $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 $shipment = new Expedition($db, 0, $_REQUEST['id']); $shipment->fetch($_REQUEST['id']); - $shipment->fetch_client(); + $shipment->fetch_thirdparty(); if ($_REQUEST['model']) { diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index d1ac731ab958b9edee733c9abbe5c4b1552bc917..cae85a04470523606607d824bd84d0c62778b2d0 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -187,7 +187,7 @@ if ($id > 0) // Customer if ( is_null($fichinter->client) ) - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); print "<tr><td>".$langs->trans("Company")."</td>"; print '<td colspan="3">'.$fichinter->client->getNomUrl(1).'</td></tr>'; diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 480554d31c3a1b49f482ee7dd1b18300dc0e696b..9e880f0ea0471aca2004f889c4c4a84dd925d3a6 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -109,7 +109,7 @@ llxHeader("","",$langs->trans("InterventionCard")); if ($object->id) { - $object->fetch_client(); + $object->fetch_thirdparty(); $soc = new Societe($db, $object->societe->id); $soc->fetch($object->societe->id); diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 90faa61de4f256600806581b4abbb84c16f37d95..f8fe080ade6ffa4d643464d1a119d326890ed18d 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -86,7 +86,7 @@ if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes') { $fichinter = new Fichinter($db); $fichinter->fetch($_GET["id"]); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $result = $fichinter->setValid($user, $conf->fichinter->outputdir); if ($result >= 0) @@ -115,7 +115,7 @@ if ($_REQUEST['action'] == 'confirm_modify' && $_REQUEST['confirm'] == 'yes') { $fichinter = new Fichinter($db); $fichinter->fetch($_GET["id"]); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $result = $fichinter->setDraft($user); if ($result >= 0) @@ -196,7 +196,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post { $fichinter = new Fichinter($db); $fichinter->fetch($_GET['id']); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $fichinter->fetch_lines(); if ($_REQUEST['model']) @@ -258,7 +258,7 @@ if ($_POST['action'] == "addligne" && $user->rights->ficheinter->creer) { $fichinter = new Fichinter($db); $ret=$fichinter->fetch($_POST['fichinterid']); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $desc=$_POST['np_desc']; $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); exit; } - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $desc=$_POST['np_desc']; $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->fetch($_GET['id']); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $fichinter->line_up($_GET['rowid']); // Define output language @@ -412,7 +412,7 @@ if ($_GET['action'] == 'down' && $user->rights->ficheinter->creer) { $fichinter = new Fichinter($db); $fichinter->fetch($_GET['id']); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $fichinter->line_down($_GET['rowid']); // Define output language @@ -549,7 +549,7 @@ elseif ($fichinterid) /* * Affichage en mode visu */ - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $societe=new Societe($db); $societe->fetch($fichinter->socid); diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index a85cac763dfb17c2e2efd8dd8cf43393981dc973..a8a75d07afbabf740d73aadbaabb987261b0ec81 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -168,7 +168,7 @@ if ($id > 0) $facture = new FactureFournisseur($db); if ($facture->fetch($_GET['facid'], $user->societe_id) > 0) { - $facture->fetch_client(); + $facture->fetch_thirdparty(); $head = facturefourn_prepare_head($facture); diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 0e0941bc3c02fb41c68a620382ac2c57f70c86a8..51cb5a44ad2a6c3f12f29bc7b54c34d0f1c56352 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -905,7 +905,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('Arial','',8); $pdf->SetXY(102,$posy-5); $pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":"); - $object->fetch_client(); + $object->fetch_thirdparty(); // Cadre client destinataire $pdf->rect(100, $posy, 100, $hautcadre); diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php index 57de2c1d7ab46eb1662fde912627c58a27cd2100..708e9ebad71b915e01a5d8cedd6927a380716ec9 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php @@ -95,7 +95,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition //Verification de la configuration if ($conf->expedition->dir_output."/sending") { - $object->fetch_client(); + $object->fetch_thirdparty(); //Creation de l expediteur $this->expediteur = $mysoc; @@ -478,7 +478,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition $blSocY = 1; $pdf->Rect($blExpX, $Yoff, $blW, 20); - $object->fetch_client(); + $object->fetch_thirdparty(); // If SHIPPING contact defined on order, we use it $usecontact=false; diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php index c3306acb41fce29af24dc99a05dbc2a374840223..5a46306675b28bdd6a08c7eb7405c77bbe07ddf8 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php @@ -230,7 +230,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition { global $user,$conf,$langs; - $object->fetch_client(); + $object->fetch_thirdparty(); if (! is_object($outputlangs)) $outputlangs=$langs; // Force output charset to ISO, because, FPDF expect text encoded in ISO diff --git a/htdocs/includes/modules/facture/modules_facture.php b/htdocs/includes/modules/facture/modules_facture.php index e6849f179b852efaf56f3c5e29058ebb0777c7bd..b32548282f464adca7ff7585a48101cb92896bdd 100644 --- a/htdocs/includes/modules/facture/modules_facture.php +++ b/htdocs/includes/modules/facture/modules_facture.php @@ -225,7 +225,7 @@ function facture_meta_create($db, $facid, $message="") $fac = new Facture($db,"",$facid); $fac->fetch($facid); - $fac->fetch_client(); + $fac->fetch_thirdparty(); if ($conf->facture->dir_output) { diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index b3468dffc6d9960e2340e04a8c3f1a96d8391401..c0e4af49e0744737f5f0b2abae3ce63377f4627a 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -132,7 +132,7 @@ class pdf_crabe extends ModelePDFFactures $ret=$fac->fetch($id); } - $fac->fetch_client(); + $fac->fetch_thirdparty(); $deja_regle = $fac->getSommePaiement(); $amount_credit_notes_included = $fac->getSumCreditNotesUsed(); diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index c37d59d41e18cc1e433df25e0c31f0f4434cbf3c..cd0dcf5ea3b5fdc066b533b0530744a77e805528 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -128,7 +128,7 @@ class pdf_oursin extends ModelePDFFactures $fac = new Facture($this->db); $ret=$fac->fetch($id); } - $fac->fetch_client(); + $fac->fetch_thirdparty(); $deja_regle = $fac->getSommePaiement(); $amount_credit_notes_included = $fac->getSumCreditNotesUsed(); diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index 9702f444787889687c0420cd9fc595b8da921fed..2539d29271541d6ad2460de1435269ab8993407a 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -238,7 +238,7 @@ class pdf_soleil extends ModelePDFFicheinter // Client destinataire $pdf->SetTextColor(0,0,0); $pdf->SetFont('Arial','B',12); - $fichinter->fetch_client(); + $fichinter->fetch_thirdparty(); $pdf->SetXY(102,42); $pdf->MultiCell(86,5, $outputlangs->convToOutputCharset($carac_client_name)); $pdf->SetFont('Arial','B',11); diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php index 5e61c218cb873463141dfd2a3a244209cf594993..ba70b72b14de44e2f288f6002bb695a80585ef16 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php @@ -110,7 +110,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder } } - $object->fetch_client(); + $object->fetch_thirdparty(); $nblignes = sizeof($object->lignes); diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index 5aaf3ae7494c36c35e304936521debc2820faeb1..3d75ef8ecfd2e71cd6f19c4f39c380766625b6ca 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -132,7 +132,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder } } - $object->fetch_client(); + $object->fetch_thirdparty(); $nblignes = sizeof($object->lignes); diff --git a/htdocs/includes/modules/project/pdf/pdf_baleine.modules.php b/htdocs/includes/modules/project/pdf/pdf_baleine.modules.php index ed7e0bbd717d2a9afed5980963395ba6e28fbe15..5df9c5b142d4d721e3cb75b49abc4e296c6291dc 100644 --- a/htdocs/includes/modules/project/pdf/pdf_baleine.modules.php +++ b/htdocs/includes/modules/project/pdf/pdf_baleine.modules.php @@ -452,7 +452,7 @@ class pdf_baleine extends ModelePDFProjects // Cadre client destinataire $pdf->rect(100, $posy, 100, $hautcadre); - $object->fetch_client(); + $object->fetch_thirdparty(); // Recipient name if (! empty($usecontact)) diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 0f492d5ae24395b95e6e4c8380142d126fbe0e15..d15275842fe4ed787ea8eab703bbd2c7129962fe 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -130,7 +130,7 @@ class pdf_propale_azur extends ModelePDFPropales $propale = new Propal($this->db,"",$id); $ret=$propale->fetch($id); } - $propale->fetch_client(); + $propale->fetch_thirdparty(); $deja_regle = ""; // Definition de $dir et $file diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index 804e8c5a1d9d8b7171f7459bc88269ff67ddd6dc..fb3773ce59bc013a2e66e86e3df8c7684f12fe16 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -105,7 +105,7 @@ class pdf_propale_jaune extends ModelePDFPropales $propale = new Propal($this->db,"",$id); $ret=$propale->fetch($id); } - $propale->fetch_client(); + $propale->fetch_thirdparty(); $deja_regle = ""; // Definition de $dir et $file diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 398ca056cefc2b1bcc188f38f95b4a7a598da73f..18d899dcb5d2384fe3652e42ee612c01872b94d0 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -104,7 +104,7 @@ if ($_REQUEST["action"] == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $ { $delivery = new Livraison($db); $delivery->fetch($_GET["id"]); - $delivery->fetch_client(); + $delivery->fetch_thirdparty(); $result = $delivery->valid($user); @@ -392,7 +392,7 @@ else { $delivery = new Livraison($db); $result = $delivery->fetch($_GET["id"]); - $delivery->fetch_client(); + $delivery->fetch_thirdparty(); $expedition=new Expedition($db); $result = $expedition->fetch($delivery->expedition_id); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index dbc54a9d50f6557dc63c74335878668c8f673d3e..42c34f11895944bf413d6139134d97d9d9659198 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -195,7 +195,7 @@ foreach ($listofreferent as $key => $value) { $element = new $classname($db); $element->fetch($elementarray[$i]); - $element->fetch_client(); + $element->fetch_thirdparty(); //print $classname; $var=!$var; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index f41279ba78a1452b288a2bf5d80d146a2d6f6ac0..77ae8b18756d9f64550eb81c243c5278fa42f116 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -248,7 +248,7 @@ if ($_REQUEST["amount"] == 'order') } else { - $result=$order->fetch_client($order->socid); + $result=$order->fetch_thirdparty($order->socid); } $amount=$order->total_ttc; @@ -322,7 +322,7 @@ if ($_REQUEST["amount"] == 'invoice') } else { - $result=$invoice->fetch_client($invoice->socid); + $result=$invoice->fetch_thirdparty($invoice->socid); } $amount=$invoice->total_ttc - $invoice->getSommePaiement(); @@ -401,7 +401,7 @@ if ($_REQUEST["amount"] == 'contractline') $result=$contract->fetch($contractline->fk_contrat); if ($result > 0) { - $result=$contract->fetch_client($contract->socid); + $result=$contract->fetch_thirdparty($contract->socid); } else { diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 38faa37f96b2f7d49056e583803600230c86c97f..243685c2ded8278182736a5c0944a17e5b4a3b22 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -307,7 +307,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $soc = new Societe($db); $soc->fetch($socid); - $soc->fetch_client(); + $soc->fetch_thirdparty(); /*if ($_REQUEST['model']) { diff --git a/test/CommonObjectTest.php b/test/CommonObjectTest.php index e3e9840603dd06ecfaa877402494f022a1774055..0c148c7da6fdcf47e9e6cde1556de082d066822a 100644 --- a/test/CommonObjectTest.php +++ b/test/CommonObjectTest.php @@ -189,7 +189,7 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase $localobject=new Commande($this->savdb); $localobject->fetch(1); - $result=$localobject->fetch_client(); + $result=$localobject->fetch_thirdparty(); print __METHOD__." result=".$result."\n"; $this->assertLessThanOrEqual($result,0);