Logo Search packages:      
Sourcecode: lemonpos-kde4 version File versions  Download package

void lemonView::startOperation (  )  [private, slot]

Slot used to start store operation, gaveta qty is set to 0.

Definition at line 1662 of file lemonview.cpp.

References createNewTransaction(), Gaveta::open(), Gaveta::setAvailableInCash(), Gaveta::setInitialAmount(), Gaveta::setStartDateTime(), and signalStartedOperation().

{
  qDebug()<<"Starting operations...";
  bool ok=false;
  double qty=0.0;
  InputDialog *dlg = new InputDialog(this, false, dialogMoney, i18n("Enter the amount of money to deposit in the drawer"));
  dlg->setEnabled(true);
  if (dlg->exec() ) {
    qty = dlg->dValue;
    ok = true;
  }
  if (ok) {
    if (drawer == 0) drawer = new Gaveta();//FIXME!
    drawer->open();
   // Set drawer amount.
    drawer->setStartDateTime(QDateTime::currentDateTime());
    drawer->setAvailableInCash(qty);
    drawer->setInitialAmount(qty);
    operationStarted = true;
    createNewTransaction(tSell);
  }
  else operationStarted = false;
  emit signalStartedOperation();
}


Generated by  Doxygen 1.6.0   Back to index