diff --git a/htdocs/.gitignore b/htdocs/.gitignore index 608ef55d106..1650ea7e5ae 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -22,3 +22,4 @@ /cabinetmed* /webmail* /conf/conf.php +/subtotal/ diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index cc84e87ddba..dd325da7297 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -35,27 +35,44 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("propal"); +$total=0; $ilink=0; $var=true; -$total=0; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("Proposal"); ?> - getNomUrl(1); ?> - ref_client; ?> - date,'day'); ?> - rights->propale->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - + + trans("Proposal"); ?> + getNomUrl(1); ?> + ref_client; ?> + date,'day'); ?> + rights->propale->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 98e931db9f8..38efbc91ca2 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -24,41 +24,60 @@ load("orders"); +$total=0; $ilink=0; $var=true; -$total=0; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("CustomerOrder"); ?> - getNomUrl(1); ?> - ref_client; ?> - date,'day'); ?> - rights->commande->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - - element != 'shipping') { - ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - - - + + trans("CustomerOrder"); ?> + getNomUrl(1); ?> + ref_client; ?> + date,'day'); ?> + rights->commande->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + + element != 'shipping') { + ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + + + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + \ No newline at end of file diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 56e8645b8c7..16aa54e229d 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -24,32 +24,51 @@ load("bills"); +$total=0; $ilink=0; $var=true; -$total=0; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("CustomerInvoice"); ?> - getNomUrl(1); ?> - ref_client; ?> - date,'day'); ?> - rights->facture->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - + + trans("CustomerInvoice"); ?> + getNomUrl(1); ?> + ref_client; ?> + date,'day'); ?> + rights->facture->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + \ No newline at end of file diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b5fc9fbc560..8a6c97e794c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5215,7 +5215,7 @@ class Form if (empty($reshook)) { - $num = count($object->linkedObjects); + $nbofdifferenttypes = count($object->linkedObjects); print '
'; print load_fiche_titre($langs->trans('RelatedObjects'), $morehtmlright, ''); @@ -5232,7 +5232,7 @@ class Form print ''; print ''; - $numoutput=0; + $nboftypesoutput=0; foreach($object->linkedObjects as $objecttype => $objects) { @@ -5292,23 +5292,28 @@ class Form $dirtpls=array_merge($conf->modules_parts['tpl'],array('/'.$tplpath.'/tpl')); foreach($dirtpls as $reldir) { + if ($nboftypesoutput == ($nbofdifferenttypes - 1)) // No more type to show after + { + global $noMoreLinkedObjectBlockAfter; + $noMoreLinkedObjectBlockAfter=1; + } $res=@include dol_buildpath($reldir.'/'.$tplname.'.tpl.php'); if ($res) { - $numoutput++; + $nboftypesoutput++; break; } } } - if (! $numoutput) + if (! $nboftypesoutput) { print ''.$langs->trans("None").''; } print ''; - return $num; + return $nbofdifferenttypes; } } diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index 276eb5ed8fa..f66ff148d66 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -29,35 +29,52 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("sendings"); -$total=0; +$total=0; $ilink=0; $var=true; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("Shipment"); ?> - getNomUrl(1); ?> - - date_delivery,'day'); ?> - rights->expedition->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - - element != 'commande') { - ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - - + + trans("Shipment"); ?> + getNomUrl(1); ?> + + date_delivery,'day'); ?> + rights->expedition->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + + element != 'commande') { + ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index 4cb232add74..5afde3a4427 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -23,32 +23,49 @@ load("orders"); -$total=0; +$total=0; $ilink=0; $var=true; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("SupplierOrder"); ?> - trans("ShowOrder"),"order").' '.$objectlink->ref; ?> - ref_supplier; ?> - date,'day'); ?> - rights->fournisseur->commande->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - -"> + trans("SupplierOrder"); ?> + trans("ShowOrder"),"order").' '.$objectlink->ref; ?> + ref_supplier; ?> + date,'day'); ?> + rights->fournisseur->commande->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 6762d836d52..4df741b8ad4 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -24,32 +24,49 @@ load("bills"); -$total=0; +$total=0; $ilink=0; $var=true; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("SupplierInvoice"); ?> - trans("ShowBill"),"bill").' '.$objectlink->ref; ?> - ref_supplier; ?> - date,'day'); ?> - rights->fournisseur->facture->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - -"> + trans("SupplierInvoice"); ?> + trans("ShowBill"),"bill").' '.$objectlink->ref; ?> + ref_supplier; ?> + date,'day'); ?> + rights->fournisseur->facture->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index cbbeb092a1a..b85b61bc334 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -23,7 +23,7 @@ QtyReceived=Qty received QtyInOtherShipments=Qty in other shipments KeepToShip=Remain to ship OtherSendingsForSameOrder=Other shipments for this order -SendingsAndReceivingForSameOrder=Shipments and receivings for this order +SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Shipments to validate StatusSendingCanceled=Canceled StatusSendingDraft=Draft diff --git a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php index 8f72744486a..8ba1f958918 100644 --- a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php @@ -28,27 +28,44 @@ global $user; $langs = $GLOBALS['langs']; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +$total=0; $ilink=0; $var=true; -$total=0; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + $ilink++; + $var=!$var; + $trclass=($var?'pair':'impair'); + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - > - trans("SupplierProposal"); ?> - trans("ShowSupplierProposal"),"supplier_proposal").' '.$objectlink->ref; ?> - - datec,'day'); ?> - rights->supplier_proposal->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> - getLibStatut(3); ?> - ">transnoentitiesnoconv("RemoveLink")); ?> - + + trans("SupplierProposal"); ?> + trans("ShowSupplierProposal"),"supplier_proposal").' '.$objectlink->ref; ?> + + datec,'day'); ?> + rights->supplier_proposal->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> + getLibStatut(3); ?> + ">transnoentitiesnoconv("RemoveLink")); ?> + 1) +{ + ?> + + trans("Total"); ?> + + + + + + + + diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 2c639df7c9d..f1368099864 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2859,7 +2859,7 @@ form.liste_total div { border-top: 1px solid #DDDDDD; } tr.liste_sub_total, tr.liste_sub_total td { - border-bottom: 2px solid #aaa; + border-bottom: 1px solid #aaa; } .tableforservicepart1 .impair, .tableforservicepart1 .pair, .tableforservicepart2 .impair, .tableforservicepart2 .pair {