Generalize fix: file with a specific mask not found, again
This commit is contained in:
parent
c75ce97960
commit
a5e66ab7ba
@ -1107,7 +1107,7 @@ else if ($action == 'update_extras')
|
|||||||
// Fill array 'array_options' with data from update form
|
// Fill array 'array_options' with data from update form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label('propal');
|
$extralabels=$extrafields->fetch_name_optionals_label('propal');
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('propaldao'));
|
$hookmanager->initHooks(array('propaldao'));
|
||||||
@ -1125,7 +1125,7 @@ else if ($action == 'update_extras')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer)
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer)
|
||||||
@ -1350,13 +1350,13 @@ if ($action == 'create')
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
|
|
||||||
// Show separator only
|
// Show separator only
|
||||||
if ($extrafields->attribute_type[$key] == 'separate')
|
if ($extrafields->attribute_type[$key] == 'separate')
|
||||||
{
|
{
|
||||||
print $extrafields->showSeparator($key);
|
print $extrafields->showSeparator($key);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
@ -1840,7 +1840,7 @@ else
|
|||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($action == 'edit_extras')
|
if ($action == 'edit_extras')
|
||||||
{
|
{
|
||||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
||||||
@ -1848,8 +1848,8 @@ else
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
@ -1862,13 +1862,13 @@ else
|
|||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
print '>'.$label.'</td><td colspan="3">';
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
|
|
||||||
// Convert date into timestamp format
|
// Convert date into timestamp format
|
||||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
@ -1880,19 +1880,19 @@ else
|
|||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($extrafields->attribute_label) > 0) {
|
if(count($extrafields->attribute_label) > 0) {
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
print '<tr><td></td><td>';
|
print '<tr><td></td><td>';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($object->statut == 0 && $user->rights->propal->creer)
|
if ($object->statut == 0 && $user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
||||||
}
|
}
|
||||||
@ -2182,7 +2182,7 @@ else
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -2205,7 +2205,7 @@ else
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2236,12 +2236,12 @@ else
|
|||||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||||
$formmail->substit['__PERSONALIZED__']='';
|
$formmail->substit['__PERSONALIZED__']='';
|
||||||
$formmail->substit['__CONTACTCIVNAME__']='';
|
$formmail->substit['__CONTACTCIVNAME__']='';
|
||||||
|
|
||||||
//Find the good contact adress
|
//Find the good contact adress
|
||||||
$custcontact='';
|
$custcontact='';
|
||||||
$contactarr=array();
|
$contactarr=array();
|
||||||
$contactarr=$object->liste_contact(-1,'external');
|
$contactarr=$object->liste_contact(-1,'external');
|
||||||
|
|
||||||
if (is_array($contactarr) && count($contactarr)>0) {
|
if (is_array($contactarr) && count($contactarr)>0) {
|
||||||
foreach($contactarr as $contact) {
|
foreach($contactarr as $contact) {
|
||||||
if ($contact['libelle']==$langs->trans('TypeContact_propal_external_CUSTOMER')) {
|
if ($contact['libelle']==$langs->trans('TypeContact_propal_external_CUSTOMER')) {
|
||||||
@ -2250,19 +2250,19 @@ else
|
|||||||
$custcontact=$contactstatic->getFullName($langs,1);
|
$custcontact=$contactstatic->getFullName($langs,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($custcontact)) {
|
if (!empty($custcontact)) {
|
||||||
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tableau des parametres complementaires
|
// Tableau des parametres complementaires
|
||||||
$formmail->param['action']='send';
|
$formmail->param['action']='send';
|
||||||
$formmail->param['models']='propal_send';
|
$formmail->param['models']='propal_send';
|
||||||
$formmail->param['id']=$object->id;
|
$formmail->param['id']=$object->id;
|
||||||
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
|
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
|
||||||
|
|
||||||
|
|
||||||
// Init list of files
|
// Init list of files
|
||||||
if (GETPOST("mode")=='init')
|
if (GETPOST("mode")=='init')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2390,7 +2390,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -2413,7 +2413,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2443,11 +2443,11 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||||
$formmail->substit['__PERSONALIZED__']='';
|
$formmail->substit['__PERSONALIZED__']='';
|
||||||
$formmail->substit['__CONTACTCIVNAME__']='';
|
$formmail->substit['__CONTACTCIVNAME__']='';
|
||||||
|
|
||||||
$custcontact='';
|
$custcontact='';
|
||||||
$contactarr=array();
|
$contactarr=array();
|
||||||
$contactarr=$object->liste_contact(-1,'external');
|
$contactarr=$object->liste_contact(-1,'external');
|
||||||
|
|
||||||
if (is_array($contactarr) && count($contactarr)>0) {
|
if (is_array($contactarr) && count($contactarr)>0) {
|
||||||
foreach($contactarr as $contact) {
|
foreach($contactarr as $contact) {
|
||||||
if ($contact['libelle']==$langs->trans('TypeContact_commande_external_CUSTOMER')) {
|
if ($contact['libelle']==$langs->trans('TypeContact_commande_external_CUSTOMER')) {
|
||||||
@ -2456,12 +2456,12 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
$custcontact=$contactstatic->getFullName($langs,1);
|
$custcontact=$contactstatic->getFullName($langs,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($custcontact)) {
|
if (!empty($custcontact)) {
|
||||||
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tableau des parametres complementaires
|
// Tableau des parametres complementaires
|
||||||
$formmail->param['action']='send';
|
$formmail->param['action']='send';
|
||||||
$formmail->param['models']='order_send';
|
$formmail->param['models']='order_send';
|
||||||
|
|||||||
@ -3138,7 +3138,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
@ -3511,7 +3511,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -3534,7 +3534,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3563,31 +3563,31 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$formmail->substit['__FACREF__']=$object->ref;
|
$formmail->substit['__FACREF__']=$object->ref;
|
||||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||||
$formmail->substit['__PERSONALIZED__']='';
|
$formmail->substit['__PERSONALIZED__']='';
|
||||||
$formmail->substit['__CONTACTCIVNAME__']='';
|
$formmail->substit['__CONTACTCIVNAME__']='';
|
||||||
|
|
||||||
//Find the good contact adress
|
//Find the good contact adress
|
||||||
$custcontact='';
|
$custcontact='';
|
||||||
$contactarr=array();
|
$contactarr=array();
|
||||||
$contactarr=$object->liste_contact(-1,'external');
|
$contactarr=$object->liste_contact(-1,'external');
|
||||||
|
|
||||||
if (is_array($contactarr) && count($contactarr)>0) {
|
if (is_array($contactarr) && count($contactarr)>0) {
|
||||||
foreach($contactarr as $contact) {
|
foreach($contactarr as $contact) {
|
||||||
if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) {
|
if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) {
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||||
|
|
||||||
$contactstatic=new Contact($db);
|
$contactstatic=new Contact($db);
|
||||||
$contactstatic->fetch($contact['id']);
|
$contactstatic->fetch($contact['id']);
|
||||||
$custcontact=$contactstatic->getFullName($langs,1);
|
$custcontact=$contactstatic->getFullName($langs,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($custcontact)) {
|
if (!empty($custcontact)) {
|
||||||
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Tableau des parametres complementaires du post
|
// Tableau des parametres complementaires du post
|
||||||
$formmail->param['action']=$action;
|
$formmail->param['action']=$action;
|
||||||
$formmail->param['models']=$modelmail;
|
$formmail->param['models']=$modelmail;
|
||||||
|
|||||||
@ -1405,7 +1405,7 @@ else
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -1428,7 +1428,7 @@ else
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1458,7 +1458,7 @@ else
|
|||||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||||
$formmail->substit['__PERSONALIZED__']='';
|
$formmail->substit['__PERSONALIZED__']='';
|
||||||
$formmail->substit['__CONTACTCIVNAME__']='';
|
$formmail->substit['__CONTACTCIVNAME__']='';
|
||||||
|
|
||||||
//Find the good contact adress
|
//Find the good contact adress
|
||||||
//Find the good contact adress
|
//Find the good contact adress
|
||||||
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) {
|
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) {
|
||||||
@ -1475,22 +1475,22 @@ else
|
|||||||
|
|
||||||
if (is_array($contactarr) && count($contactarr)>0) {
|
if (is_array($contactarr) && count($contactarr)>0) {
|
||||||
foreach($contactarr as $contact) {
|
foreach($contactarr as $contact) {
|
||||||
|
|
||||||
if ($contact['libelle']==$langs->trans('TypeContact_commande_external_CUSTOMER')) {
|
if ($contact['libelle']==$langs->trans('TypeContact_commande_external_CUSTOMER')) {
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||||
|
|
||||||
$contactstatic=new Contact($db);
|
$contactstatic=new Contact($db);
|
||||||
$contactstatic->fetch($contact['id']);
|
$contactstatic->fetch($contact['id']);
|
||||||
$custcontact=$contactstatic->getFullName($langs,1);
|
$custcontact=$contactstatic->getFullName($langs,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($custcontact)) {
|
if (!empty($custcontact)) {
|
||||||
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tableau des parametres complementaires
|
// Tableau des parametres complementaires
|
||||||
$formmail->param['action']='send';
|
$formmail->param['action']='send';
|
||||||
$formmail->param['models']='shipping_send';
|
$formmail->param['models']='shipping_send';
|
||||||
|
|||||||
@ -1068,7 +1068,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$numref = $object->ref;
|
$numref = $object->ref;
|
||||||
}
|
}
|
||||||
$text=$langs->trans('ConfirmValidateIntervention',$numref);
|
$text=$langs->trans('ConfirmValidateIntervention',$numref);
|
||||||
|
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
@ -1465,7 +1465,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -1488,7 +1488,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1519,12 +1519,12 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||||
$formmail->substit['__PERSONALIZED__']='';
|
$formmail->substit['__PERSONALIZED__']='';
|
||||||
$formmail->substit['__CONTACTCIVNAME__']='';
|
$formmail->substit['__CONTACTCIVNAME__']='';
|
||||||
|
|
||||||
//Find the good contact adress
|
//Find the good contact adress
|
||||||
$custcontact='';
|
$custcontact='';
|
||||||
$contactarr=array();
|
$contactarr=array();
|
||||||
$contactarr=$object->liste_contact(-1,'external');
|
$contactarr=$object->liste_contact(-1,'external');
|
||||||
|
|
||||||
if (is_array($contactarr) && count($contactarr)>0) {
|
if (is_array($contactarr) && count($contactarr)>0) {
|
||||||
foreach($contactarr as $contact) {
|
foreach($contactarr as $contact) {
|
||||||
if ($contact['libelle']==$langs->trans('TypeContact_fichinter_external_CUSTOMER')) {
|
if ($contact['libelle']==$langs->trans('TypeContact_fichinter_external_CUSTOMER')) {
|
||||||
@ -1534,12 +1534,12 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$custcontact=$contactstatic->getFullName($langs,1);
|
$custcontact=$contactstatic->getFullName($langs,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($custcontact)) {
|
if (!empty($custcontact)) {
|
||||||
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tableau des parametres complementaires
|
// Tableau des parametres complementaires
|
||||||
$formmail->param['action']='send';
|
$formmail->param['action']='send';
|
||||||
$formmail->param['models']='fichinter_send';
|
$formmail->param['models']='fichinter_send';
|
||||||
|
|||||||
@ -1855,7 +1855,7 @@ elseif (! empty($object->id))
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -1878,7 +1878,7 @@ elseif (! empty($object->id))
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2071,7 +2071,7 @@ else
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -2094,7 +2094,7 @@ else
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($object->ref,'/'));
|
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($ref,'/'));
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user