FIX Label of DEPOSIT on screen
Fix look and feel v11
This commit is contained in:
parent
1de62b1f44
commit
ad7278e6a5
@ -2542,6 +2542,11 @@ if ($action == 'create' && $usercancreate)
|
|||||||
// Note that $action and $object may be modified by hook
|
// Note that $action and $object may be modified by hook
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
|
// Reopen a closed order
|
||||||
|
if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $usercancreate) {
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||||
if ($usercansend) {
|
if ($usercansend) {
|
||||||
@ -2619,11 +2624,6 @@ if ($action == 'create' && $usercancreate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reopen a closed order
|
|
||||||
if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $usercancreate) {
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set to shipped
|
// Set to shipped
|
||||||
if (($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS) && $usercanclose) {
|
if (($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS) && $usercanclose) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=shipped">'.$langs->trans('ClassifyShipped').'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=shipped">'.$langs->trans('ClassifyShipped').'</a></div>';
|
||||||
|
|||||||
@ -103,8 +103,10 @@ $extrafields = new ExtraFields($db);
|
|||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
|
if ($action != 'add') {
|
||||||
$ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION);
|
$ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('invoicecard', 'globalcard'));
|
$hookmanager->initHooks(array('invoicecard', 'globalcard'));
|
||||||
@ -134,6 +136,7 @@ if ($user->socid) $socid = $user->socid;
|
|||||||
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
|
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -941,11 +944,13 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($_POST['fac_replacement'] > 0)) {
|
if (!($_POST['fac_replacement'] > 0)) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||||
@ -992,6 +997,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CorrectInvoice")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CorrectInvoice")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||||
@ -999,6 +1005,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||||
@ -1181,6 +1188,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||||
@ -1223,6 +1231,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||||
@ -1230,6 +1239,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||||
@ -1642,6 +1652,7 @@ if (empty($reshook))
|
|||||||
$error++;
|
$error++;
|
||||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("InvoiceSituation"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("InvoiceSituation"));
|
||||||
setEventMessages($mesg, null, 'errors');
|
setEventMessages($mesg, null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
@ -2939,7 +2950,7 @@ if ($action == 'create')
|
|||||||
if (($origin == 'propal') || ($origin == 'commande'))
|
if (($origin == 'propal') || ($origin == 'commande'))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" style="padding-left: 5px">';
|
print '<td class="nowrap" style="padding-left: 5px">';
|
||||||
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount'), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
||||||
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap" style="padding-left: 5px">'.$langs->trans('Value').':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="'.GETPOST('valuedeposit', 'int').'"/>';
|
print '<td class="nowrap" style="padding-left: 5px">'.$langs->trans('Value').':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="'.GETPOST('valuedeposit', 'int').'"/>';
|
||||||
@ -5082,21 +5093,6 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clone
|
|
||||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $usercancreate)
|
|
||||||
{
|
|
||||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=clone&object=invoice">'.$langs->trans("ToClone").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clone as predefined / Create template
|
|
||||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut == 0 && $usercancreate)
|
|
||||||
{
|
|
||||||
if (!$objectidnext && count($object->lines) > 0)
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a credit note
|
// Create a credit note
|
||||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
||||||
{
|
{
|
||||||
@ -5123,6 +5119,21 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clone
|
||||||
|
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $usercancreate)
|
||||||
|
{
|
||||||
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=clone&object=invoice">'.$langs->trans("ToClone").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clone as predefined / Create template
|
||||||
|
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut == 0 && $usercancreate)
|
||||||
|
{
|
||||||
|
if (!$objectidnext && count($object->lines) > 0)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove situation from cycle
|
// Remove situation from cycle
|
||||||
if ($object->statut > Facture::STATUS_DRAFT
|
if ($object->statut > Facture::STATUS_DRAFT
|
||||||
&& $object->type == Facture::TYPE_SITUATION
|
&& $object->type == Facture::TYPE_SITUATION
|
||||||
|
|||||||
@ -135,9 +135,15 @@ else
|
|||||||
echo $form->textwithtooltip($text, dol_htmlentitiesbr($line->description), 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : ''));
|
echo $form->textwithtooltip($text, dol_htmlentitiesbr($line->description), 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : ''));
|
||||||
} else {
|
} else {
|
||||||
if (!empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
if (!empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
||||||
|
if (preg_match('/^\(DEPOSIT\)/', $line->description)) {
|
||||||
|
$newdesc = preg_replace('/^\(DEPOSIT\)/', $langs->trans("Deposit"), $line->description);
|
||||||
|
echo $text.' '.dol_htmlentitiesbr($newdesc);
|
||||||
|
}
|
||||||
|
else {
|
||||||
echo $text.' '.dol_htmlentitiesbr($line->description);
|
echo $text.' '.dol_htmlentitiesbr($line->description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Show date range
|
// Show date range
|
||||||
if ($line->element == 'facturedetrec') {
|
if ($line->element == 'facturedetrec') {
|
||||||
|
|||||||
@ -1845,7 +1845,7 @@ if ($action == 'create')
|
|||||||
if (($origin == 'propal') || ($origin == 'commande'))
|
if (($origin == 'propal') || ($origin == 'commande'))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" style="padding-left: 5px">';
|
print '<td class="nowrap" style="padding-left: 5px">';
|
||||||
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
|
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
||||||
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
|
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
|
||||||
|
|||||||
@ -416,7 +416,7 @@ PaymentConditionShort14D=14 days
|
|||||||
PaymentCondition14D=14 days
|
PaymentCondition14D=14 days
|
||||||
PaymentConditionShort14DENDMONTH=14 days of month-end
|
PaymentConditionShort14DENDMONTH=14 days of month-end
|
||||||
PaymentCondition14DENDMONTH=Within 14 days following the end of the month
|
PaymentCondition14DENDMONTH=Within 14 days following the end of the month
|
||||||
FixAmount=Fixed amount
|
FixAmount=Fixed amount - 1 line with label '%s'
|
||||||
VarAmount=Variable amount (%% tot.)
|
VarAmount=Variable amount (%% tot.)
|
||||||
VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s'
|
VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s'
|
||||||
# PaymentType
|
# PaymentType
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user