Finish work
This commit is contained in:
parent
8a24f2fc91
commit
4705a87548
@ -456,7 +456,7 @@ if (empty($reshook))
|
|||||||
// CONTENT
|
// CONTENT
|
||||||
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
||||||
$dateRefusEx = explode(" ",$object->date_refuse);
|
$dateRefusEx = explode(" ",$object->date_refuse);
|
||||||
$message = $langs->transnoentities("ExpenseReportWaitingForReApprovalMessage", $dateRefusEx[0], $object->detail_refuse, $expediteur->getFullName($langs), $langs), $link);
|
$message = $langs->transnoentities("ExpenseReportWaitingForReApprovalMessage", $dateRefusEx[0], $object->detail_refuse, $expediteur->getFullName($langs), $link);
|
||||||
|
|
||||||
// Rebuild pdf
|
// Rebuild pdf
|
||||||
/*
|
/*
|
||||||
@ -567,11 +567,11 @@ if (empty($reshook))
|
|||||||
$emailFrom = $expediteur->email;
|
$emailFrom = $expediteur->email;
|
||||||
|
|
||||||
// SUBJECT
|
// SUBJECT
|
||||||
$subject = $langs->transnoentities("ExpenseReportApproval");
|
$subject = $langs->transnoentities("ExpenseReportApproved");
|
||||||
|
|
||||||
// CONTENT
|
// CONTENT
|
||||||
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
||||||
$message = $langs->transnoentities("ExpenseReportApprovalMessage", $destinataire->getFullName($langs), $object->ref, $expediteur->getFullName($langs), '', $langs), $link);
|
$message = $langs->transnoentities("ExpenseReportApprovedMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $link);
|
||||||
|
|
||||||
// Rebuilt pdf
|
// Rebuilt pdf
|
||||||
/*
|
/*
|
||||||
@ -634,7 +634,6 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user->rights->expensereport->approve)
|
if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user->rights->expensereport->approve)
|
||||||
{
|
{
|
||||||
@ -678,15 +677,26 @@ if (empty($reshook))
|
|||||||
$emailFrom = $expediteur->email;
|
$emailFrom = $expediteur->email;
|
||||||
|
|
||||||
// SUBJECT
|
// SUBJECT
|
||||||
$subject = "' ERP - Note de frais refusée";
|
$subject = $langs->transnoentities("ExpenseReportRefused");
|
||||||
|
|
||||||
// CONTENT
|
// CONTENT
|
||||||
$message = "Bonjour {$destinataire->firstname},\n\n";
|
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
||||||
$message.= "Votre note de frais \"{$object->ref}\" vient d'être refusée.\n";
|
$message = $langs->transnoentities("ExpenseReportRefusedMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $_POST['detail_refuse'], $link);
|
||||||
$message.= "- Refuseur : {$expediteur->firstname} {$expediteur->lastname}\n";
|
|
||||||
$message.= "- Motif de refus : {$_POST['detail_refuse']}\n";
|
// Rebuilt pdf
|
||||||
$message.= "- Lien : {$dolibarr_main_url_root}/expensereport/card.php?id={$object->id}\n\n";
|
/*
|
||||||
$message.= "Bien cordialement,\n' SI";
|
$object->setDocModel($user,"");
|
||||||
|
$resultPDF = expensereport_pdf_create($db,$object,'',"",$langs);
|
||||||
|
|
||||||
|
if($resultPDF
|
||||||
|
{
|
||||||
|
// ATTACHMENT
|
||||||
|
$filename=array(); $filedir=array(); $mimetype=array();
|
||||||
|
array_push($filename,dol_sanitizeFileName($object->ref).".pdf");
|
||||||
|
array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf");
|
||||||
|
array_push($mimetype,"application/pdf");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// PREPARE SEND
|
// PREPARE SEND
|
||||||
$mailfile = new CMailFile($subject,$emailTo,$emailFrom,$message,$filedir,$mimetype,$filename);
|
$mailfile = new CMailFile($subject,$emailTo,$emailFrom,$message,$filedir,$mimetype,$filename);
|
||||||
@ -780,15 +790,26 @@ if (empty($reshook))
|
|||||||
$emailFrom = $expediteur->email;
|
$emailFrom = $expediteur->email;
|
||||||
|
|
||||||
// SUBJECT
|
// SUBJECT
|
||||||
$subject = "' ERP - Note de frais annulée";
|
$subject = $langs->transnoentities("ExpenseReportCanceled");
|
||||||
|
|
||||||
// CONTENT
|
// CONTENT
|
||||||
$message = "Bonjour {$destinataire->firstname},\n\n";
|
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
||||||
$message.= "Votre note de frais \"{$object->ref}\" vient d'être annulée.\n";
|
$message = $langs->transnoentities("ExpenseReportCanceledMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $_POST['detail_cancel'], $link);
|
||||||
$message.= "- Annuleur : {$expediteur->firstname} {$expediteur->lastname}\n";
|
|
||||||
$message.= "- Motif d'annulation : {$_POST['detail_cancel']}\n";
|
// Rebuilt pdf
|
||||||
$message.= "- Lien : {$dolibarr_main_url_root}/expensereport/card.php?id={$object->id}\n\n";
|
/*
|
||||||
$message.= "Bien cordialement,\n' SI";
|
$object->setDocModel($user,"");
|
||||||
|
$resultPDF = expensereport_pdf_create($db,$object,'',"",$langs);
|
||||||
|
|
||||||
|
if($resultPDF
|
||||||
|
{
|
||||||
|
// ATTACHMENT
|
||||||
|
$filename=array(); $filedir=array(); $mimetype=array();
|
||||||
|
array_push($filename,dol_sanitizeFileName($object->ref).".pdf");
|
||||||
|
array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf");
|
||||||
|
array_push($mimetype,"application/pdf");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// PREPARE SEND
|
// PREPARE SEND
|
||||||
$mailfile = new CMailFile($subject,$emailTo,$emailFrom,$message,$filedir,$mimetype,$filename);
|
$mailfile = new CMailFile($subject,$emailTo,$emailFrom,$message,$filedir,$mimetype,$filename);
|
||||||
@ -924,7 +945,11 @@ if (empty($reshook))
|
|||||||
$emailFrom = $expediteur->email;
|
$emailFrom = $expediteur->email;
|
||||||
|
|
||||||
// SUBJECT
|
// SUBJECT
|
||||||
$subject = "'ERP - Note de frais payée";
|
$subject = $langs->transnoentities("ExpenseReportPaid");
|
||||||
|
|
||||||
|
// CONTENT
|
||||||
|
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
||||||
|
$message = $langs->transnoentities("ExpenseReportPaidMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $link);
|
||||||
|
|
||||||
// CONTENT
|
// CONTENT
|
||||||
$message = "Bonjour {$destinataire->firstname},\n\n";
|
$message = "Bonjour {$destinataire->firstname},\n\n";
|
||||||
|
|||||||
@ -24,6 +24,14 @@ ExpenseReportWaitingForApproval=A new expense report has been submitted for appr
|
|||||||
ExpenseReportWaitingForApprovalMessage=A new expense report has been submitted and is waiting for approval.\n - User: %s\n - Period: %s\nClick here to validate: %s
|
ExpenseReportWaitingForApprovalMessage=A new expense report has been submitted and is waiting for approval.\n - User: %s\n - Period: %s\nClick here to validate: %s
|
||||||
ExpenseReportWaitingForReApproval=An expense report has been submitted for re-approval
|
ExpenseReportWaitingForReApproval=An expense report has been submitted for re-approval
|
||||||
ExpenseReportWaitingForReApprovalMessage=An expense report has been submitted and is waiting for re-approval.\nThe %s, you refused to approve the expense report for this reason: %s.\nA new version has been proposed and waiting for your approval.\n - User: %s\n - Period: %s\nClick here to validate: %s
|
ExpenseReportWaitingForReApprovalMessage=An expense report has been submitted and is waiting for re-approval.\nThe %s, you refused to approve the expense report for this reason: %s.\nA new version has been proposed and waiting for your approval.\n - User: %s\n - Period: %s\nClick here to validate: %s
|
||||||
|
ExpenseReportApproved=An expense report was approved
|
||||||
|
ExpenseReportApprovedMessage=The expense report %s was approved.\n - User: %s\n - Approved by: %s\nClick here to show the expense report: %s
|
||||||
|
ExpenseReportRefused=An expense report was refused
|
||||||
|
ExpenseReportRefusedMessage=The expense report %s was refused.\n - User: %s\n - Refused by: %s\n - Motive for refusal: %s\nClick here to show the expense report: %s
|
||||||
|
ExpenseReportCanceled=An expense report was canceled
|
||||||
|
ExpenseReportCanceledMessage=The expense report %s was canceled.\n - User: %s\n - Canceled by: %s\n - Motive for cancellation: %s\nClick here to show the expense report: %s
|
||||||
|
ExpenseReportPaid=An expense report was paid
|
||||||
|
ExpenseReportPaidMessage=The expense report %s was paid.\n - User: %s\n - Paid by: %s\nClick here to show the expense report: %s
|
||||||
TripId=Id expense report
|
TripId=Id expense report
|
||||||
AnyOtherInThisListCanValidate=Person to inform for validation.
|
AnyOtherInThisListCanValidate=Person to inform for validation.
|
||||||
TripSociete=Information company
|
TripSociete=Information company
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user