Atualizando Produtos company
This commit is contained in:
parent
8896d8c7b5
commit
b9b1d34eb1
1 changed files with 8 additions and 8 deletions
16
vendor/model/ProductsCompanies.class.php
vendored
16
vendor/model/ProductsCompanies.class.php
vendored
|
|
@ -121,7 +121,7 @@ class ProductsCompanies
|
|||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select cp.product_company_id,
|
||||
cp.products_id,
|
||||
cp.product_id,
|
||||
cp.company_id,
|
||||
cp.description,
|
||||
p.description as product,
|
||||
|
|
@ -130,7 +130,7 @@ class ProductsCompanies
|
|||
cp.product_value,
|
||||
cp.maturity
|
||||
from products_companies cp
|
||||
left join products p on cp.products_id = p.products_id
|
||||
left join products p on cp.product_id = p.product_id
|
||||
where cp.company_id = :company_id
|
||||
and cp.status = \'A\'';
|
||||
|
||||
|
|
@ -269,7 +269,7 @@ class ProductsCompanies
|
|||
if($this->clientProductId > 0){
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'update products_companies set products_id = :products_id,
|
||||
$this->sql = 'update products_companies set product_id = :product_id,
|
||||
date_contract = :date_contract,
|
||||
date_update = CURRENT_TIMESTAMP,
|
||||
user_id_update = :user_id_update,
|
||||
|
|
@ -284,7 +284,7 @@ class ProductsCompanies
|
|||
/** Consulta SQL */
|
||||
$this->sql = 'insert into products_companies(product_company_id,
|
||||
company_id,
|
||||
products_id,
|
||||
product_id,
|
||||
user_id_create,
|
||||
date_contract,
|
||||
description,
|
||||
|
|
@ -293,7 +293,7 @@ class ProductsCompanies
|
|||
maturity
|
||||
) values (:product_company_id,
|
||||
:company_id,
|
||||
:products_id,
|
||||
:product_id,
|
||||
:user_id_create,
|
||||
:date_contract,
|
||||
:description,
|
||||
|
|
@ -308,7 +308,7 @@ class ProductsCompanies
|
|||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('product_company_id', $this->clientProductId);
|
||||
$this->stmt->bindParam('products_id', $this->productsId);
|
||||
$this->stmt->bindParam('product_id', $this->productsId);
|
||||
$this->stmt->bindParam('date_contract', $this->dateContract);
|
||||
$this->stmt->bindParam('description', $this->description);
|
||||
$this->stmt->bindParam('readjustment', $this->readjustment);
|
||||
|
|
@ -367,14 +367,14 @@ class ProductsCompanies
|
|||
/** Consulta SQL */
|
||||
$this->sql = 'update products_companies set product_value = :product_value
|
||||
where company_id = :company_id
|
||||
and products_id = :products_id';
|
||||
and product_id = :product_id';
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('company_id', $this->clientsId);
|
||||
$this->stmt->bindParam('products_id', $this->productsId);
|
||||
$this->stmt->bindParam('product_id', $this->productsId);
|
||||
$this->stmt->bindParam('product_value', $this->productValue);
|
||||
|
||||
/** Executo o SQL */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue