Fix: Link betwen supplier order and invoice

This commit is contained in:
Laurent Destailleur 2011-03-08 00:15:32 +00:00
parent bee3592e59
commit f2fe06a2b0
5 changed files with 20 additions and 10 deletions

View File

@ -1377,14 +1377,14 @@ class CommonObject
} }
$classpath = $element.'/class'; $classpath = $element.'/class';
if ($element == 'facture') { $tplpath = 'compta/'.$element; $classpath = $tplpath.'/class'; } // To work with non standard path if ($objecttype == 'facture') { $tplpath = 'compta/'.$element; $classpath = $tplpath.'/class'; } // To work with non standard path
if ($element == 'propal') { $tplpath = 'comm/'.$element; $classpath = $tplpath.'/class'; } // To work with non standard path if ($objecttype == 'propal') { $tplpath = 'comm/'.$element; $classpath = $tplpath.'/class'; } // To work with non standard path
if ($element == 'invoice_supplier') { $tplpath = 'fourn/facture'; $classpath = 'fourn/class'; } // To work with non standard path if ($objecttype == 'invoice_supplier') { $tplpath = 'fourn/facture'; $classpath = 'fourn/class'; } // To work with non standard path
if ($element == 'order_supplier') { $tplpath = 'fourn/commande'; $classpath = 'fourn/class'; } // To work with non standard path if ($objecttype == 'order_supplier') { $tplpath = 'fourn/commande'; $classpath = 'fourn/class'; } // To work with non standard path
$classfile = strtolower($subelement); $classname = ucfirst($subelement); $classfile = strtolower($subelement); $classname = ucfirst($subelement);
if ($subelement == 'invoice_supplier') { $classfile='fournisseur.facture'; $classname='FactureFournisseur'; } if ($objecttype == 'invoice_supplier') { $classfile='fournisseur.facture'; $classname='FactureFournisseur'; }
if ($subelement == 'order_supplier') { $classfile='fournisseur.commande'; $classname='CommandeFournisseur'; } if ($objecttype == 'order_supplier') { $classfile='fournisseur.commande'; $classname='CommandeFournisseur'; }
//print $classfile." - ".$classpath." - ".$tplpath; //print $classfile." - ".$classpath." - ".$tplpath;
if(!class_exists($classname)) if(!class_exists($classname))
{ {

View File

@ -1368,8 +1368,6 @@ if ($id > 0 || ! empty($ref))
$object=$commande; $object=$commande;
if ($somethingshown) print '<br>';
/* /*
* Linked object block * Linked object block
*/ */

View File

@ -22,6 +22,13 @@
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->
<?php <?php
$langs = $GLOBALS['langs'];
$somethingshown = $GLOBALS['somethingshown'];
$linkedObjectBlock = $GLOBALS['object']->linkedObjectBlock;
$objectid = $GLOBALS['object']->objectid;
$num = count($objectid);
$langs->load("orders"); $langs->load("orders");
if ($somethingshown) { echo '<br>'; } if ($somethingshown) { echo '<br>'; }
print_titre($langs->trans('RelatedOrders')); print_titre($langs->trans('RelatedOrders'));

View File

@ -1839,8 +1839,6 @@ else
$object=$fac; $object=$fac;
if ($somethingshown) print '<br>';
/* /*
* Linked object block * Linked object block
*/ */

View File

@ -22,6 +22,13 @@
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->
<?php <?php
$langs = $GLOBALS['langs'];
$somethingshown = $GLOBALS['somethingshown'];
$linkedObjectBlock = $GLOBALS['object']->linkedObjectBlock;
$objectid = $GLOBALS['object']->objectid;
$num = count($objectid);
$langs->load("bills"); $langs->load("bills");
if ($somethingshown) { echo '<br>'; } if ($somethingshown) { echo '<br>'; }
if ($num > 1) print_titre($langs->trans("RelatedBills")); if ($num > 1) print_titre($langs->trans("RelatedBills"));