Click or drag to resize

IOBERONServiceGen2Stock_OrderReceived_Add Method

EXALOGIC
Vytvorí novú objednávku v evidencii 'Objednávky prijaté'. Nový doklad je možné vytvoriť aj s položkami, aktualizovať hlavičku dokladu je možné volaním Stock_OrderReceived_Update(OrderReceivedHeader), pričom na úpravu položiek je možné volať Stock_OrderReceived_Items_BatchUpdate(OrderReceivedItemsBatchUpdateArg).

Namespace: Exa.OBERON.ServicesGen2
Assembly: Exa.OBERON.ServicesGen2 (in Exa.OBERON.ServicesGen2.dll) Version: 4.5.0.0 (4.5.0.0)
Syntax
ResultValue<RecordBaseInfo> Stock_OrderReceived_Add(
	OrderReceivedAddArg orderReceivedAddArg
)

Parameters

orderReceivedAddArg  OrderReceivedAddArg
Obsahuje údaje novej objednávky (hlavičku), ako aj položky.

Return Value

ResultValueRecordBaseInfo
Vráti triedu RecordBaseInfo - obsahuje jednoznačný identifikátor vytvoreného záznamu, číslo dokladu a prípadné aj ďalšie info.
Remarks
V nasledovnom príklade je ukážka JSON štruktúry pre vytvorenie novej prijatej objednávky. Pri položke stačí zadať jednotkovú cenu za položku, prípadne celkovú cenu za položku.
Príklad vyvorenia prijatej objednávky zasielané údaje v JSON formáte.
{"orderReceivedAddArg":{{
  "OrderReceived": {    
    "RecordGUID": "e6ddf4f4-adc8-4193-92e1-967dbebec8c1",
    "BranchName": "",
    "BusinessPartner": {
      "Address": {
        "City": "Bratislava",       
        "Postal_Code": null,
        "Region": null,
        "Street": "Poštová 1",
      },
      "BranchName": null,
      "Email": null,
      "IdentificationNumber": null,
      "IdentificationNumberTax": null,
      "IdentificationNumberVat": null,
      "Name": "Ján novák, spol. s.r.o",
      "Person": null,
      "PhoneNumber": "0905/123456"
    },
    "DateDelivery": null,
    "DateReservation": null,
    "DateTimeEvidence": null,
    "DocumentType": "Objednávka",
    "Notice": null,
    "Number": "PP-240003",
    "NumberExternal": null,
    "OrderState": "Nová objednávka",
    "PersonOrdered": null,
    "PersonRegistered": null,
    "PriceValues": {
      "ExchangeRate": 0,
      "FCCode": "",    
      "PriceTotal": 1580,
      "PriceVATBaseLower": 1000,
      "PriceVATBaseUpper": 400,
      "PriceVATBaseZero": 0,
      "PriceVATLower": 100,
      "PriceVATUpper": 80,
      "VATRateLower": 10,
      "VATRateUpper": 20
    },    
    "ShippingInfo": null,
    "UserAdd": null,
    "UserLastUpdate": null,
    "Items": [
      {
        "Amount": 200,
        "AmountUnitOther": 0,
        "BarCode": null,
        "CashRegisterCode": null,
        "DateTime": null,
        "DiscountPercent": 0,       
        "IDNum_Stock": 2,
        "IDNum_StockCard": 298,
        "IDNum_StockCardVariant": 0,
        "Name": "Tyčinky",
        "Notice": null,
        "Number": "2310",
        "PriceWithVAT": 0,
        "PriceWithVATUnit": 2.4,
        "PriceWithVATWithoutDiscount": 0,
        "PriceWithVATWithoutDiscount_Unit": 0,
        "PriceWithoutVAT": 0,
        "PriceWithoutVATUnit": 0,
        "Unit": "ks",
        "UnitOther": null,
        "VariantName": "",
        "VatRate": 10,     
        "AmountReserved": null,       
      },
      {
        "Amount": 1000,
        "AmountUnitOther": 0,
        "BarCode": null,
        "CashRegisterCode": null,
        "DateTime": null,
        "DiscountPercent": 0,
        "IDNum": 0,
        "IDNum_Stock": 2,
        "IDNum_StockCard": 320,
        "IDNum_StockCardVariant": 0,
        "Name": "Žuvačky",
        "Notice": null,
        "Number": "2330",
        "PriceWithVAT": 0,
        "PriceWithVATUnit": 1.1,
        "PriceWithVATWithoutDiscount": 0,
        "PriceWithVATWithoutDiscount_Unit": 0,
        "PriceWithoutVAT": 0,
        "PriceWithoutVATUnit": 0,
        "Unit": "ks",
        "UnitOther": null,
        "VariantName": null,
        "VatRate": 10,       
        "AmountReserved": null,
      }
    ]
  }
}}
Example
Url: http://address:port/v1/stock/order-received/add
See Also