Merge pull request #6055 from aspangaro/5.0-p37

Fix: Presentation of donation card
This commit is contained in:
Laurent Destailleur 2016-11-29 23:21:46 +01:00 committed by GitHub
commit dce3d5d888

View File

@ -305,9 +305,6 @@ if ($action == 'create')
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tbody>'; print '<tbody>';
$nbrows=11;
if (! empty($conf->projet->enabled)) $nbrows++;
// Date // Date
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Date").'</td><td>'; print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Date").'</td><td>';
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1); $form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
@ -428,11 +425,8 @@ if (! empty($id) && $action == 'edit')
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
$nbrows=12;
if (! empty($conf->projet->enabled)) $nbrows++;
// Date // Date
print "<tr>".'<td width="25%" class="fieldrequired">'.$langs->trans("Date").'</td><td>'; print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Date").'</td><td>';
$form->select_date($object->date,'','','','',"update"); $form->select_date($object->date,'','','','',"update");
print '</td>'; print '</td>';
@ -454,10 +448,10 @@ if (! empty($id) && $action == 'edit')
print "</tr>\n"; print "</tr>\n";
$langs->load("companies"); $langs->load("companies");
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$object->societe.'"></td></tr>'; print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$object->societe.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.$object->lastname.'"></td></tr>'; print '<tr><td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.$object->lastname.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.$object->firstname.'"></td></tr>'; print '<tr><td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.$object->firstname.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>'; print '<tr><td>'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.$object->address.'</textarea></td></tr>'; print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.$object->address.'</textarea></td></tr>';
// Zip / Town // Zip / Town
@ -468,7 +462,7 @@ if (! empty($id) && $action == 'edit')
print '</tr>'; print '</tr>';
// Country // Country
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">'; print '<tr><td class="titlefieldcreate">'.$langs->trans('Country').'</td><td colspan="3">';
print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code),'country_id'); print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code),'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print '</td></tr>'; print '</td></tr>';
@ -593,9 +587,6 @@ if (! empty($id) && $action != 'edit')
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
$nbrows=12;
if (! empty($conf->projet->enabled)) $nbrows++;
// Ref // Ref
/* /*
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2">'; print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2">';
@ -604,7 +595,7 @@ if (! empty($id) && $action != 'edit')
print '</tr>'; print '</tr>';
*/ */
// Date // Date
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">'; print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td colspan="2">';
print dol_print_date($object->date,"day"); print dol_print_date($object->date,"day");
print "</td>"; print "</td>";
@ -668,13 +659,13 @@ if (! empty($id) && $action != 'edit')
// Other attributes // Other attributes
$cols = 2; $cols = 2;
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '<div class="fichehalfright">'; print '<div class="fichehalfright">';
print '<div class="ficheaddleft">'; print '<div class="ficheaddleft">';
/* /*
* Payments * Payments
*/ */
@ -737,16 +728,13 @@ if (! empty($id) && $action != 'edit')
dol_print_error($db); dol_print_error($db);
} }
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '<div class="clearboth"></div>'; print '<div class="clearboth"></div>';
dol_fiche_end(); dol_fiche_end();
$remaintopay = $object->amount - $totalpaid; $remaintopay = $object->amount - $totalpaid;
@ -821,7 +809,7 @@ if (! empty($id) && $action != 'edit')
print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf); print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print '</div><div class="fichehalfright"><div class="ficheaddleft">'; print '</div><div class="fichehalfright"><div class="ficheaddleft">';
print '</div></div></div>'; print '</div></div></div>';
} }