Commit f2fbc38b authored by Karamel's avatar Karamel
Browse files

Fix the continuous flag for CashSession.

parent 6e5d5403
......@@ -133,6 +133,7 @@ class CashsessionAPI extends APIHelper implements API
$next = new CashSession();
$next->setCashRegister($d->getCashRegister());
$next->setSequence($d->getSequence() + 1);
$next->setContinuous(true); // until proven different by clients
$this->dao->write($next);
}
$this->dao->write($d);
......
......@@ -37,7 +37,7 @@ use \Pasteque\Server\System\DAO\DoctrineModel;
class CashSession extends DoctrineModel
{
protected function getDirectFieldNames() {
return ['sequence', 'openDate', 'closeDate',
return ['sequence', 'continuous', 'openDate', 'closeDate',
'openCash', 'closeCash', 'expectedCash'];
}
protected function getAssociationFields() {
......@@ -81,12 +81,11 @@ class CashSession extends DoctrineModel
/**
* This is a client-side flag to checks when the cash is opened
* if the previous cash signature is still in local cache.
* if the previous cash is still in local cache.
* It is not when the cache was deleted or when switching machine.
* This should not happens frequently and is used to check for the
* "disconnect/delete cache/restart" trick to delete the first tickets
* silently.
* The signature is found on the associated fiscal Z ticket.
* @Column(type="boolean")
*/
protected $continuous = false;
......
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