changed amount to salaryAmount

This commit was merged in pull request #28.
This commit is contained in:
Chinenye Nmoh
2025-06-20 13:49:10 +01:00
parent bcd9513a10
commit 79b22e6d4f
4 changed files with 16 additions and 18 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ class Salary(db.Model):
'id': self.id,
'customerId': self.customer_id,
'accountId' : self.account_id,
'amount': self.amount,
'salaryAmount': self.amount,
'status': self.status,
'createdAt': self.created_at.isoformat() if self.created_at else None,
'updatedAt': self.updated_at.isoformat() if self.updated_at else None,
@@ -45,7 +45,7 @@ class Salary(db.Model):
try:
new_data = cls(
customer_id=data.get('customerId'),
amount=data.get('amount', 0.0),
amount=data.get('salaryAmount', 0.0),
status='START',
salary_date = datetime.strptime(data.get('salaryDate'), "%Y-%m-%d").date() if data.get('salaryDate') else None,
account_id=data.get('accountId')