Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8600d8d00d
@ -205,16 +205,16 @@ print '<td>'.$langs->trans("Description").'</td>';
|
|||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Login/Pass required for members
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
|
|
||||||
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED) ? 0 : 1), 1);
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
// Mail required for members
|
// Mail required for members
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
|
||||||
print $form->selectyesno('ADHERENT_MAIL_REQUIRED', (!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? $conf->global->ADHERENT_MAIL_REQUIRED : 0), 1);
|
print $form->selectyesno('ADHERENT_MAIL_REQUIRED', (!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? $conf->global->ADHERENT_MAIL_REQUIRED : 0), 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
// Login/Pass required for members
|
||||||
|
print '<tr class="oddeven"><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
|
||||||
|
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED) ? 0 : 1), 1);
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Send mail information is on by default
|
// Send mail information is on by default
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
|
||||||
print $form->selectyesno('ADHERENT_DEFAULT_SENDINFOBYMAIL', (!empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? $conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL : 0), 1);
|
print $form->selectyesno('ADHERENT_DEFAULT_SENDINFOBYMAIL', (!empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? $conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL : 0), 1);
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
public function __isAllowed()
|
public function __isAllowed()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $db;
|
global $conf, $db, $user;
|
||||||
|
|
||||||
$login = '';
|
$login = '';
|
||||||
$stored_key = '';
|
$stored_key = '';
|
||||||
@ -150,6 +150,9 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
$fuser->getrights();
|
$fuser->getrights();
|
||||||
static::$user = $fuser;
|
static::$user = $fuser;
|
||||||
|
|
||||||
|
// Set the global variable $user to the $user of API
|
||||||
|
$user = $fuser;
|
||||||
|
|
||||||
if ($fuser->socid) {
|
if ($fuser->socid) {
|
||||||
static::$role = 'external';
|
static::$role = 'external';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -717,6 +717,8 @@ class Orders extends DolibarrApi
|
|||||||
throw new RestException(404, 'Order not found');
|
throw new RestException(404, 'Order not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result = $this->commande->fetch_thirdparty(); // do not check result, as failure is not fatal (used only for mail notification substitutes)
|
||||||
|
|
||||||
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
@ -729,13 +731,6 @@ class Orders extends DolibarrApi
|
|||||||
throw new RestException(500, 'Error when validating Order: '.$this->commande->error);
|
throw new RestException(500, 'Error when validating Order: '.$this->commande->error);
|
||||||
}
|
}
|
||||||
$result = $this->commande->fetch($id);
|
$result = $this->commande->fetch($id);
|
||||||
if (!$result) {
|
|
||||||
throw new RestException(404, 'Order not found');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->commande->fetchObjectLinked();
|
$this->commande->fetchObjectLinked();
|
||||||
|
|
||||||
|
|||||||
@ -834,7 +834,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If some payments were already done, we change the amount to pay using same prorate
|
// If some payments were already done, we change the amount to pay using same prorate
|
||||||
if (!empty($conf->global->INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED)) {
|
if (!empty($conf->global->INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) && $object->type == Facture::TYPE_CREDIT_NOTE) {
|
||||||
$alreadypaid = $object->getSommePaiement(); // This can be not 0 if we allow to create credit to reuse from credit notes partially refunded.
|
$alreadypaid = $object->getSommePaiement(); // This can be not 0 if we allow to create credit to reuse from credit notes partially refunded.
|
||||||
if ($alreadypaid && abs($alreadypaid) < abs($object->total_ttc)) {
|
if ($alreadypaid && abs($alreadypaid) < abs($object->total_ttc)) {
|
||||||
$ratio = abs(($object->total_ttc - $alreadypaid) / $object->total_ttc);
|
$ratio = abs(($object->total_ttc - $alreadypaid) / $object->total_ttc);
|
||||||
|
|||||||
@ -212,6 +212,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
if (!is_object($object->thirdparty)) {
|
if (!is_object($object->thirdparty)) {
|
||||||
$object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
|
$object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->emetteur = $object->thirdparty;
|
$this->emetteur = $object->thirdparty;
|
||||||
if (!$this->emetteur->country_code) {
|
if (!$this->emetteur->country_code) {
|
||||||
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
|
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
|
||||||
@ -231,8 +232,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$nblines = count($object->lines);
|
$nblines = count($object->lines);
|
||||||
|
|
||||||
if ($conf->fournisseur->facture->dir_output) {
|
if ($conf->fournisseur->facture->dir_output) {
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
$deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
$amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
$amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
$amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
$amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
|
|||||||
@ -538,7 +538,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If some payments were already done, we change the amount to pay using same prorate
|
// If some payments were already done, we change the amount to pay using same prorate
|
||||||
if (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED)) {
|
if (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) && $object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||||
$alreadypaid = $object->getSommePaiement(); // This can be not 0 if we allow to create credit to reuse from credit notes partially refunded.
|
$alreadypaid = $object->getSommePaiement(); // This can be not 0 if we allow to create credit to reuse from credit notes partially refunded.
|
||||||
if ($alreadypaid && abs($alreadypaid) < abs($object->total_ttc)) {
|
if ($alreadypaid && abs($alreadypaid) < abs($object->total_ttc)) {
|
||||||
$ratio = abs(($object->total_ttc - $alreadypaid) / $object->total_ttc);
|
$ratio = abs(($object->total_ttc - $alreadypaid) / $object->total_ttc);
|
||||||
|
|||||||
@ -86,7 +86,7 @@ insert into llx_const (name, value, type, note, visible) values ('MAIN_DELAY_EXP
|
|||||||
-- Mail Mailing
|
-- Mail Mailing
|
||||||
--
|
--
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_FIX_FOR_BUGGED_MTA','1','chaine','Set constant to fix email ending from PHP with some linux ike system',1);
|
insert into llx_const (name, value, type, note, visible) values ('MAIN_FIX_FOR_BUGGED_MTA','1','chaine','Set constant to fix email ending from PHP with some linux ike system',1);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAILING_EMAIL_FROM','dolibarr@domain.com','chaine','EMail emmetteur pour les envois d emailings',0);
|
insert into llx_const (name, value, type, note, visible) values ('MAILING_EMAIL_FROM','no-reply@mydomain.com','chaine','EMail emmetteur pour les envois d emailings',0);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -103,3 +103,9 @@ insert into llx_const (name, value, type, visible, entity) VALUES ('USER_ADDON_P
|
|||||||
--
|
--
|
||||||
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
|
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Membership
|
||||||
|
--
|
||||||
|
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('ADHERENT_LOGIN_NOT_REQUIRED', 0, '1', 'string', 0);
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ MenuMembersValidated=Validated members
|
|||||||
MenuMembersExcluded=Excluded members
|
MenuMembersExcluded=Excluded members
|
||||||
MenuMembersResiliated=Terminated members
|
MenuMembersResiliated=Terminated members
|
||||||
MembersWithSubscriptionToReceive=Members with contribution to receive
|
MembersWithSubscriptionToReceive=Members with contribution to receive
|
||||||
MembersWithSubscriptionToReceiveShort=Membership contribution to receive
|
MembersWithSubscriptionToReceiveShort=Contributions to receive
|
||||||
DateSubscription=Date of membership
|
DateSubscription=Date of membership
|
||||||
DateEndSubscription=End date of membership
|
DateEndSubscription=End date of membership
|
||||||
EndSubscription=End of membership
|
EndSubscription=End of membership
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user