From a6ddc90d5b263d3e7f704e24b31d0c19646191b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Aug 2021 23:53:58 +0200 Subject: [PATCH] Fix responsive --- htdocs/comm/index.php | 14 ++++++++++---- htdocs/comm/propal/index.php | 7 +++++-- htdocs/commande/index.php | 7 +++++-- htdocs/compta/facture/index.php | 28 +++++++++++++++++++++------- htdocs/core/lib/invoice.lib.php | 30 +++++++++++++++++++++--------- htdocs/don/index.php | 12 ++++++------ htdocs/fourn/facture/index.php | 29 ++++++++++++++++++++++------- htdocs/societe/consumption.php | 2 +- 8 files changed, 91 insertions(+), 38 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 0087c68bb08..18546332ed0 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -106,10 +106,16 @@ print load_fiche_titre($langs->trans("CommercialArea"), '', 'commercial'); print '
'; -print getCustomerProposalPieChart($socid); -print '
'; -print getCustomerOrderPieChart($socid); -print '
'; +$tmp = getCustomerProposalPieChart($socid); +if ($tmp) { + print $tmp; + print '
'; +} +$tmp = getCustomerOrderPieChart($socid); +if ($tmp) { + print $tmp; + print '
'; +} /* * Draft customer proposals diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index e080e36b49c..de2e4a1d64c 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -67,8 +67,11 @@ print load_fiche_titre($langs->trans("ProspectionArea"), '', 'propal'); print '
'; print '
'; -print getCustomerProposalPieChart($socid); -print '
'; +$tmp = getCustomerProposalPieChart($socid); +if ($tmp) { + print $tmp; + print '
'; +} /* * Draft proposals diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index f7dee2b4062..a794d79e743 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -77,8 +77,11 @@ print load_fiche_titre($langs->trans("OrdersArea"), '', 'order'); print '
'; -print getCustomerOrderPieChart($socid); -print '
'; +$tmp = getCustomerOrderPieChart($socid); +if ($tmp) { + print $tmp; + print '
'; +} /* diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php index 66a2fccaf08..d3d3a33acb5 100644 --- a/htdocs/compta/facture/index.php +++ b/htdocs/compta/facture/index.php @@ -59,19 +59,33 @@ print load_fiche_titre($langs->trans("CustomersInvoicesArea"), '', 'bill'); print '
'; print '
'; -print getNumberInvoicesPieChart('customers'); -//print getCustomerInvoicePieChart($socid); -print '
'; -print getCustomerInvoiceDraftTable($max, $socid); +$tmp = getNumberInvoicesPieChart('customers'); +if ($tmp) { + print $tmp; + print '
'; +} +$tmp = getCustomerInvoiceDraftTable($max, $socid); +if ($tmp) { + print $tmp; + print '
'; +} print '
'; print '
'; print '
'; -print getCustomerInvoiceLatestEditTable($maxLatestEditCount, $socid); -print '
'; -print getCustomerInvoiceUnpaidOpenTable($max, $socid); +$tmp = getCustomerInvoiceLatestEditTable($maxLatestEditCount, $socid); +if ($tmp) { + print $tmp; + print '
'; +} + +$tmp = getCustomerInvoiceUnpaidOpenTable($max, $socid); +if ($tmp) { + print $tmp; + print '
'; +} print '
'; print '
'; diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 4be6aa8379e..8f6a97894b9 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -679,7 +679,8 @@ function getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0) $companystatic->code_compta = $obj->code_compta; $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - $result .= ''; + $result .= ''; + $result .= ''; $result .= $tmpinvoice->getNomUrl(1, ''); $result .= ''; $result .= ''; @@ -807,7 +808,8 @@ function getDraftSupplierTable($maxCount = 500, $socid = 0) $companystatic->code_compta = $obj->code_compta; $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - $result .= ''; + $result .= ''; + $result .= ''; $result .= $facturesupplierstatic->getNomUrl(1, ''); $result .= ''; $result .= ''; @@ -883,7 +885,9 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0) $result .= ''; $result .= ''; - $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; $result .= ''; if ($num < 1) { @@ -917,7 +921,7 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0) $filename = dol_sanitizeFileName($obj->ref); $filedir = $conf->propal->multidir_output[$obj->entity].'/'.$filename; - $result .= ''; + $result .= ''; $result .= ''; - $result .= ''; + $result .= ''; $result .= ''; + $result .= ''; $result .= ''; $result .= ''; @@ -985,7 +990,9 @@ function getPurchaseInvoiceLatestEditTable($maxCount = 5, $socid = 0) $result = '
'; $result .= '
'.$langs->trans("LastCustomersBills", $maxCount).''.$langs->trans("LastCustomersBills", $maxCount).''.$langs->trans("AmountTTC").'
'; $result .= ''; @@ -931,8 +935,9 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0) $result .= '
'; $result .= '
'.$companystatic->getNomUrl(1, 'customer').''.$companystatic->getNomUrl(1, 'customer').''.dol_print_date($db->jdate($obj->datec), 'day').''.price($obj->total_ttc).''.$objectstatic->getLibStatut(5).'
'; $result .= ''; - $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; $result .= ''; if ($num < 1) { @@ -1019,7 +1026,7 @@ function getPurchaseInvoiceLatestEditTable($maxCount = 5, $socid = 0) $filename = dol_sanitizeFileName($obj->ref); $filedir = $conf->propal->multidir_output[$obj->entity].'/'.$filename; - $result .= ''; + $result .= ''; $result .= ''; - $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; $result .= ''; @@ -1341,7 +1352,8 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0) $societestatic->code_compta = $obj->code_compta; $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - print ''; + print ''; print ''; diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 2a314068830..e7aaeb8a4bd 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -174,8 +174,8 @@ foreach ($listofstatus as $status) { print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; $totalnb += (!empty($nb[$status]) ? $nb[$status] : 0); $total += (!empty($somme[$status]) ? $somme[$status] : 0); print ""; @@ -183,9 +183,9 @@ foreach ($listofstatus as $status) { print ''; print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; print ''; print "
'.$langs->trans("BoxTitleLastSupplierBills", $maxCount).''.$langs->trans("BoxTitleLastSupplierBills", $maxCount).''.$langs->trans("AmountTTC").'
'; $result .= ''; @@ -1033,8 +1040,12 @@ function getPurchaseInvoiceLatestEditTable($maxCount = 5, $socid = 0) $result .= '
'; $result .= '
'.$companystatic->getNomUrl(1, 'supplier').''.$companystatic->getNomUrl(1, 'supplier').''.dol_print_date($db->jdate($obj->datec), 'day').''.price($obj->total_ttc).''.$objectstatic->getLibStatut(5).'
'; + print '
'; print $facstatic->getNomUrl(1, ''); print ''.$societestatic->getNomUrl(1, 'supplier').'
'.$donstatic->LibStatut($status, 4).''.(!empty($nb[$status]) ? $nb[$status] : ' ').''.(!empty($nb[$status]) ?price($somme[$status], 'MT') : ' ').''.(!empty($nb[$status]) ?price(price2num($somme[$status] / $nb[$status], 'MT')) : ' ').''.(!empty($nb[$status]) ? price($somme[$status], 'MT') : ' ').''.(!empty($nb[$status]) ?price(price2num($somme[$status] / $nb[$status], 'MT')) : ' ').'
'.$langs->trans("Total").''.$totalnb.''.price($total, 'MT').''.($totalnb ?price(price2num($total / $totalnb, 'MT')) : ' ').''.$totalnb.''.price($total, 'MT').''.($totalnb ?price(price2num($total / $totalnb, 'MT')) : ' ').'
"; @@ -233,7 +233,7 @@ if ($resql) { print dolGetFirstLastname($obj->lastname, $obj->firstname); print ''; - print ''; + print ''; print price($obj->amount, 1); print ''; diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index c695eed9285..5479ad22462 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -58,19 +58,34 @@ print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'supplier_invo print '
'; print '
'; -print getNumberInvoicesPieChart('suppliers'); -//print getPurchaseInvoicePieChart($socid); -print '
'; -print getDraftSupplierTable($maxDraftCount, $socid); +$tmp = getNumberInvoicesPieChart('suppliers'); +if ($tmp) { + print $tmp; + print '
'; +} + +$tmp = getDraftSupplierTable($maxDraftCount, $socid); +if ($tmp) { + print $tmp; + print '
'; +} print '
'; print '
'; print '
'; -print getPurchaseInvoiceLatestEditTable($maxLatestEditCount, $socid); -print '
'; -print getPurchaseInvoiceUnpaidOpenTable($max, $socid); +$tmp = getPurchaseInvoiceLatestEditTable($maxLatestEditCount, $socid); +if ($tmp) { + print $tmp; + print '
'; +} + +$tmp = getPurchaseInvoiceUnpaidOpenTable($max, $socid); +if ($tmp) { + print $tmp; + print '
'; +} print '
'; print '
'; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index cb2802da385..5f996e6f37d 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -384,7 +384,7 @@ if (empty($elementTypeArray) && !$object->client && !$object->fournisseur) { // Define type of elements $typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), $showempty, 0, 0, '', 0, 0, $disabled, '', 'maxwidth150onsmartphone'); -$button = ''; +$button = ''; $param = ''; $param .= "&sref=".urlencode($sref);