diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 2356184fb75..c48fc607f6d 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -951,16 +951,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetTextColor(0,0,60); $pdf->SetFillColor(255,255,255); - // Show sender name - $pdf->SetXY($posx+2,$posy+3); - $pdf->SetFont('','B',$default_font_size); - $pdf->MultiCell($widthrecbox-2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); - $posy=$pdf->getY(); - - // Show sender information - $pdf->SetXY($posx+2,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $pdf->MultiCell($widthrecbox-2, 4, $carac_emetteur, 0, 'L'); + // If RECEPTION contact defined, we use it @@ -985,6 +976,18 @@ class pdf_squille extends ModelePdfReception $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->thirdparty,(!empty($object->contact)?$object->contact:null),$usecontact,'targetwithdetails',$object); + // Show recipient name + $pdf->SetXY($posx+2,$posy+3); + $pdf->SetFont('','B', $default_font_size); + $pdf->MultiCell($widthrecbox-2, 4, $carac_client_name, 0, 'L'); + + $posy = $pdf->getY(); + + // Show recipient information + $pdf->SetFont('','', $default_font_size - 1); + $pdf->SetXY($posx+2,$posy); + $pdf->MultiCell($widthrecbox-2, 4, $carac_client, 0, 'L'); + // Show recipient $widthrecbox=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; if ($this->page_largeur < 210) $widthrecbox=84; // To work with US executive format @@ -999,17 +1002,18 @@ class pdf_squille extends ModelePdfReception $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient").":", 0, 'L'); $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); - // Show recipient name + + + // Show sender name $pdf->SetXY($posx+2,$posy+3); - $pdf->SetFont('','B', $default_font_size); - $pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, 'L'); + $pdf->SetFont('','B',$default_font_size); + $pdf->MultiCell($widthrecbox, 2, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); + $posy=$pdf->getY(); - $posy = $pdf->getY(); - - // Show recipient information - $pdf->SetFont('','', $default_font_size - 1); + // Show sender information $pdf->SetXY($posx+2,$posy); - $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L'); + $pdf->SetFont('','', $default_font_size - 1); + $pdf->MultiCell($widthrecbox, 4, $carac_emetteur, 0, 'L'); } $pdf->SetTextColor(0,0,0); diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 4e09fef4d43..42e95b95aab 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -62,6 +62,7 @@ class InterfaceActionsAuto extends DolibarrTriggers */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { + if (empty($conf->agenda->enabled)) return 0; // Module not active, we do nothing $key = 'MAIN_AGENDA_ACTIONAUTO_'.$action; @@ -401,6 +402,36 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->actionmsg=$langs->transnoentities("ShippingSentByEMail",$object->ref); } + // Parameters $object->sendtoid defined by caller + //$object->sendtoid=0; + } + elseif ($action == 'RECEPTION_VALIDATE') + { + $langs->load("agenda"); + $langs->load("other"); + $langs->load("receptions"); + + if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ReceptionValidated",($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg)) + { + $object->actionmsg=$langs->transnoentities("ReceptionValidated",($object->newref?$object->newref:$object->ref)); + } + + // Parameters $object->sendtoid defined by caller + //$object->sendtoid=0; + } + elseif ($action == 'RECEPTION_SENTBYMAIL') + { + $langs->load("agenda"); + $langs->load("other"); + $langs->load("receptions"); + + if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ReceptionSentByEMail",$object->ref); + if (empty($object->actionmsg)) + { + $object->actionmsg=$langs->transnoentities("ReceptionSentByEMail",$object->ref); + } + // Parameters $object->sendtoid defined by caller //$object->sendtoid=0; } diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 25a4202fcf2..01741c50682 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -832,7 +832,7 @@ if ($id > 0 || ! empty($ref)) { print ''; // Comment - print '
| '; - print $langs->trans('SendingMethod'); + print $langs->trans('ReceptionMethod'); print ' | '; if ($action != 'editshipping_method_id') print 'id.'">'.img_edit($langs->trans('SetReceptionMethod'),1).' | '; @@ -1690,6 +1672,8 @@ else if ($id || $ref) } // Product/Service print ''.$langs->trans("Products").' | '; + // Comment + print ''.$langs->trans("Comment").' | '; // Qty print ''.$langs->trans("QtyOrdered").' | '; if ($origin && $origin_id > 0) @@ -1869,6 +1853,16 @@ else if ($id || $ref) print_date_range($lines[$i]->date_start,$lines[$i]->date_end); print "\n"; } + + if ($action == 'editline' && $lines[$i]->id == $line_id) + { + print ''.$lines[$i]->comment.' | '; + } + else + { + print ''.$lines[$i]->comment.' | '; + } + // Qty ordered print ''.$lines[$i]->qty_asked.' | '; diff --git a/htdocs/reception/create-table.php b/htdocs/reception/create-table.php index f5c06a7f45f..0f71fb6938f 100644 --- a/htdocs/reception/create-table.php +++ b/htdocs/reception/create-table.php @@ -37,10 +37,14 @@ $error = 0; // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) $dir = DOL_DOCUMENT_ROOT."/install/mysql/tables/"; $sql='ALTER TABLE '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch ADD COLUMN fk_reception integer DEFAULT NULL;'; + + $db->query($sql); +$sql=" insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECEPTION_VALIDATE','Reception validated','Executed when a reception is validated','reception',22); + insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECEPTION_SENTBYMAIL','Reception sent by mail','Executed when a reception is sent by mail','reception',22);"; - +$db->query($sql);