# Path: pos/models.py
# class ProductInTransaction(models.Model):
# 	"""
# 	model for product in transaction
# 	"""
# 	product = models.ForeignKey(Product)
# 	transaction = models.ForeignKey(Transaction)
# 	quantity = models.PositiveIntegerField(_('Quantity'), default=0, null=True, blank=True)	
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of product in transaction
# 		"""
# 		return "%d" % self.product_id
# 
# class Payment(models.Model):
# 	"""
# 	model for payment 
# 	"""
# 	method = models.ForeignKey(PaymentMethod)
# 	transaction = models.ForeignKey(Transaction)
# 	amount = models.PositiveIntegerField(_('Payment Amount'), default=0, null=True, blank=True)
# 	other_details = models.CharField(max_length=1024, verbose_name=_('Other Details'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of payment 
# 		"""
# 		return "%s" % self.method
# 
# class PaymentMethod(models.Model):
# 	"""
# 	model for payment method
# 	"""
# 	name = models.CharField(max_length=128, verbose_name=_('Payment Method Name'))	
# 	description = models.CharField(max_length=128, verbose_name=_('Payment Desciption'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of 
# 		"""
# 		return "%s" % self.name
# 
# class Transaction(models.Model):
# 	"""
# 	model for transactions
# 	"""
# 	customer = models.ForeignKey(Customer)	
# 	staff = models.ForeignKey(Staff)
# 	product = models.ForeignKey(Product)
# 	# time stamps !
# 	created_at = models.DateTimeField(auto_now_add=True, verbose_name=_('Created at'))
# 
# 	wholesale_price = models.CharField(max_length=128, verbose_name=_('Wholesale Price'))	
# 	retail_price = models.CharField(max_length=128, verbose_name=_('Retail Price'))
# 	other_details = models.CharField(max_length=1024, verbose_name=_('Other Details'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of 
# 		"""
# 		return "%s" % self.product
# 
# class SalesOutlet(models.Model):
# 	"""
# 	model for sales outlet details
# 	"""
# 	title = models.CharField(max_length=128, verbose_name=_('Outlet Name'))
# 	details = models.CharField(max_length=1024, verbose_name=_('Sales Outlet Details'))
# 	created_at = models.DateTimeField(auto_now_add=True, verbose_name=_('Created at'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of sales outlet name
# 		"""
# 		return "%s" % self.title


from django.contrib import admin
from pos.models import ProductInTransaction, Payment, PaymentMethod, Transaction, SalesOutlet


admin.site.register(SalesOutlet)
admin.site.register(ProductInTransaction)
admin.site.register(PaymentMethod)
admin.site.register(Transaction)

class PaymentAdmin(admin.ModelAdmin):

# Path: pos/models.py
# class ProductInTransaction(models.Model):
# 	"""
# 	model for product in transaction
# 	"""
# 	product = models.ForeignKey(Product)
# 	transaction = models.ForeignKey(Transaction)
# 	quantity = models.PositiveIntegerField(_('Quantity'), default=0, null=True, blank=True)	
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of product in transaction
# 		"""
# 		return "%d" % self.product_id
# 
# class Payment(models.Model):
# 	"""
# 	model for payment 
# 	"""
# 	method = models.ForeignKey(PaymentMethod)
# 	transaction = models.ForeignKey(Transaction)
# 	amount = models.PositiveIntegerField(_('Payment Amount'), default=0, null=True, blank=True)
# 	other_details = models.CharField(max_length=1024, verbose_name=_('Other Details'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of payment 
# 		"""
# 		return "%s" % self.method
# 
# class PaymentMethod(models.Model):
# 	"""
# 	model for payment method
# 	"""
# 	name = models.CharField(max_length=128, verbose_name=_('Payment Method Name'))	
# 	description = models.CharField(max_length=128, verbose_name=_('Payment Desciption'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of 
# 		"""
# 		return "%s" % self.name
# 
# class Transaction(models.Model):
# 	"""
# 	model for transactions
# 	"""
# 	customer = models.ForeignKey(Customer)	
# 	staff = models.ForeignKey(Staff)
# 	product = models.ForeignKey(Product)
# 	# time stamps !
# 	created_at = models.DateTimeField(auto_now_add=True, verbose_name=_('Created at'))
# 
# 	wholesale_price = models.CharField(max_length=128, verbose_name=_('Wholesale Price'))	
# 	retail_price = models.CharField(max_length=128, verbose_name=_('Retail Price'))
# 	other_details = models.CharField(max_length=1024, verbose_name=_('Other Details'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of 
# 		"""
# 		return "%s" % self.product
# 
# class SalesOutlet(models.Model):
# 	"""
# 	model for sales outlet details
# 	"""
# 	title = models.CharField(max_length=128, verbose_name=_('Outlet Name'))
# 	details = models.CharField(max_length=1024, verbose_name=_('Sales Outlet Details'))
# 	created_at = models.DateTimeField(auto_now_add=True, verbose_name=_('Created at'))
# 
# 	def __unicode__(self):
# 		"""
# 		function returns unicode representation of sales outlet name
# 		"""
# 		return "%s" % self.title


# Path: pos/admin.py
from django.contrib import admin
from pos.models import ProductInTransaction, Payment, PaymentMethod, Transaction, SalesOutlet



admin.site.register(SalesOutlet)
admin.site.register(ProductInTransaction)
admin.site.register(PaymentMethod)
admin.site.register(Transaction)

class PaymentAdmin(admin.ModelAdmin):

    list_display = ('method', 'transaction', 'amount', 'other_details')