Skip to content

stok düzenleme #31

@arwivi1903

Description

@arwivi1903

Sanırım Masa Kapatma kodları burada. ben buraya veya başka bir alan da stoktan düşme işlemi yapmak istiyorum. products tablosuna adet diye alan ekledim. table.php de satılan ürünler ekleyince ve masa kapanınca stoktan düşme işlemini nasıl yapabilirim.

public function closeTableOrder($tableId,$userID)
{
if ($orderId = $this->isTableHaveOrder($tableId)) {

        // fiyatları güncelle
        $edit = $this->con->exec("update orders set total_amount=(select sum(product_price) from order_products where order_id=$orderId),user_id=$userID where id=$orderId");

        // siparişi pasif yap
        $this->deactive($orderId);

        // tabloyu pasif yap
        $tableCont = new Table();
        $tableCont->deactive($tableId);

        if($edit==0)
            return false;
        return true;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions