Added load receipt functionality.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user