Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9

This commit is contained in:
Laurent Destailleur 2016-02-22 13:28:18 +01:00
commit 762ab060e4
3 changed files with 15 additions and 2 deletions

View File

@ -201,6 +201,7 @@ if ($what == 'mysql')
while (!feof($handlein))
{
$read = fgets($handlein);
if (preg_match('/'.preg_quote('Warning: Using a password').'/i', $read)) continue;
fwrite($handle,$read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;

View File

@ -881,8 +881,8 @@ class pdf_crabe extends ModelePDFFactures
$this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured");
}
// Avoid having any valid PDF with setup that is not complete
elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER))
|| ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER)))
elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))
|| ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)))
{
$outputlangs->load("errors");

View File

@ -2761,6 +2761,18 @@ elseif (! empty($object->id))
}
}
// Ship
if (! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER))
{
if (in_array($object->statut, array(3,4))) {
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->receptionner) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/fourn/commande/dispatch.php?id=' . $object->id . '">' . $langs->trans('OrderDispatch') . '</a></div>';
} else {
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('OrderDispatch') . '</a></div>';
}
}
}
// Create bill
if (! empty($conf->facture->enabled))
{