Commit 96cd8a41 authored by Karamel's avatar Karamel
Browse files

Make sync ignore invisible products for cash registers (like before),

include them without cash register (due to previous commit).
parent cdc75796
......@@ -62,6 +62,7 @@ class SyncAPI implements API {
return new static($app);
}
/** Get all the data, including invisible/disabled entries. */
public function sync() {
$result = new GenericModel();
// Send everything
......@@ -82,6 +83,8 @@ class SyncAPI implements API {
return $result;
}
/** Get all data for a cashregister to operate. This doesn't includes
* invisible/disabled entries. */
public function syncCashRegister($cashRegisterName) {
$result = new GenericModel();
// Look for the cash register, reject if not found.
......@@ -99,7 +102,7 @@ class SyncAPI implements API {
$result->set('roles', $this->roleAPI->getAll());
$result->set('taxes', $this->taxAPI->getAll());
$result->set('categories', $this->categoryAPI->getAll());
$result->set('products', $this->productAPI->getAll());
$result->set('products', $this->productAPI->getAllVisible());
$result->set('tariffareas', $this->tariffAreaAPI->getAll());
$result->set('discounts', $this->discountAPI->getAll());
$result->set('customers', $this->customerAPI->getAll());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment