Added sales to people. Print button on Camp wizard is now functional. Added item grids below Camp main grid.
This commit is contained in:
@@ -31,6 +31,9 @@ CampGrid::CampGrid(QWidget *parent) : GridForm<CampData>(parent)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
m_detail = new DetailWidget(this);
|
||||
mainLayout()->addWidget(m_detail);
|
||||
}
|
||||
|
||||
void CampGrid::handleNewRecord()
|
||||
@@ -101,6 +104,12 @@ void CampGrid::doDelete(CampDataPtr entity)
|
||||
|
||||
void CampGrid::addToVoucher(CampDataPtr data)
|
||||
{
|
||||
if (data->onVoucher())
|
||||
{
|
||||
QMessageBox::information(this, tr("Can not pay"), tr("This record is already paid"));
|
||||
return;
|
||||
}
|
||||
|
||||
CampShopItemPtr campItem(new CampShopItem);
|
||||
|
||||
campItem->setId(data->id());
|
||||
@@ -134,3 +143,11 @@ void CampGrid::addToVoucher(CampDataPtr data)
|
||||
shopSrv.eraseVoucher(voucher);
|
||||
});
|
||||
}
|
||||
|
||||
void CampGrid::currentIndexChanged(const QModelIndex ¤t)
|
||||
{
|
||||
if (current.isValid())
|
||||
{
|
||||
m_detail->setData(currentEntity());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user