forked from Wavyzz/dolibarr
Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -4013,7 +4013,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
// Send by mail
|
||||
if (($object->statut == 1 || $object->statut == 2) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if (($object->statut == Facture::STATUS_VALIDATED || $object->statut == Facture::STATUS_CLOSED) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($objectidnext) {
|
||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendByMail') . '</span></div>';
|
||||
} else {
|
||||
@@ -4024,21 +4024,27 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
// deprecated. Useless because now we can use templates
|
||||
if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility
|
||||
// Request a direct debit order
|
||||
if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0)
|
||||
{
|
||||
if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) {
|
||||
if ($objectidnext) {
|
||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendRemindByMail') . '</span></div>';
|
||||
} else {
|
||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=prerelance&mode=init">' . $langs->trans('SendRemindByMail') . '</a></div>';
|
||||
} else
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">' . $langs->trans('SendRemindByMail') . '</a></div>';
|
||||
}
|
||||
}
|
||||
if ($resteapayer > 0)
|
||||
{
|
||||
if ($user->rights->prelevement->bons->creer)
|
||||
{
|
||||
$langs->load("withdrawals");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MakeWithdrawRequest")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
//print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AmountMustBePositive")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Create payment
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) {
|
||||
if ($objectidnext) {
|
||||
|
||||
@@ -414,7 +414,7 @@ if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
|
||||
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
|
||||
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
||||
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
||||
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
|
||||
if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_vat, 1);
|
||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||
if ($search_status != '' && $search_status >= 0)
|
||||
{
|
||||
|
||||
@@ -124,24 +124,16 @@ if ($nb < 0 || $nb1 < 0 || $nb11 < 0)
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfInvoiceToWithdraw").'</td>';
|
||||
print '<td align="right">';
|
||||
print '<td>';
|
||||
print $nb;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("AmountToWithdraw").'</td>';
|
||||
print '<td align="right">';
|
||||
print '<td>';
|
||||
print price($pricetowithdraw);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
//print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdraw").' + '.$langs->trans("ThirdPartyBankCode").'='.$conf->global->PRELEVEMENT_CODE_BANQUE.'</td><td align="right">';
|
||||
//print $nb1;
|
||||
//print '</td></tr>';
|
||||
|
||||
//print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdrawWithInfo").'</td><td align="right">';
|
||||
//print $nb11;
|
||||
//print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
@@ -158,8 +150,6 @@ else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NoInvoiceToWithdraw")).'">'.$langs->trans("CreateAll")."</a>\n";
|
||||
}
|
||||
//if ($nb11) print '<a class="butAction" href="create.php?action=create&banque=1">'.$langs->trans("CreateBanque")."</a>\n";
|
||||
//if ($nb1) print '<a class="butAction" href="create.php?action=create&banque=1&guichet=1">'.$langs->trans("CreateGuichet")."</a>\n";
|
||||
|
||||
print "</div>\n";
|
||||
print '<br>';
|
||||
@@ -247,7 +237,7 @@ else
|
||||
|
||||
|
||||
/*
|
||||
* List of last withdraws
|
||||
* List of latest withdraws
|
||||
*/
|
||||
$limit=5;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user