Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pasteque
pasteque-server
Commits
96cd8a41
Commit
96cd8a41
authored
May 31, 2018
by
Karamel
Browse files
Make sync ignore invisible products for cash registers (like before),
include them without cash register (due to previous commit).
parent
cdc75796
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/API/SyncAPI.php
View file @
96cd8a41
...
...
@@ -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
->
getAll
Visible
());
$result
->
set
(
'tariffareas'
,
$this
->
tariffAreaAPI
->
getAll
());
$result
->
set
(
'discounts'
,
$this
->
discountAPI
->
getAll
());
$result
->
set
(
'customers'
,
$this
->
customerAPI
->
getAll
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment