Fix responsive

This commit is contained in:
Laurent Destailleur 2022-04-24 18:39:26 +02:00
parent ad7fcd264b
commit 16c607f4d8
4 changed files with 35 additions and 22 deletions

View File

@ -32,8 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php';
$langs->loadLangs(array('compta', 'banks', 'bills'));
$id = GETPOST("id", 'int');
$action = GETPOST("action", "alpha");
$cancel = GETPOST('cancel');
$action = GETPOST("action", "aZ09");
$cancel = GETPOST('cancel', 'aZ09');
$refund = GETPOST("refund", "int");
if (empty($refund)) {
@ -143,7 +143,7 @@ $form = new Form($db);
$title = $langs->trans("LT".$object->ltt)." - ".$langs->trans("Card");
$help_url = '';
llxHeader("", $title, $helpurl);
llxHeader('', $title, $helpurl);
if ($action == 'create') {
print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code));
@ -157,11 +157,13 @@ if ($action == 'create') {
print '<table class="border centpercent">';
// Date of payment
print "<tr>";
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
print $form->selectDate($datep, "datep", '', '', '', 'add', 1, 1);
print '</td></tr>';
// End date of period
print '<tr><td class="fieldrequired">'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).'</td><td>';
print $form->selectDate($datev, "datev", '', '', '', 'add', 1, 1);
print '</td></tr>';
@ -173,20 +175,24 @@ if ($action == 'create') {
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.GETPOST("amount").'"></td></tr>';
if (!empty($conf->banque->enabled)) {
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
$form->select_comptes(GETPOST("accountid", "int"), "accountid", 0, "courant=1", 2); // Affiche liste des comptes courant
print '</td></tr>';
// Type payment
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOST("paiementtype"), "paiementtype");
$form->select_types_paiements(GETPOST("paiementtype"), "paiementtype", '', 0, 1, 0, 0, 1,'maxwidth500 widthcentpercentminusx');
print "</td>\n";
print "</tr>";
// Bank account
print '<tr><td class="fieldrequired" id="label_fk_account">'.$langs->trans("Account").'</td><td>';
print img_picto('', 'bank_account', 'pictofixedwidth');
$form->select_comptes(GETPOST("accountid", "int"), "accountid", 0, "courant=1", 2, '', 0, 'maxwidth500 widthcentpercentminusx'); // Affiche liste des comptes courant
print '</td></tr>';
// Number
print '<tr><td>'.$langs->trans('Numero');
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
print '<td><input name="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
}
// Other attributes
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook

View File

