class InvoiceLineSerializer(serializers.ModelSerializer): expense = ExpenseLineComponentSerializer(many=False) product = ProductLineComponentSerializer(many=False) service = ServiceLineComponentSerializer(many=False) tax = TaxSerializer(many=False) class Meta: model = InvoiceLine fields = "__all__"
class ProductComponentSerializer(serializers.ModelSerializer): tax = TaxSerializer(many=False) class Meta: model = ProductComponent fields = "__all__"
class ConfigSerializer(serializers.ModelSerializer): sales_tax = TaxSerializer(many=False) class Meta: model = SalesConfig fields = "__all__"