// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'invoice.model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

Invoice _$InvoiceFromJson(Map<String, dynamic> json) {
  return Invoice()
    ..id = json['id'] as int
    ..company_id = json['company_id'] as int
    ..type = json['type'] as String
    ..from_fiscal_name = json['from_fiscal_name'] as String
    ..from_nif_cif = json['from_nif_cif'] as String
    ..from_fiscal_address = json['from_fiscal_address'] as String
    ..to_fiscal_name = json['to_fiscal_name'] as String
    ..to_nif_cif = json['to_nif_cif'] as String
    ..to_fiscal_address = json['to_fiscal_address'] as String
    ..invoice_prefix = json['invoice_prefix'] as String
    ..invoice_serie = json['invoice_serie'] as String
    ..invoice_number = json['invoice_number'] as int
    ..emitted_date = json['emitted_date'] == null
        ? null
        : DateTime.parse(json['emitted_date'] as String)
    ..due_date = json['due_date'] == null
        ? null
        : DateTime.parse(json['due_date'] as String)
    ..concept = json['concept'] as String
    ..subtotal = double.parse(json["subtotal"].toString())
    ..tax_prcnt = double.parse(json["tax_prcnt"].toString())
    ..tax_amount = double.parse(json["tax_amount"].toString())
    ..total = double.parse(json["total"].toString())
    ..created_at = json['created_at'] == null
        ? null
        : DateTime.parse(json['created_at'] as String)
    ..updated_at = json['updated_at'] == null
        ? null
        : DateTime.parse(json['updated_at'] as String)
    ..official_number = json['official_number'] as String;
}

Map<String, dynamic> _$InvoiceToJson(Invoice instance) => <String, dynamic>{
      'id': instance.id,
      'company_id': instance.company_id,
      'type': instance.type,
      'from_fiscal_name': instance.from_fiscal_name,
      'from_nif_cif': instance.from_nif_cif,
      'from_fiscal_address': instance.from_fiscal_address,
      'to_fiscal_name': instance.to_fiscal_name,
      'to_nif_cif': instance.to_nif_cif,
      'to_fiscal_address': instance.to_fiscal_address,
      'invoice_prefix': instance.invoice_prefix,
      'invoice_serie': instance.invoice_serie,
      'invoice_number': instance.invoice_number,
      'emitted_date': instance.emitted_date?.toIso8601String(),
      'due_date': instance.due_date?.toIso8601String(),
      'concept': instance.concept,
      'subtotal': instance.subtotal,
      'tax_prcnt': instance.tax_prcnt,
      'tax_amount': instance.tax_amount,
      'total': instance.total,
      'created_at': instance.created_at?.toIso8601String(),
      'updated_at': instance.updated_at?.toIso8601String(),
      'official_number': instance.official_number,
    };
