Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/admin/emailcollector_card.php
This commit is contained in:
commit
740105ae08
@ -50,6 +50,9 @@ jobs:
|
|||||||
- if: type = push AND branch = develop
|
- if: type = push AND branch = develop
|
||||||
php: nightly
|
php: nightly
|
||||||
env: DB=mysql
|
env: DB=mysql
|
||||||
|
- if: type = push AND branch = 13.0
|
||||||
|
php: nightly
|
||||||
|
env: DB=mysql
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|||||||
@ -135,12 +135,13 @@ if ($action == 'deletefilter')
|
|||||||
{
|
{
|
||||||
$emailcollectorfilter = new EmailCollectorFilter($db);
|
$emailcollectorfilter = new EmailCollectorFilter($db);
|
||||||
$emailcollectorfilter->fetch(GETPOST('filterid', 'int'));
|
$emailcollectorfilter->fetch(GETPOST('filterid', 'int'));
|
||||||
$result = $emailcollectorfilter->delete($user);
|
if ($emailcollectorfilter->id > 0) {
|
||||||
if ($result > 0)
|
$result = $emailcollectorfilter->delete($user);
|
||||||
{
|
if ($result > 0) {
|
||||||
$object->fetchFilters();
|
$object->fetchFilters();
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors');
|
setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +154,11 @@ if (GETPOST('addoperation', 'alpha'))
|
|||||||
$emailcollectoroperation->status = 1;
|
$emailcollectoroperation->status = 1;
|
||||||
$emailcollectoroperation->position = 50;
|
$emailcollectoroperation->position = 50;
|
||||||
|
|
||||||
|
if ($emailcollectoroperation->type == '-1') {
|
||||||
|
$error++;
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Operation")), null, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($emailcollectoroperation->type, array('loadthirdparty', 'loadandcreatethirdparty'))
|
if (in_array($emailcollectoroperation->type, array('loadthirdparty', 'loadandcreatethirdparty'))
|
||||||
&& empty($emailcollectoroperation->actionparam)) {
|
&& empty($emailcollectoroperation->actionparam)) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -200,12 +206,13 @@ if ($action == 'deleteoperation')
|
|||||||
{
|
{
|
||||||
$emailcollectoroperation = new EmailCollectorAction($db);
|
$emailcollectoroperation = new EmailCollectorAction($db);
|
||||||
$emailcollectoroperation->fetch(GETPOST('operationid', 'int'));
|
$emailcollectoroperation->fetch(GETPOST('operationid', 'int'));
|
||||||
$result = $emailcollectoroperation->delete($user);
|
if ($emailcollectoroperation->id > 0) {
|
||||||
if ($result > 0)
|
$result = $emailcollectoroperation->delete($user);
|
||||||
{
|
if ($result > 0) {
|
||||||
$object->fetchActions();
|
$object->fetchActions();
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
|
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3159,8 +3159,8 @@ class Commande extends CommonOrder
|
|||||||
$this->line->tva_tx = $txtva;
|
$this->line->tva_tx = $txtva;
|
||||||
$this->line->localtax1_tx = $txlocaltax1;
|
$this->line->localtax1_tx = $txlocaltax1;
|
||||||
$this->line->localtax2_tx = $txlocaltax2;
|
$this->line->localtax2_tx = $txlocaltax2;
|
||||||
$this->line->localtax1_type = $localtaxes_type[0];
|
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$this->line->localtax2_type = $localtaxes_type[2];
|
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
$this->line->remise_percent = $remise_percent;
|
$this->line->remise_percent = $remise_percent;
|
||||||
$this->line->subprice = $subprice;
|
$this->line->subprice = $subprice;
|
||||||
$this->line->info_bits = $info_bits;
|
$this->line->info_bits = $info_bits;
|
||||||
|
|||||||
@ -3136,8 +3136,8 @@ class Facture extends CommonInvoice
|
|||||||
$this->line->tva_tx = $txtva;
|
$this->line->tva_tx = $txtva;
|
||||||
$this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0);
|
$this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0);
|
||||||
$this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0);
|
$this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0);
|
||||||
$this->line->localtax1_type = isset($localtaxes_type[0]) ? $localtaxes_type[0] : '';
|
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$this->line->localtax2_type = isset($localtaxes_type[2]) ? $localtaxes_type[2] : '';
|
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
|
|
||||||
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
||||||
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ttc) : $total_ttc); // For credit note and if qty is negative, total is negative
|
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ttc) : $total_ttc); // For credit note and if qty is negative, total is negative
|
||||||
@ -3375,8 +3375,8 @@ class Facture extends CommonInvoice
|
|||||||
$this->line->tva_tx = $txtva;
|
$this->line->tva_tx = $txtva;
|
||||||
$this->line->localtax1_tx = $txlocaltax1;
|
$this->line->localtax1_tx = $txlocaltax1;
|
||||||
$this->line->localtax2_tx = $txlocaltax2;
|
$this->line->localtax2_tx = $txlocaltax2;
|
||||||
$this->line->localtax1_type = $localtaxes_type[0];
|
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$this->line->localtax2_type = $localtaxes_type[2];
|
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
|
|
||||||
$this->line->remise_percent = $remise_percent;
|
$this->line->remise_percent = $remise_percent;
|
||||||
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
|
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class EmailCollector extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png
|
* @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'generic';
|
public $picto = 'email';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Field with ID of parent key if this field has a parent
|
* @var string Field with ID of parent key if this field has a parent
|
||||||
|
|||||||
@ -1714,8 +1714,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$multicurrency_total_ttc = $tabprice[18];
|
$multicurrency_total_ttc = $tabprice[18];
|
||||||
$pu_ht_devise = $tabprice[19];
|
$pu_ht_devise = $tabprice[19];
|
||||||
|
|
||||||
$localtax1_type = $localtaxes_type[0];
|
$localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$localtax2_type = $localtaxes_type[2];
|
$localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
|
|
||||||
$rangmax = $this->line_max();
|
$rangmax = $this->line_max();
|
||||||
$rang = $rangmax + 1;
|
$rang = $rangmax + 1;
|
||||||
@ -1734,8 +1734,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->line->tva_tx = $txtva;
|
$this->line->tva_tx = $txtva;
|
||||||
$this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0);
|
$this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0);
|
||||||
$this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0);
|
$this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0);
|
||||||
$this->line->localtax1_type = $localtaxes_type[0];
|
$this->line->localtax1_type = $localtax1_type;
|
||||||
$this->line->localtax2_type = $localtaxes_type[2];
|
$this->line->localtax2_type = $localtax2_type;
|
||||||
$this->line->fk_product = $fk_product;
|
$this->line->fk_product = $fk_product;
|
||||||
$this->line->product_type = $product_type;
|
$this->line->product_type = $product_type;
|
||||||
$this->line->remise_percent = $remise_percent;
|
$this->line->remise_percent = $remise_percent;
|
||||||
@ -2594,8 +2594,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$multicurrency_total_ttc = $tabprice[18];
|
$multicurrency_total_ttc = $tabprice[18];
|
||||||
$pu_ht_devise = $tabprice[19];
|
$pu_ht_devise = $tabprice[19];
|
||||||
|
|
||||||
$localtax1_type = $localtaxes_type[0];
|
$localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$localtax2_type = $localtaxes_type[2];
|
$localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
|
|
||||||
//Fetch current line from the database and then clone the object and set it in $oldline property
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$this->line = new CommandeFournisseurLigne($this->db);
|
$this->line = new CommandeFournisseurLigne($this->db);
|
||||||
@ -2633,8 +2633,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->line->tva_tx = $txtva;
|
$this->line->tva_tx = $txtva;
|
||||||
$this->line->localtax1_tx = $txlocaltax1;
|
$this->line->localtax1_tx = $txlocaltax1;
|
||||||
$this->line->localtax2_tx = $txlocaltax2;
|
$this->line->localtax2_tx = $txlocaltax2;
|
||||||
$this->line->localtax1_type = $localtaxes_type[0];
|
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$this->line->localtax2_type = $localtaxes_type[2];
|
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
$this->line->remise_percent = $remise_percent;
|
$this->line->remise_percent = $remise_percent;
|
||||||
$this->line->subprice = $pu_ht;
|
$this->line->subprice = $pu_ht;
|
||||||
$this->line->rang = $this->rang;
|
$this->line->rang = $this->rang;
|
||||||
|
|||||||
@ -1765,8 +1765,8 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$this->line->tva_tx = $txtva;
|
$this->line->tva_tx = $txtva;
|
||||||
$this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0);
|
$this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0);
|
||||||
$this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0);
|
$this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0);
|
||||||
$this->line->localtax1_type = $localtaxes_type[0];
|
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$this->line->localtax2_type = $localtaxes_type[2];
|
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
|
|
||||||
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
||||||
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva);
|
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva);
|
||||||
@ -1952,8 +1952,8 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$line->tva_tx = $vatrate;
|
$line->tva_tx = $vatrate;
|
||||||
$line->localtax1_tx = $txlocaltax1;
|
$line->localtax1_tx = $txlocaltax1;
|
||||||
$line->localtax2_tx = $txlocaltax2;
|
$line->localtax2_tx = $txlocaltax2;
|
||||||
$line->localtax1_type = $localtaxes_type[0];
|
$line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||||
$line->localtax2_type = $localtaxes_type[2];
|
$line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||||
$line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht);
|
$line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht);
|
||||||
$line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva);
|
$line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva);
|
||||||
$line->total_localtax1 = $total_localtax1;
|
$line->total_localtax1 = $total_localtax1;
|
||||||
|
|||||||
@ -1989,8 +1989,8 @@ EmailcollectorOperationsDesc=Operations are executed from top to bottom order
|
|||||||
MaxEmailCollectPerCollect=Max number of emails collected per collect
|
MaxEmailCollectPerCollect=Max number of emails collected per collect
|
||||||
CollectNow=Collect now
|
CollectNow=Collect now
|
||||||
ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ?
|
ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ?
|
||||||
DateLastCollectResult=Date latest collect tried
|
DateLastCollectResult=Date of latest collect try
|
||||||
DateLastcollectResultOk=Date latest collect successfull
|
DateLastcollectResultOk=Date of latest collect success
|
||||||
LastResult=Latest result
|
LastResult=Latest result
|
||||||
EmailCollectorConfirmCollectTitle=Email collect confirmation
|
EmailCollectorConfirmCollectTitle=Email collect confirmation
|
||||||
EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ?
|
EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ?
|
||||||
|
|||||||
@ -417,7 +417,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
|
|||||||
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
|
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'POST' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST' ||
|
||||||
((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) ||
|
((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) ||
|
||||||
in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_reject_check')))
|
in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_reject_check')))
|
||||||
{
|
{
|
||||||
if (!GETPOSTISSET('token')) {
|
if (!GETPOSTISSET('token')) {
|
||||||
if (GETPOST('uploadform', 'int')) {
|
if (GETPOST('uploadform', 'int')) {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if ($object->fetch($id) < 1) {
|
|||||||
if ($cancel) $action = '';
|
if ($cancel) $action = '';
|
||||||
|
|
||||||
if ($action) {
|
if ($action) {
|
||||||
if ($action == 'edit') {
|
if ($action == 'update') {
|
||||||
$object->ref = $ref;
|
$object->ref = $ref;
|
||||||
$object->label = $label;
|
$object->label = $label;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ if ($action) {
|
|||||||
header('Location: '.dol_buildpath('/variants/card.php?id='.$id, 2));
|
header('Location: '.dol_buildpath('/variants/card.php?id='.$id, 2));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} elseif ($action == 'update') {
|
} elseif ($action == 'update_value') {
|
||||||
if ($objectval->fetch($valueid) > 0) {
|
if ($objectval->fetch($valueid) > 0) {
|
||||||
$objectval->ref = $ref;
|
$objectval->ref = $ref;
|
||||||
$objectval->value = GETPOST('value', 'alpha');
|
$objectval->value = GETPOST('value', 'alpha');
|
||||||
@ -139,7 +139,12 @@ $h++;
|
|||||||
print dol_get_fiche_head($head, 'variant', $langs->trans('ProductAttributeName'), -1, 'generic');
|
print dol_get_fiche_head($head, 'variant', $langs->trans('ProductAttributeName'), -1, 'generic');
|
||||||
|
|
||||||
if ($action == 'edit') {
|
if ($action == 'edit') {
|
||||||
print '<form method="POST">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
|
print '<input type="hidden" name="valueid" value="'.$valueid.'">';
|
||||||
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -232,7 +237,7 @@ if ($action == 'edit') {
|
|||||||
if ($action == 'edit_value') {
|
if ($action == 'edit_value') {
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update_value">';
|
||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
print '<input type="hidden" name="valueid" value="'.$valueid.'">';
|
print '<input type="hidden" name="valueid" value="'.$valueid.'">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user