@ -63,6 +63,7 @@ if ($result) {
$i = 0;
$total = 0;
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td class="nowrap" align="left">'.$langs->trans("Ref").'</td>';
@ -85,7 +86,7 @@ if ($result) {
print '<td class="left">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
$total = $total + $obj->amount;
print "<td align=\"right\">".price($obj->amount)."</td>";
print '<td class="right nowraponall"><span class="amount">'.price($obj->amount).'</span></td>';
print "</tr>\n";
$i++;
@ -94,6 +95,8 @@ if ($result) {
print '<td class="right"><span class="amount">'.price($total).'</span></td></tr>';
print "</table>";
print '</div>';
$db->free($result);
} else {
dol_print_error($db);

View File

@ -207,14 +207,15 @@ if ($action == 'create') {
print '</tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype", "int") : $tva->paiementtype, "paiementtype");
$form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype", "int") : $tva->paiementtype, "paiementtype", '', 0, 1, 0, 0, 1,'maxwidth500 widthcentpercentminusx');
print "</td>\n";
print '</tr>';
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
print '<td>';
$form->select_comptes(GETPOST("accountid") ? GETPOST("accountid", "int") : $tva->accountid, "accountid", 0, '', 1); // Show opend bank account list
print img_picto('', 'bank_account', 'pictofixedwidth');
$form->select_comptes(GETPOST("accountid", "int") ? GETPOST("accountid", "int") : $tva->accountid, "accountid", 0, '', 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // Show opend bank account list
print '</td></tr>';
// Number
@ -225,7 +226,7 @@ if ($action == 'create') {
print '<tr>';
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
print '<td class="tdtop"><textarea name="note" class="quatrevingtpercent" wrap="soft" rows="'.ROWS_3.'"></textarea></td>';
print '</tr>';
print '</table>';
@ -238,6 +239,7 @@ if ($action == 'create') {
$num = 1;
$i = 0;
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
//print '<td>'.$langs->trans("SocialContribution").'</td>';
@ -259,14 +261,14 @@ if ($action == 'create') {
if ($objp->datev > 0) {
print '<td class="left">'.dol_print_date($objp->datev, 'day').'</td>'."\n";
} else {
print "<td align=\"center\"><b>!!!</b></td>\n";
print '<td class="center"><b>!!!</b></td>'."\n";
}
print '<td class="right"><span class="amount">'.price($objp->amount)."</span></td>";
print '<td class="right nowraponall"><span class="amount">'.price($objp->amount)."</span></td>";
print '<td class="right"><span class="amount">'.price($sumpaid)."</span></td>";
print '<td class="right nowraponall"><span class="amount">'.price($sumpaid)."</span></td>";
print '<td class="right"><span class="amount">'.price($objp->amount - $sumpaid)."</span></td>";
print '<td class="right nowraponall"><span class="amount">'.price($objp->amount - $sumpaid)."</span></td>";
print '<td class="center">';
@ -279,7 +281,7 @@ if ($action == 'create') {
} */
$remaintopay = $objp->amount - $sumpaid;
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
print '<input type="text" class="right width100" name="'.$namef.'" id="'.$namef.'" value="'.$remaintopay.'">';
print '<input type="text" class="right width75" name="'.$namef.'" id="'.$namef.'" value="'.$remaintopay.'">';
} else {
print '-';
}
@ -303,6 +305,7 @@ if ($action == 'create') {
}
print "</table>";
print '</div>';
// Bouton Save payment
print '<br><div class="center"><input type="checkbox" checked name="closepaidvat"> '.$langs->trans("ClosePaidVATAutomatically");

View File

@ -460,7 +460,7 @@ if ($action == 'create') {
print '</div>';
print '</td>';
//print "<br>\n";
print "</tr>\n";
// Label
if ($refund == 1) {
@ -468,7 +468,7 @@ if ($action == 'create') {
} else {
$label = $langs->trans("VATPayment");
}
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input class="minwidth300" name="label" id="label" value="'.($_POST["label"] ?GETPOST("label", '', 2) : $label).'" autofocus></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input class="minwidth300" name="label" id="label" value="'.(GETPOST("label", '', 2) ? GETPOST("label", '', 2) : $label).'" autofocus></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).'</td><td>';
print $form->selectDate((GETPOST("datevmonth", 'int') ? $datev : -1), "datev", '', '', '', 'add', 1, 1);
@ -490,14 +490,15 @@ if ($action == 'create') {
// Type payment
print '<tr><td class="fieldrequired" id="label_type_payment">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOST("type_payment"), "type_payment");
$form->select_types_paiements(GETPOST("type_payment", 'int'), "type_payment", '', 0, 1, 0, 0, 1,'maxwidth500 widthcentpercentminusx');
print "</td>\n";
print "</tr>";
if (!empty($conf->banque->enabled)) {
// Bank account
print '<tr><td class="fieldrequired" id="label_fk_account">'.$langs->trans("BankAccount").'</td><td>';
print img_picto('', 'bank_account', 'pictofixedwidth');
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1); // List of bank account available
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // List of bank account available
print '</td></tr>';
}
@ -509,7 +510,7 @@ if ($action == 'create') {
// Comments
print '<tr class="hide_if_no_auto_create_payment">';
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'">'.GETPOST('note', 'restricthtml').'</textarea></td>';
print '<td class="tdtop"><textarea name="note" wrap="soft" rows="'.ROWS_3.'" class="quatrevingtpercent">'.GETPOST('note', 'restricthtml').'</textarea></td>';
print '</tr>';
// Other attributes