Merge pull request #857 from marcosgdf/task-823
New: [ task #823 ] Shipping_validate email notification
This commit is contained in:
commit
11023fa210
@ -50,6 +50,7 @@ For users:
|
|||||||
- New: [ task #770 ] Add ODT document generation for Projects module
|
- New: [ task #770 ] Add ODT document generation for Projects module
|
||||||
- New: [ task #741 ] Add intervention box
|
- New: [ task #741 ] Add intervention box
|
||||||
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated
|
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated
|
||||||
|
- New: [ task #823 ] Shipping_validate email notification
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -35,7 +36,8 @@ class InterfaceNotification
|
|||||||
'PROPAL_VALIDATE',
|
'PROPAL_VALIDATE',
|
||||||
'FICHINTER_VALIDATE',
|
'FICHINTER_VALIDATE',
|
||||||
'ORDER_SUPPLIER_APPROVE',
|
'ORDER_SUPPLIER_APPROVE',
|
||||||
'ORDER_SUPPLIER_REFUSE'
|
'ORDER_SUPPLIER_REFUSE',
|
||||||
|
'SHIPPING_VALIDATE'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -196,6 +198,19 @@ class InterfaceNotification
|
|||||||
$notify = new Notify($this->db);
|
$notify = new Notify($this->db);
|
||||||
$notify->send($action, $object->socid, $mesg, 'order_supplier', $object->id, $filepdf);
|
$notify->send($action, $object->socid, $mesg, 'order_supplier', $object->id, $filepdf);
|
||||||
}
|
}
|
||||||
|
elseif ($action == 'SHIPPING_VALIDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
|
||||||
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
|
$filepdf = $conf->expedition->dir_output . '/sending/' . $ref . '/' . $ref . '.pdf';
|
||||||
|
if (! file_exists($filepdf)) $filepdf='';
|
||||||
|
$mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated",$object->ref);
|
||||||
|
|
||||||
|
|
||||||
|
$notify = new Notify($this->db);
|
||||||
|
$notify->send($action, $object->socid, $mesg, 'expedition', $object->id, $filepdf);
|
||||||
|
}
|
||||||
|
|
||||||
// If not found
|
// If not found
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -974,7 +975,18 @@ else
|
|||||||
{
|
{
|
||||||
$numref = $object->ref;
|
$numref = $object->ref;
|
||||||
}
|
}
|
||||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$langs->trans("ConfirmValidateSending",$numref),'confirm_valid','',0,1);
|
|
||||||
|
$text = $langs->trans("ConfirmValidateSending",$numref);
|
||||||
|
|
||||||
|
if (! empty($conf->notification->enabled))
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||||
|
$notify=new Notify($db);
|
||||||
|
$text.='<br>';
|
||||||
|
$text.=$notify->confirmMessage('SHIPPING_VALIDATE',$object->socid);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -152,6 +152,7 @@ EMailTextOrderApproved=The order %s has been approved.
|
|||||||
EMailTextOrderApprovedBy=The order %s has been approved by %s.
|
EMailTextOrderApprovedBy=The order %s has been approved by %s.
|
||||||
EMailTextOrderRefused=The order %s has been refused.
|
EMailTextOrderRefused=The order %s has been refused.
|
||||||
EMailTextOrderRefusedBy=The order %s has been refused by %s.
|
EMailTextOrderRefusedBy=The order %s has been refused by %s.
|
||||||
|
EMailTextExpeditionValidated=The shipping %s has been validated.
|
||||||
ImportedWithSet=Importation data set
|
ImportedWithSet=Importation data set
|
||||||
DolibarrNotification=Automatic notification
|
DolibarrNotification=Automatic notification
|
||||||
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...
|
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...
|
||||||
|
|||||||
@ -151,6 +151,7 @@ EMailTextOrderApproved=Pedido %s aprobado
|
|||||||
EMailTextOrderApprovedBy=Pedido %s aprobado por %s
|
EMailTextOrderApprovedBy=Pedido %s aprobado por %s
|
||||||
EMailTextOrderRefused=Pedido %s rechazado
|
EMailTextOrderRefused=Pedido %s rechazado
|
||||||
EMailTextOrderRefusedBy=Pedido %s rechazado por %s
|
EMailTextOrderRefusedBy=Pedido %s rechazado por %s
|
||||||
|
EMailTextExpeditionValidated=El envío %s ha sido validado.
|
||||||
ImportedWithSet=Lote de importación (import key)
|
ImportedWithSet=Lote de importación (import key)
|
||||||
DolibarrNotification=Notificación automática
|
DolibarrNotification=Notificación automática
|
||||||
ResizeDesc=Introduzca el nuevo ancho <b>O</b> la nueva altura. La relación se conserva al cambiar el tamaño ...
|
ResizeDesc=Introduzca el nuevo ancho <b>O</b> la nueva altura. La relación se conserva al cambiar el tamaño ...
|
||||||
|
|||||||
@ -151,6 +151,7 @@ EMailTextOrderApproved=La commande %s a été approuvée.
|
|||||||
EMailTextOrderApprovedBy=La commande %s a été approuvée par %s.
|
EMailTextOrderApprovedBy=La commande %s a été approuvée par %s.
|
||||||
EMailTextOrderRefused=La commande %s a été refusée.
|
EMailTextOrderRefused=La commande %s a été refusée.
|
||||||
EMailTextOrderRefusedBy=La commande %s a été refusée par %s.
|
EMailTextOrderRefusedBy=La commande %s a été refusée par %s.
|
||||||
|
EMailTextExpeditionValidated=
|
||||||
ImportedWithSet=Lot d'importation (Import key)
|
ImportedWithSet=Lot d'importation (Import key)
|
||||||
DolibarrNotification=Notification automatique
|
DolibarrNotification=Notification automatique
|
||||||
ResizeDesc=Entrer la nouvelle largeur <b>OU</b> la nouvelle hauteur. Le ratio est conservé lors du redimensionnement...
|
ResizeDesc=Entrer la nouvelle largeur <b>OU</b> la nouvelle hauteur. Le ratio est conservé lors du redimensionnement...
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user