}
}
protected void cTableSatisListesiAdetClicked(TableModelEvent evt) {
if (evt.getType() == TableModelEvent.UPDATE) {
UrunSatis guncelUrunSatis = (UrunSatis) cTableSatisListesi
.getEditedObject(evt);
if (guncelUrunSatis == null)
return;
urunSatisSonAdet = guncelUrunSatis.getAdet();
urunStok = (UrunStok) HibernateManager.getInstance()
.getObjectWithUniqueColumn(UrunStok.class, "barkod",
guncelUrunSatis.getBarkod());
if ((urunSatisSonAdet - urunSatisIlkAdet) > urunStok.getAdet()) {
AutoClosingMessageDialog.showAutoClosingMessageDialog(
"Sistemde yeteri kadar ürün bulunmamaktadır.", 2);
guncelUrunSatis.setAdet((int) cTableSatisListesi
.getLastEditedValue());
return;
} else {
urunStok.setAdet(urunStok.getAdet()
- (urunSatisSonAdet - urunSatisIlkAdet));