New: - Removed the connection between tables 'receipt_item' and 'item'. Instead the position on the receipt will be stored as a primary key with the receipt.id. - Uploading a receipt and checking items for invoice is now working. - Uploading a receipt now redirects directly to the form where the items on the receipt can be marked for invoice. - Added pagination for candidates-page. Refactoring: - Added _rencer_field_errors.html for centralized error display. - Added edeka_parser.py for better management of different parsers. Known Bugs: - Uploading a receipt without any fields results in an error. Todo: - Generate a general form if no fields are recognized on the uploaded receipt. - Create form where Admin can confirm receipt invoices. - Display Notification for admin when users upload receipt. - Display Notification for admin on new candidate.
15 lines
337 B
Python
15 lines
337 B
Python
from src import ma
|
|
from ..receipt_item import ReceiptItem
|
|
from .item import ItemSchema
|
|
from .receipt import ReceiptSchema
|
|
|
|
|
|
class ReceiptItemSchema(ma.SQLAlchemySchema):
|
|
class Meta:
|
|
model = ReceiptItem
|
|
include_fk = True
|
|
|
|
Receipt = ma.Nested(ReceiptSchema)
|
|
price = ma.auto_field()
|
|
amount = ma.auto_field()
|