Up_DW.upload_loss_documents (eng) - datawizio/pythonAPI GitHub Wiki

Up_DW.upload_loss_documents - uploads write-offs.

Uploads information about write-offs.

Gets a list of objects in the format

        [
            {
                "document_id": <document_id>,
                "loss_type_id": <loss_type_id>,
                "document_date": <document_date>,
                "shop_id": <shop_id>,
                "stuff_id": <stuff_id>,
                "note": <note>,
                "products": {
                            "product_id":<product_id>,
                            "qty": <qty>,
                            "price": <price>,
                            "total_price": <total_price>
                         }
            }
            ...
        ]

or a path to the file *.csv

Parameters:

  • columns: list, default: ['document_id', 'loss_type_id', 'date', 'shop_id', 'stuff_id', 'note', 'product_id', 'qty', 'price', 'total_price'] Sorted list of columns in the table in the file *.csv.
  • splitter: str, default: ";"
    Splitter of data in the file *.csv.

Examples:

dwup = datawiz_upload.Up_DW()
dwup.upload_loss_documents('/home/user/loss_doc.csv')
⚠️ **GitHub.com Fallback** ⚠️