';
+ // Ref supplier
+ $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref.='
'.$langs->trans('Project') . ' ';
+ if ($user->rights->fournisseur->commande->creer)
+ {
+ if ($action != 'classify')
+ // $morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='
';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.='
';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+ }
+ $morehtmlref.='
';
- // Ref supplier
- print '';
+ print '
';
// Type
- print '
| '.$langs->trans('Type').' | ';
+ print ' |
| '.$langs->trans('Type').' | ';
print $object->getLibType();
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT)
{
@@ -137,38 +173,35 @@ if ($object->id > 0)
print ' |
';
// Label
- print '
| '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
+ print ' |
| '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
print $form->editfieldval("Label",'label',$object->label,$object,0);
print ' |
';
- // Status
- $alreadypaid=$object->getSommePaiement();
- print '
| '.$langs->trans('Status').' | '.$object->getLibStatut(4,$alreadypaid).' |
';
-
// Amount
- print '
| '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' |
';
- print '
| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' |
';
+ print '
| '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' |
';
+ print '
| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' |
';
// Amount Local Taxes
//TODO: Place into a function to control showing by country or study better option
if ($societe->localtax1_assuj=="1") //Localtax1
{
print '
| '.$langs->transcountry("AmountLT1",$societe->country_code).' | ';
- print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
print '
';
}
if ($societe->localtax2_assuj=="1") //Localtax2
{
print '
| '.$langs->transcountry("AmountLT2",$societe->country_code).' | ';
- print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
print '
';
}
- print '
| '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' |
';
+ print '
| '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' |
';
print "