Пример #1
0
 protected function writeDatamatrix(Deposit $deposit, $path = null)
 {
     if (!$path) {
         $path = dirname($this->xlsFile) . '/' . $deposit->getNumber() . '.png';
     }
     $key = $this->getKey($deposit);
     if (!function_exists('getDataMatrix')) {
         require_once __DIR__ . '/Barcode.php';
     }
     $im = getDataMatrix($key);
     $objDrawing = new \PHPExcel_Worksheet_MemoryDrawing();
     $objDrawing->setName('DATAMATRIX');
     $objDrawing->setDescription('POST DATAMATRIX');
     $objDrawing->setImageResource($im);
     $objDrawing->setRenderingFunction(\PHPExcel_Worksheet_MemoryDrawing::RENDERING_PNG);
     $objDrawing->setMimeType(\PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_PNG);
     $objDrawing->setWorksheet($this->objExcel->getActiveSheet());
     $objDrawing->setCoordinates('BE18');
     $objDrawing->setHeight(140);
     $objDrawing->setWidth(140);
     $objDrawing->setResizeProportional(100);
     return $path;
 }
Пример #2
0
 protected function getKey(Deposit $deposit)
 {
     return sprintf('%s;%s;%s%s', $deposit->getSiteParams()->getEstablishment()->getS3CCode(), $deposit->getSiteParams()->getContractor()->getBilling()->getCOCLICO(), date("Y"), str_pad($deposit->getNumber(), 6, '0', STR_PAD_LEFT));
 }
Пример #3
0
 public function bindCustomList(ListInterface $envelopes)
 {
     $deposit = new Deposit($this);
     $deposit->bindList($envelopes);
     if ($this->mailDropInNumber) {
         $deposit->setMaildropInNumber();
     } else {
         $deposit->setMaildropInGinned();
     }
     $deposit->setPostageMethod($this->postageMethod);
     if (!isset($this->deposits['KUST'])) {
         $this->deposits['KUST'] = [];
     }
     $this->deposits['KUST'][] = $deposit;
 }