forked from Wavyzz/dolibarr
Minor enhancement on new recurring invoice generation
This commit is contained in:
@@ -1999,6 +1999,18 @@ if ($action == 'create')
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($origin == 'contrat')
|
||||||
|
{
|
||||||
|
$langs->load("admin");
|
||||||
|
$text=$langs->trans("ToCreateARecurringInvoice");
|
||||||
|
$text.=' '.$langs->trans("ToCreateARecurringInvoiceGene", $langs->transnoentitiesnoconv("MenuFinancial"), $langs->transnoentitiesnoconv("BillsCustomers"), $langs->transnoentitiesnoconv("ListOfTemplates"));
|
||||||
|
if (empty($conf->global->INVOICE_DISABLE_AUTOMATIC_RECURRING_INVOICE))
|
||||||
|
{
|
||||||
|
$text.=' '.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name'));
|
||||||
|
}
|
||||||
|
print info_admin($text, 0, 0, 0).'<br>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Number max of generation
|
// Number max of generation
|
||||||
print "<tr><td>".$langs->trans("MaxPeriodNumber")."</td><td>";
|
print "<tr><td>".$langs->trans("MaxPeriodNumber")."</td><td>";
|
||||||
print "<input type='text' name='nb_gen_max' value='' size='5' />";
|
print '<input type="text" name="nb_gen_max" value="'.GETPOST('nb_gen_max').'" size="5" />';
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Auto validate the invoice
|
// Auto validate the invoice
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ if (count($listofsearchfields))
|
|||||||
{
|
{
|
||||||
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||||
print '<tr '.$bc[false].'>';
|
print '<tr '.$bc[false].'>';
|
||||||
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="18"></td>';
|
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="14"></td>';
|
||||||
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@@ -2648,14 +2648,15 @@ function img_searchclear($titlealt = 'default', $other = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show information for admin users
|
* Show information for admin users or standard users
|
||||||
*
|
*
|
||||||
* @param string $text Text info
|
* @param string $text Text info
|
||||||
* @param integer $infoonimgalt Info is shown only on alt of star picto, otherwise it is show on output after the star picto
|
* @param integer $infoonimgalt Info is shown only on alt of star picto, otherwise it is show on output after the star picto
|
||||||
* @param int $nodiv No div
|
* @param int $nodiv No div
|
||||||
|
* @param int $admin 1=Info for admin users. 0=Info for standard users (change only the look)
|
||||||
* @return string String with info text
|
* @return string String with info text
|
||||||
*/
|
*/
|
||||||
function info_admin($text, $infoonimgalt = 0, $nodiv=0)
|
function info_admin($text, $infoonimgalt = 0, $nodiv=0, $admin=1)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@@ -2664,7 +2665,7 @@ function info_admin($text, $infoonimgalt = 0, $nodiv=0)
|
|||||||
return img_picto($text, 'info', 'class="hideonsmartphone"');
|
return img_picto($text, 'info', 'class="hideonsmartphone"');
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($nodiv?'':'<div class="info hideonsmartphone">').img_picto($langs->trans('InfoAdmin'), ($nodiv?'info':'info_black'), 'class="hideonsmartphone"').' '.$text.($nodiv?'':'</div>');
|
return ($nodiv?'':'<div class="'.($admin?'info':'').' hideonsmartphone">').img_picto($admin?$langs->trans('InfoAdmin'):$langs->trans('Note'), ($nodiv?'info':'info_black'), 'class="hideonsmartphone"').' '.$text.($nodiv?'':'</div>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -471,3 +471,7 @@ PDFCrevetteSituationInvoiceLine=Situation N°%s : Inv. N°%s on %s
|
|||||||
TotalSituationInvoice=Total situation
|
TotalSituationInvoice=Total situation
|
||||||
invoiceLineProgressError=Invoice line progress can't be egal or upper the next invoice line
|
invoiceLineProgressError=Invoice line progress can't be egal or upper the next invoice line
|
||||||
updatePriceNextInvoiceErrorUpdateline=Error : update price on invoice line : %s
|
updatePriceNextInvoiceErrorUpdateline=Error : update price on invoice line : %s
|
||||||
|
ToCreateARecurringInvoice=To create a recurring invoice for this contract, first create this draft invoice, then convert it into an invoice template and define the frequency for generation of future invoices.
|
||||||
|
ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually, just go on menu <strong>%s - %s - %s</strong>.
|
||||||
|
ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask you administrator to enable and setup module <strong>%s</strong>. Note that both method (manual and automatic) can be used together with no risk of duplication.
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ UserTitle=Titre civilité
|
|||||||
Surname=Surnom/Pseudo
|
Surname=Surnom/Pseudo
|
||||||
Address=Adresse
|
Address=Adresse
|
||||||
State=Département/Canton
|
State=Département/Canton
|
||||||
StateShort=Etat
|
StateShort=Département
|
||||||
Region=Région
|
Region=Région
|
||||||
Country=Pays
|
Country=Pays
|
||||||
CountryCode=Code pays
|
CountryCode=Code pays
|
||||||
|
|||||||
Reference in New Issue
Block a user