|
|
@@ -448,7 +448,7 @@ class BBus extends DolibarrApi
|
|
|
if ($server_host == $conf->global->LOCAL_SERVER_HOST) {
|
|
|
ApiBbusLog::appLog("dateHandler: local");
|
|
|
ApiBbusLog::appLog("dateHandler: {$datetime_timestamp}");
|
|
|
- $this->localDateHandler($ref, $datetime, $datetime_timestamp, $now);
|
|
|
+ $this->localDateHandler($ref, $datetime, $datetime_timestamp, $now, $type_id);
|
|
|
} else {
|
|
|
ApiBbusLog::appLog("dateHandler: curl");
|
|
|
$this->curlDateHandler($ref, $datetime, $type_id);
|
|
|
@@ -467,7 +467,7 @@ class BBus extends DolibarrApi
|
|
|
$helper = new ApiBBusHelper();
|
|
|
$facture_id = $helper->getFactureIdForInvoicePrinting($ref);
|
|
|
if (empty($facture_id)) {
|
|
|
- ApiBbusLog::appLog("localDateHandler: facture_id because cross-shopping");
|
|
|
+ ApiBbusLog::appLog("localDateHandler: no facture_id because cross-shopping");
|
|
|
$printedCopies = $this->checkPrintedCopiesWithRef($ref);
|
|
|
} else {
|
|
|
$printedCopies = $this->checkPrintedCopies($facture_id);
|
|
|
@@ -489,10 +489,11 @@ class BBus extends DolibarrApi
|
|
|
$helper->setPrintingInvoiceObject($user, $facture_id, $datetime, $datetime_timestamp, $ticket, $ref);
|
|
|
}
|
|
|
} else {
|
|
|
+ ApiBbusLog::appLog("printedCopies: MULTIPRINT");
|
|
|
if (empty($facture_id)) {
|
|
|
$ticketIds = $helper->getTicketIdsForCrossShopping($ref);
|
|
|
} else {
|
|
|
- $ticketIds = $helper->getTicketIdsByFactureId($facture_id);
|
|
|
+ $ticketIds = $helper->getTicketIdsByFactureId($facture_id, $ref);
|
|
|
}
|
|
|
$ticketObj = new stdClass();
|
|
|
foreach ($ticketIds as $key => $value) {
|