コード例 #1
0
 /**
  * @return array
  */
 public function prepare()
 {
     $data = ['payment_type' => $this->paymentType, 'date' => $this->date->format('d.m.Y'), 'mark_prepaid' => DataFormat::formatBool($this->markPrepaid)];
     if ($this->amount) {
         $data['amount'] = $this->amount;
     }
     return $data;
 }
コード例 #2
0
ファイル: ItemRequest.php プロジェクト: smartilabs/metakocka
 /**
  * @return array
  */
 public function prepare()
 {
     $data = ['count_code' => $this->countCode, 'code' => $this->code, 'name' => $this->name, 'name_desc' => $this->nameDesc, 'unit' => $this->unit, 'service' => DataFormat::formatBool($this->service), 'sales' => DataFormat::formatBool($this->sales), 'purchasing' => DataFormat::formatBool($this->purchasing), 'height' => $this->height, 'width' => $this->width, 'depth' => $this->depth, 'weight' => $this->weight, 'amount' => $this->amount, 'price' => $this->price, 'discount' => $this->discount, 'tax' => $this->tax];
     if ($this->mkId) {
         $data['mk_id'] = $this->mkId;
     }
     return $data;
 }
コード例 #3
0
 /**
  * @return array
  */
 public function prepare()
 {
     $data = ['business_entity' => DataFormat::formatBool($this->businessEntity), 'taxpayer' => DataFormat::formatBool($this->taxpayer), 'foreign_county' => DataFormat::formatBool($this->foreignCountry), 'tax_id_number' => $this->taxIdNumber, 'customer' => $this->customer, 'street' => $this->street, 'post_number' => $this->postNumber, 'place' => $this->place, 'country' => $this->country];
     if ($this->partnerContact) {
         $data['partner_contact'] = $this->partnerContact->prepare();
     }
     if ($this->partnerDeliveryAddress) {
         $data['partner_delivery_address'] = $this->partnerDeliveryAddress->prepare();
     }
     return $data;
 }
コード例 #4
0
ファイル: BillRequest.php プロジェクト: smartilabs/metakocka
 /**
  * @return array
  */
 public function prepare()
 {
     $data = ['foreign' => DataFormat::formatBool($this->foreign), 'bill_date' => $this->billDate->format('d.m.Y'), 'payment_date' => $this->paymentDate->format('d.m.Y'), 'buyer_order' => $this->buyerOrder, 'partner' => $this->partner->prepare(), 'send_to_furs' => DataFormat::formatBool($this->sendToFurs)];
     // only add if set, else leave empty and MK automatic ID will be set
     if (!empty($this->countCode)) {
         $data['count_code'] = $this->countCode;
     }
     // MK automatic if not set
     if (!empty($this->locationOfService)) {
         $data['location_of_service'] = $this->locationOfService;
     }
     $payments = $this->preparePayments();
     if (!empty($payments)) {
         $data['mark_paid'] = $this->preparePayments();
     }
     $products = $this->prepareProducts();
     if (!empty($products)) {
         $data['product_list'] = $this->prepareProducts();
     }
     return $data;
 }
コード例 #5
0
 /**
  * @return array
  */
 public function prepare()
 {
     $data = ['count_code' => $this->countCode, 'country' => $this->country, 'locale' => $this->locale, 'hide_code' => DataFormat::formatBool($this->hideCode)];
     return $data;
 }
コード例 #6
0
ファイル: ListRequest.php プロジェクト: smartilabs/metakocka
 /**
  * @return array
  */
 public function prepare()
 {
     return ['sales' => DataFormat::formatBool($this->sales), 'return_warehause_stock' => DataFormat::formatBool($this->returnWarehauseStock), 'limit' => $this->limit, 'offset' => $this->offset];
 }