Added load receipt functionality.

This commit is contained in:
2016-08-03 18:24:15 +02:00
parent 707e2dbc0b
commit 9e9e1f6dba
6 changed files with 62 additions and 0 deletions
+17
View File
@@ -129,6 +129,23 @@ void ShopForm::on_loadButton_clicked()
{
ReceiptLoadForm *form = new ReceiptLoadForm(this);
form->setAttribute(Qt::WA_DeleteOnClose);
connect(form, &QDialog::accepted, [this, form](){
ShopService srv;
if (m_voucher.isNull())
{
m_voucher = srv.createVoucher();
}
srv.moveItems(form->selectedItems(), form->selectedVoucher(), this->m_voucher);
m_itemsModel->setData(m_voucher->items());
connectItemSignals();
onCountChanged();
});
form->show();
}