Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
bdc80d22ea
@ -831,6 +831,13 @@ if (empty($reshook)) {
|
|||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
$result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
$result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||||
}
|
}
|
||||||
|
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('remiseforalllines', 'alpha') !== '' && $usercancreate) {
|
||||||
|
// Define vat_rate
|
||||||
|
$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
|
||||||
|
$remise_percent = str_replace('*', '', $remise_percent);
|
||||||
|
foreach ($object->lines as $line) {
|
||||||
|
$result = $object->updateline($line->id, $line->subprice, $line->qty, $remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||||
|
}
|
||||||
} elseif ($action == 'addline' && $usercancreate) { // Add line
|
} elseif ($action == 'addline' && $usercancreate) { // Add line
|
||||||
// Set if we used free entry or predefined product
|
// Set if we used free entry or predefined product
|
||||||
$predef = '';
|
$predef = '';
|
||||||
|
|||||||
@ -2097,7 +2097,7 @@ if ($resql) {
|
|||||||
// Note public
|
// Note public
|
||||||
if (!empty($arrayfields['p.note_public']['checked'])) {
|
if (!empty($arrayfields['p.note_public']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print dol_escape_htmltag($obj->note_public);
|
print dol_string_nohtmltag($obj->note_public);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
@ -2106,7 +2106,7 @@ if ($resql) {
|
|||||||
// Note private
|
// Note private
|
||||||
if (!empty($arrayfields['p.note_private']['checked'])) {
|
if (!empty($arrayfields['p.note_private']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print dol_escape_htmltag($obj->note_private);
|
print dol_string_nohtmltag($obj->note_private);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
|
|||||||
@ -628,6 +628,13 @@ if (empty($reshook)) {
|
|||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||||
}
|
}
|
||||||
|
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('remiseforalllines', 'alpha') !== '' && $usercancreate) {
|
||||||
|
// Define remise_percent
|
||||||
|
$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
|
||||||
|
$remise_percent = str_replace('*', '', $remise_percent);
|
||||||
|
foreach ($object->lines as $line) {
|
||||||
|
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||||
|
}
|
||||||
} elseif ($action == 'addline' && $usercancreate) { // Add a new line
|
} elseif ($action == 'addline' && $usercancreate) { // Add a new line
|
||||||
$langs->load('errors');
|
$langs->load('errors');
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
@ -1994,6 +1994,13 @@ if (empty($reshook)) {
|
|||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit, $line->multicurrency_subprice);
|
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit, $line->multicurrency_subprice);
|
||||||
}
|
}
|
||||||
|
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('remiseforalllines', 'alpha') !== '' && $usercancreate) {
|
||||||
|
// Define vat_rate
|
||||||
|
$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
|
||||||
|
$remise_percent = str_replace('*', '', $remise_percent);
|
||||||
|
foreach ($object->lines as $line) {
|
||||||
|
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit, $line->multicurrency_subprice);
|
||||||
|
}
|
||||||
} elseif ($action == 'addline' && $usercancreate) { // Add a new line
|
} elseif ($action == 'addline' && $usercancreate) { // Add a new line
|
||||||
$langs->load('errors');
|
$langs->load('errors');
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
@ -5221,11 +5221,11 @@ class Facture extends CommonInvoice
|
|||||||
if (!empty($recipient->email)) {
|
if (!empty($recipient->email)) {
|
||||||
$to = $recipient->email;
|
$to = $recipient->email;
|
||||||
} else {
|
} else {
|
||||||
$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->fk_soc.". No email defined for user.";
|
$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for user.";
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->fk_soc;
|
$errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->socid;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -327,28 +327,50 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||||||
// TODO Set subdir to be compatible with multi levels dir trees
|
// TODO Set subdir to be compatible with multi levels dir trees
|
||||||
// $subdir = get_exdir($objectobj->id, 2, 0, 0, $objectobj, $objectobj->element)
|
// $subdir = get_exdir($objectobj->id, 2, 0, 0, $objectobj, $objectobj->element)
|
||||||
$filedir = $uploaddir.'/'.$subdir.dol_sanitizeFileName($objectobj->ref);
|
$filedir = $uploaddir.'/'.$subdir.dol_sanitizeFileName($objectobj->ref);
|
||||||
$file = $filedir.'/'.$filename;
|
$filepath = $filedir.'/'.$filename;
|
||||||
|
|
||||||
// For supplier invoices, we use the file provided by supplier, not the one we generate
|
// For supplier invoices, we use the file provided by supplier, not the one we generate
|
||||||
if ($objectobj->element == 'invoice_supplier') {
|
if ($objectobj->element == 'invoice_supplier') {
|
||||||
$fileparams = dol_most_recent_file($uploaddir.'/'.get_exdir($objectobj->id, 2, 0, 0, $objectobj, $objectobj->element).$objectobj->ref, preg_quote($objectobj->ref, '/').'([^\-])+');
|
$fileparams = dol_most_recent_file($uploaddir.'/'.get_exdir($objectobj->id, 2, 0, 0, $objectobj, $objectobj->element).$objectobj->ref, preg_quote($objectobj->ref, '/').'([^\-])+');
|
||||||
$file = $fileparams['fullname'];
|
$filepath = $fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$mime = dol_mimetype($file);
|
// try to find other files generated for this object (last_main_doc)
|
||||||
|
$filename_found = '';
|
||||||
|
$filepath_found = '';
|
||||||
|
$file_check_list = array();
|
||||||
|
$file_check_list[] = array(
|
||||||
|
'name' => $filename,
|
||||||
|
'path' => $filepath,
|
||||||
|
);
|
||||||
|
if (!empty($conf->global->MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND) && !empty($objectobj->last_main_doc)) {
|
||||||
|
$file_check_list[] = array(
|
||||||
|
'name' => basename($objectobj->last_main_doc),
|
||||||
|
'path' => DOL_DATA_ROOT . '/' . $objectobj->last_main_doc,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
foreach ($file_check_list as $file_check_arr) {
|
||||||
|
if (dol_is_file($file_check_arr['path'])) {
|
||||||
|
$filename_found = $file_check_arr['name'];
|
||||||
|
$filepath_found = $file_check_arr['path'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dol_is_file($file)) {
|
if ($filepath_found) {
|
||||||
// Create form object
|
// Create form object
|
||||||
$attachedfilesThirdpartyObj[$thirdpartyid][$objectid] = array(
|
$attachedfilesThirdpartyObj[$thirdpartyid][$objectid] = array(
|
||||||
'paths'=>array($file),
|
'paths'=>array($filepath_found),
|
||||||
'names'=>array($filename),
|
'names'=>array($filename_found),
|
||||||
'mimes'=>array($mime)
|
'mimes'=>array(dol_mimetype($filepath_found))
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$nbignored++;
|
$nbignored++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$resaction .= '<div class="error">'.$langs->trans('ErrorCantReadFile', $file).'</div><br>';
|
foreach ($file_check_list as $file_check_arr) {
|
||||||
dol_syslog('Failed to read file: '.$file, LOG_WARNING);
|
$resaction .= '<div class="error">'.$langs->trans('ErrorCantReadFile', $file_check_arr['path']).'</div><br>';
|
||||||
|
dol_syslog('Failed to read file: '.$file_check_arr['path'], LOG_WARNING);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||||
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -986,6 +986,8 @@ class FormFile
|
|||||||
$out .= '<td class="right">';
|
$out .= '<td class="right">';
|
||||||
$out .= dol_print_date($file->datea, 'dayhour');
|
$out .= dol_print_date($file->datea, 'dayhour');
|
||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
|
// for share link of files
|
||||||
|
$out .= '<td></td>';
|
||||||
if ($delallowed || $printer || $morepicto) {
|
if ($delallowed || $printer || $morepicto) {
|
||||||
$out .= '<td></td>';
|
$out .= '<td></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -781,8 +781,12 @@ class FormMail extends Form
|
|||||||
} elseif ($this->withmaindocfile == -1) {
|
} elseif ($this->withmaindocfile == -1) {
|
||||||
$out .= '<input type="checkbox" id="addmaindocfile" name="addmaindocfile" value="1" checked="checked" />';
|
$out .= '<input type="checkbox" id="addmaindocfile" name="addmaindocfile" value="1" checked="checked" />';
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->global->MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND)) {
|
||||||
|
$out .= ' <label for="addmaindocfile">'.$langs->trans("JoinMainDocOrLastGenerated").'.</label><br>';
|
||||||
|
} else {
|
||||||
$out .= ' <label for="addmaindocfile">'.$langs->trans("JoinMainDoc").'.</label><br>';
|
$out .= ' <label for="addmaindocfile">'.$langs->trans("JoinMainDoc").'.</label><br>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (is_numeric($this->withfile)) {
|
if (is_numeric($this->withfile)) {
|
||||||
// TODO Trick to have param removedfile containing nb of file to delete. But this does not works without javascript
|
// TODO Trick to have param removedfile containing nb of file to delete. But this does not works without javascript
|
||||||
|
|||||||
@ -8990,6 +8990,9 @@ function printCommonFooter($zone = 'private')
|
|||||||
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
||||||
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'-1\']").prop(\'value\', \'\');'."\n";
|
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'-1\']").prop(\'value\', \'\');'."\n";
|
||||||
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'0\']").prop(\'value\', \'\');'."\n";
|
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'0\']").prop(\'value\', \'\');'."\n";
|
||||||
|
|
||||||
|
// Add 'field required' class on closest td for all input elements : input, textarea and select
|
||||||
|
print 'jQuery(":input[name=\'' . $paramkey . '\']").closest("tr").find("td:first").addClass("fieldrequired");' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,24 @@ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reduction short
|
// Reduction short
|
||||||
print '<td class="linecoldiscount right">'.$langs->trans('ReductionShort').'</td>';
|
print '<td class="linecoldiscount right">';
|
||||||
|
print $langs->trans('ReductionShort');
|
||||||
|
|
||||||
|
if (in_array($object->element, array('propal', 'commande', 'facture')) && $object->status == $object::STATUS_DRAFT) {
|
||||||
|
global $mysoc;
|
||||||
|
|
||||||
|
if (empty($disableedit)) {
|
||||||
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?mode=remiseforalllines&id='.$object->id.'">'.img_edit($langs->trans("UpdateForAllLines"), 0, 'class="clickvatforalllines opacitymedium paddingleft cursorpointer"').'</a>';
|
||||||
|
}
|
||||||
|
//print '<script>$(document).ready(function() { $(".clickremiseforalllines").click(function() { jQuery(".classremiseforalllines").toggle(); }); });</script>';
|
||||||
|
if (GETPOST('mode', 'aZ09') == 'remiseforalllines') {
|
||||||
|
print '<div class="remiseforalllines inline-block nowraponall">';
|
||||||
|
print '<input class="inline-block smallpaddingimp" name="remiseforalllines" value="0"> %';
|
||||||
|
print '<input class="inline-block button smallpaddingimp" type="submit" name="submitforalllines" value="'.$langs->trans("Update").'">';
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
// Fields for situation invoice
|
// Fields for situation invoice
|
||||||
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
-- Copyright (C) ---Put here your own copyright and developer email---
|
||||||
|
--
|
||||||
|
-- This program is free software: you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation, either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
|
||||||
|
-- BEGIN MODULEBUILDER INDEXES
|
||||||
|
ALTER TABLE llx_webhook_target ADD INDEX idx_webhook_target_rowid (rowid);
|
||||||
|
ALTER TABLE llx_webhook_target ADD INDEX idx_webhook_target_ref (ref);
|
||||||
|
ALTER TABLE llx_webhook_target ADD CONSTRAINT llx_webhook_target_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||||
|
ALTER TABLE llx_webhook_target ADD INDEX idx_webhook_target_status (status);
|
||||||
|
-- END MODULEBUILDER INDEXES
|
||||||
|
|
||||||
|
--ALTER TABLE llx_webhook_target ADD UNIQUE INDEX uk_webhook_target_fieldxy(fieldx, fieldy);
|
||||||
|
|
||||||
|
--ALTER TABLE llx_webhook_target ADD CONSTRAINT llx_webhook_target_fk_field FOREIGN KEY (fk_field) REFERENCES llx_webhook_myotherobject(rowid);
|
||||||
|
|
||||||
34
htdocs/install/mysql/tables/llx_webhook_target-webhook.sql
Normal file
34
htdocs/install/mysql/tables/llx_webhook_target-webhook.sql
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
-- Copyright (C) ---Put here your own copyright and developer email---
|
||||||
|
--
|
||||||
|
-- This program is free software: you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation, either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE llx_webhook_target(
|
||||||
|
-- BEGIN MODULEBUILDER FIELDS
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||||
|
ref varchar(128) NOT NULL,
|
||||||
|
label varchar(255),
|
||||||
|
description text,
|
||||||
|
note_public text,
|
||||||
|
note_private text,
|
||||||
|
date_creation datetime NOT NULL,
|
||||||
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
fk_user_creat integer NOT NULL,
|
||||||
|
fk_user_modif integer,
|
||||||
|
import_key varchar(14),
|
||||||
|
status integer DEFAULT 0 NOT NULL,
|
||||||
|
url varchar(255) NOT NULL,
|
||||||
|
trigger_codes text NOT NULL
|
||||||
|
-- END MODULEBUILDER FIELDS
|
||||||
|
) ENGINE=innodb;
|
||||||
@ -621,6 +621,7 @@ MonthVeryShort11=N
|
|||||||
MonthVeryShort12=D
|
MonthVeryShort12=D
|
||||||
AttachedFiles=Attached files and documents
|
AttachedFiles=Attached files and documents
|
||||||
JoinMainDoc=Join main document
|
JoinMainDoc=Join main document
|
||||||
|
JoinMainDocOrLastGenerated=Send the main document or the last generated one if not found
|
||||||
DateFormatYYYYMM=YYYY-MM
|
DateFormatYYYYMM=YYYY-MM
|
||||||
DateFormatYYYYMMDD=YYYY-MM-DD
|
DateFormatYYYYMMDD=YYYY-MM-DD
|
||||||
DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS
|
DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS
|
||||||
|
|||||||
@ -620,6 +620,7 @@ MonthVeryShort11=N
|
|||||||
MonthVeryShort12=D
|
MonthVeryShort12=D
|
||||||
AttachedFiles=Fichiers et documents joints
|
AttachedFiles=Fichiers et documents joints
|
||||||
JoinMainDoc=Joindre le document principal
|
JoinMainDoc=Joindre le document principal
|
||||||
|
JoinMainDocOrLastGenerated=Joindre le document principal ou le dernier généré s'il n'a pas été trouvé
|
||||||
DateFormatYYYYMM=YYYY-MM
|
DateFormatYYYYMM=YYYY-MM
|
||||||
DateFormatYYYYMMDD=YYYY-MM-DD
|
DateFormatYYYYMMDD=YYYY-MM-DD
|
||||||
DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS
|
DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS
|
||||||
|
|||||||
@ -264,7 +264,7 @@ if (empty($reshook) && $action == 'create_ticket' && GETPOST('save', 'alpha')) {
|
|||||||
$infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl').'<br><br>';
|
$infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl').'<br><br>';
|
||||||
|
|
||||||
$message .= $infos_new_ticket;
|
$message .= $infos_new_ticket;
|
||||||
$message .= getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE') ? getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE') : $langs->transnoentities('TicketMessageMailSignatureText', $mysoc->name);
|
$message .= getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE', $langs->transnoentities('TicketMessageMailSignatureText', $mysoc->name));
|
||||||
|
|
||||||
$sendto = GETPOST('email', 'alpha');
|
$sendto = GETPOST('email', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -361,6 +361,13 @@ function LoadProducts(position, issubcat) {
|
|||||||
$("#prodiv"+ishow).attr("class","wrapper2");
|
$("#prodiv"+ishow).attr("class","wrapper2");
|
||||||
$("#prowatermark"+ishow).hide();
|
$("#prowatermark"+ishow).hide();
|
||||||
ishow++; //Next product to show after print data product
|
ishow++; //Next product to show after print data product
|
||||||
|
<?php
|
||||||
|
// Add js from hooks
|
||||||
|
$parameters=array();
|
||||||
|
$parameters['caller'] = 'loadProducts';
|
||||||
|
$hookmanager->executeHooks('completeJSProductDisplay', $parameters);
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
?>
|
||||||
}
|
}
|
||||||
//console.log("Hide the prowatermark for ishow="+ishow);
|
//console.log("Hide the prowatermark for ishow="+ishow);
|
||||||
idata++; //Next data everytime
|
idata++; //Next data everytime
|
||||||
@ -627,6 +634,15 @@ function Search2(keyCodeForEnter, moreorless) {
|
|||||||
}
|
}
|
||||||
$("#prodiv" + i).data("rowid", data[i]['rowid']);
|
$("#prodiv" + i).data("rowid", data[i]['rowid']);
|
||||||
$("#prodiv" + i).data("iscat", 0);
|
$("#prodiv" + i).data("iscat", 0);
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Add js from hooks
|
||||||
|
$parameters=array();
|
||||||
|
$parameters['caller'] = 'search2';
|
||||||
|
$hookmanager->executeHooks('completeJSProductDisplay', $parameters);
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
?>
|
||||||
|
|
||||||
nbsearchresults++;
|
nbsearchresults++;
|
||||||
}
|
}
|
||||||
}).always(function (data) {
|
}).always(function (data) {
|
||||||
|
|||||||
@ -49,6 +49,8 @@ if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager->initHooks(array('takeposinvoice'));
|
||||||
|
|
||||||
global $mysoc;
|
global $mysoc;
|
||||||
|
|
||||||
@ -168,11 +170,6 @@ if ($invoice->socid > 0) {
|
|||||||
$soc->fetch(getDolGlobalString("$constforcompanyid"));
|
$soc->fetch(getDolGlobalString("$constforcompanyid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Change the currency of invoice if it was modified
|
// Change the currency of invoice if it was modified
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($_SESSION["takeposcustomercurrency"])) {
|
if (!empty($conf->multicurrency->enabled) && !empty($_SESSION["takeposcustomercurrency"])) {
|
||||||
if ($invoice->multicurrency_code != $_SESSION["takeposcustomercurrency"]) {
|
if ($invoice->multicurrency_code != $_SESSION["takeposcustomercurrency"]) {
|
||||||
@ -180,7 +177,15 @@ if (!empty($conf->multicurrency->enabled) && !empty($_SESSION["takeposcustomercu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
if (empty($reshook)) {
|
||||||
// Action to record a payment on a TakePOS invoice
|
// Action to record a payment on a TakePOS invoice
|
||||||
if ($action == 'valid' && $user->rights->facture->creer) {
|
if ($action == 'valid' && $user->rights->facture->creer) {
|
||||||
$bankaccount = 0;
|
$bankaccount = 0;
|
||||||
@ -902,7 +907,7 @@ if ($action == "valid" || $action == "history" || $action == 'creditnote') {
|
|||||||
$sectionwithinvoicelink .= '<script type="text/javascript">$("#buttonprint").click();</script>';
|
$sectionwithinvoicelink .= '<script type="text/javascript">$("#buttonprint").click();</script>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user