Fix: function not found

This commit is contained in:
Laurent Destailleur 2009-07-21 11:06:03 +00:00
parent 1d4d2a2c08
commit 99c1b5fe88
6 changed files with 27 additions and 22 deletions

View File

@ -1336,7 +1336,7 @@ else
{ {
if ($commande->statut > 0) if ($commande->statut > 0)
{ {
print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->transnoentities("Currency".$conf->monnaie)); print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
} }
else else
{ {
@ -1441,7 +1441,7 @@ else
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');
print '</td>'; print '</td>';
if ($_GET['action'] != 'editmode') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>'; if ($_GET['action'] != 'editmode' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2">'; print '</td><td colspan="2">';
if ($_GET['action'] == 'editmode') if ($_GET['action'] == 'editmode')

View File

@ -398,6 +398,7 @@ class CommonObject
$address = new Societe($this->db); $address = new Societe($this->db);
$result=$address->fetch_adresse_livraison($deliveryaddressid); $result=$address->fetch_adresse_livraison($deliveryaddressid);
$this->deliveryaddress = $address; $this->deliveryaddress = $address;
$this->adresse = $adresse;
return $result; return $result;
} }

View File

@ -54,6 +54,14 @@ $result=restrictedArea($user,'commande',$comid,'');
* Actions * Actions
*/ */
// Categorisation dans projet
if ($_POST['action'] == 'classin')
{
$commande = new Commande($db);
$commande->fetch($_GET['id']);
$commande->setProject($_POST['projetid']);
}
if ($_GET["action"] == 'facturee') if ($_GET["action"] == 'facturee')
{ {
$commande = new Commande($db); $commande = new Commande($db);
@ -316,7 +324,7 @@ if ($id > 0 || ! empty($ref))
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project'); print $langs->trans('Project');
print '</td>'; print '</td>';
if ($_GET['action'] != 'classer' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classer&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>'; if ($_GET['action'] != 'classer') print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classer&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2">'; print '</td><td colspan="2">';
if ($_GET['action'] == 'classer') if ($_GET['action'] == 'classer')

View File

@ -58,6 +58,15 @@ $error = $user->load_entrepots();
/* /*
* Actions * Actions
*/ */
// Categorisation dans projet
if ($_POST['action'] == 'classin')
{
$commande = new Commande($db);
$commande->fetch($_GET['id']);
$commande->setProject($_POST['projetid']);
}
if ($_POST["action"] == 'confirm_cloture' && $_POST["confirm"] == 'yes') if ($_POST["action"] == 'confirm_cloture' && $_POST["confirm"] == 'yes')
{ {
$commande = new Commande($db); $commande = new Commande($db);
@ -333,7 +342,7 @@ if ($id > 0 || ! empty($ref))
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project'); print $langs->trans('Project');
print '</td>'; print '</td>';
if ($_GET['action'] != 'classer' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classer&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>'; if ($_GET['action'] != 'classer') print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classer&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2">'; print '</td><td colspan="2">';
if ($_GET['action'] == 'classer') if ($_GET['action'] == 'classer')

View File

@ -288,7 +288,7 @@ if ($_GET["action"] == 'create')
print '<td colspan="3">'; print '<td colspan="3">';
if (!empty($object->fk_delivery_address)) if (!empty($object->fk_delivery_address))
{ {
$expedition->fetch_adresse_livraison($object->fk_delivery_address); $object->fetch_adresse_livraison($object->fk_delivery_address);
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$expedition->deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$expedition->deliveryaddress->label.'</a>'; print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$expedition->deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$expedition->deliveryaddress->label.'</a>';
} }
print '</td></tr>'."\n"; print '</td></tr>'."\n";
@ -343,7 +343,7 @@ if ($_GET["action"] == 'create')
* Lignes de commandes * Lignes de commandes
* *
*/ */
print '<br><table class="noborder" width="100%">'; print '<br><table class="nobordernopadding" width="100%">';
//$lignes = $object->fetch_lines(1); //$lignes = $object->fetch_lines(1);
$numAsked = sizeof($object->lignes); $numAsked = sizeof($object->lignes);

View File

@ -627,19 +627,6 @@ class Livraison extends CommonObject
$this->$object->fetch($this->origin_id); $this->$object->fetch($this->origin_id);
} }
/**
*
*
*/
function fetch_adresse_livraison($id)
{
$idadresse = $id;
$adresse = new Societe($this->db);
$adresse->fetch_adresse_livraison($idadresse);
$this->adresse = $adresse;
}
/** /**
* *
* *