2
0
forked from Wavyzz/dolibarr

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

Conflicts:
	htdocs/adherents/admin/adherent.php
	htdocs/admin/barcode.php
	htdocs/fourn/class/fournisseur.facture.class.php
	htdocs/langs/en_US/admin.lang
This commit is contained in:
Laurent Destailleur
2019-03-09 01:20:13 +01:00
6 changed files with 23 additions and 12 deletions

View File

@@ -183,6 +183,10 @@ if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! emp
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice"); if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
print '<td>'; print '<td>';
print $form->selectarray('ADHERENT_BANK_USE', $arraychoices, $conf->global->ADHERENT_BANK_USE, 0); print $form->selectarray('ADHERENT_BANK_USE', $arraychoices, $conf->global->ADHERENT_BANK_USE, 0);
if ($conf->global->ADHERENT_BANK_USE == 'bankdirect' || $conf->global->ADHERENT_BANK_USE == 'bankviainvoice')
{
print '<br><div style="padding-top: 5px;"><span class="opacitymedium">'.$langs->trans("ABankAccountMustBeDefinedOnPaymentModeSetup").'</span></div>';
}
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";

View File

@@ -44,7 +44,12 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'setbarcodeproducton') if ($action == 'setbarcodeproducton')
{ {
$res=dolibarr_set_const($db, "BARCODE_PRODUCT_ADDON_NUM", GETPOST('value'), 'chaine', 0, '', $conf->entity); $barcodenumberingmodule = GETPOST('value', 'alpha');
$res=dolibarr_set_const($db, "BARCODE_PRODUCT_ADDON_NUM", $barcodenumberingmodule, 'chaine', 0, '', $conf->entity);
if ($barcodenumberingmodule == 'mod_barcode_product_standard' && empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK))
{
$res=dolibarr_set_const($db, "BARCODE_STANDARD_PRODUCT_MASK", '020{000000000}', 'chaine', 0, '', $conf->entity);
}
} }
elseif ($action == 'setbarcodeproductoff') elseif ($action == 'setbarcodeproductoff')
{ {
@@ -406,13 +411,13 @@ if ($conf->produit->enabled)
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
{ {
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">'; print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">';
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>'; print '</a></td>';
} }
else else
{ {
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">'; print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">';
print img_picto($langs->trans("Disabled"), 'switch_off'); print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>'; print '</a></td>';
} }

View File

@@ -913,6 +913,7 @@ class Contrat extends CommonObject
$sql.= ", ".(!empty($this->ref_ext)?("'".$this->db->escape($this->ref_ext)."'"):"NULL"); $sql.= ", ".(!empty($this->ref_ext)?("'".$this->db->escape($this->ref_ext)."'"):"NULL");
$sql.= ")"; $sql.= ")";
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
$error=0; $error=0;
@@ -930,8 +931,8 @@ class Contrat extends CommonObject
{ {
$modCodeContract = new $module(); $modCodeContract = new $module();
if (!empty($modCodeContract->code_auto)) { if (! empty($modCodeContract->code_auto)) {
// Update ref // Force the ref to a draft value if numbering module is an automatic numbering
$sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id;
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
@@ -940,9 +941,6 @@ class Contrat extends CommonObject
$this->ref="(PROV".$this->id.")"; $this->ref="(PROV".$this->id.")";
} }
} }
} else {
$error++;
$this->error='Failed to get PROV number';
} }
} }

View File

@@ -95,8 +95,11 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
$tooltip=$langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode")); $tooltip=$langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode"));
$tooltip.=$langs->trans("GenericMaskCodes3"); $tooltip.=$langs->trans("GenericMaskCodes3");
$tooltip.=$langs->trans("GenericMaskCodes4c"); $tooltip.='<strong>'.$langs->trans("Example").':</strong><br>';
$tooltip.=$langs->trans("GenericMaskCodes5"); $tooltip.='020{000000000} (for internal use)<br>';
$tooltip.='9771234{00000} (example of ISSN code with prefix 1234)<br>';
$tooltip.='9791234{00000} (example of ISMN code with prefix 1234)<br>';
//$tooltip.=$langs->trans("GenericMaskCodes5");
// Mask parameter // Mask parameter
//$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):</td>'; //$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):</td>';

View File

@@ -1858,3 +1858,4 @@ MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person
MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links. MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links.
ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s' ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s'
DefaultCustomerType=Default thirdparty type for "New customer" creation form DefaultCustomerType=Default thirdparty type for "New customer" creation form
ABankAccountMustBeDefinedOnPaymentModeSetup=Note: The bank account must be defined on the module of each payment mode (Paypal, Stripe, ...) to have this feature working.

View File

@@ -436,7 +436,7 @@ $listofreferent=array(
'table'=>'projet_task', 'table'=>'projet_task',
'datefieldname'=>'task_date', 'datefieldname'=>'task_date',
'disableamount'=>0, 'disableamount'=>0,
'urlnew'=>DOL_URL_ROOT.'/projet/tasks.php?id='.$id, 'urlnew'=>DOL_URL_ROOT.'/projet/tasks/time.php?id='.$id,
'buttonnew'=>'AddTimeSpent', 'buttonnew'=>'AddTimeSpent',
'testnew'=>$user->rights->projet->creer, 'testnew'=>$user->rights->projet->creer,
'test'=>($conf->projet->enabled && $user->rights->projet->lire && empty($conf->global->PROJECT_HIDE_TASKS))), 'test'=>($conf->projet->enabled && $user->rights->projet->lire && empty($conf->global->PROJECT_HIDE_TASKS))),