Add link on dolibarr on convertion
This commit is contained in:
@@ -29,7 +29,7 @@ class OfferController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$services=$em->getRepository("App:Service")->findAllOfferActive($this->get('session')->get('activeproject'),$this->get('session')->get('activeoffer'),$this->get('session')->get('idservice'));
|
||||
|
||||
|
||||
if($request->query->get('fgprint')) {
|
||||
$render = $this->renderView($this->render.'list.html.twig',[
|
||||
"services" => $services,
|
||||
@@ -111,7 +111,10 @@ class OfferController extends AbstractController
|
||||
|
||||
// Sur validation
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
|
||||
$data = $form->getData();
|
||||
$data->setIddolibarr($order["id"]);
|
||||
$data->setTypedolibarr($type);
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
||||
@@ -215,7 +218,6 @@ class OfferController extends AbstractController
|
||||
$this->get('session')->set('activeoffer',!$this->get('session')->get('activeoffer'));
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
public function getorders(){
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$orders = $this->dolibarrapi->getOrders();
|
||||
|
@@ -60,10 +60,15 @@ class Offer
|
||||
private $active;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="iddolibarr", type="decimal", scale=2)
|
||||
* @ORM\Column(name="iddolibarr", type="decimal", scale=5, nullable=true)
|
||||
*
|
||||
*/
|
||||
private $iddolibarr;
|
||||
/**
|
||||
* @ORM\Column(name="typedolibarr", type="string", nullable=true)
|
||||
*
|
||||
*/
|
||||
private $typedolibarr;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Project", inversedBy="offers")
|
||||
@@ -151,17 +156,6 @@ class Offer
|
||||
|
||||
return $this;
|
||||
}
|
||||
public function getIdDolibarr(): ?string
|
||||
{
|
||||
return $this->iddolibarr;
|
||||
}
|
||||
|
||||
public function setIdDolibarr(string $iddolibarr): self
|
||||
{
|
||||
$this->iddolibarr = $iddolibarr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
public function getProject(): ?Project
|
||||
{
|
||||
return $this->project;
|
||||
@@ -174,5 +168,29 @@ class Offer
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIddolibarr(): ?string
|
||||
{
|
||||
return $this->iddolibarr;
|
||||
}
|
||||
|
||||
public function setIddolibarr(?string $iddolibarr): self
|
||||
{
|
||||
$this->iddolibarr = $iddolibarr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTypedolibarr(): ?string
|
||||
{
|
||||
return $this->typedolibarr;
|
||||
}
|
||||
|
||||
public function setTypedolibarr(?string $typedolibarr): self
|
||||
{
|
||||
$this->typedolibarr = $typedolibarr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user