Facturas recurrentes, edición, padding, y política de privacidad
- Servicio: nuevo campo esRecurrente + migración DB v2 - Al marcar pagada una factura recurrente se genera la siguiente - Editar facturas existentes desde CrearFacturaScreen - Nuevo método actualizarFactura en FacturaProvider - padding inferior en listas de facturas y servicios (último item visible) - Nota de factura visible en subtítulo - Filtro Vencidas corregido - Monto pendiente total visible en dashboard - Botón undo para revertir factura pagada - Configuración de release signing (keystore) - Pantalla de política de privacidad en la app + PRIVACY_POLICY.md
This commit is contained in:
@@ -5,6 +5,7 @@ class Servicio {
|
||||
final int color;
|
||||
final int diaVencimiento;
|
||||
final String fechaCreacion;
|
||||
final bool esRecurrente;
|
||||
|
||||
Servicio({
|
||||
this.id,
|
||||
@@ -13,8 +14,28 @@ class Servicio {
|
||||
required this.color,
|
||||
required this.diaVencimiento,
|
||||
required this.fechaCreacion,
|
||||
this.esRecurrente = false,
|
||||
});
|
||||
|
||||
Servicio copyWith({
|
||||
int? id,
|
||||
String? nombre,
|
||||
String? icono,
|
||||
int? color,
|
||||
int? diaVencimiento,
|
||||
String? fechaCreacion,
|
||||
bool? esRecurrente,
|
||||
}) =>
|
||||
Servicio(
|
||||
id: id ?? this.id,
|
||||
nombre: nombre ?? this.nombre,
|
||||
icono: icono ?? this.icono,
|
||||
color: color ?? this.color,
|
||||
diaVencimiento: diaVencimiento ?? this.diaVencimiento,
|
||||
fechaCreacion: fechaCreacion ?? this.fechaCreacion,
|
||||
esRecurrente: esRecurrente ?? this.esRecurrente,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toMap() => {
|
||||
'id': id,
|
||||
'nombre': nombre,
|
||||
@@ -22,6 +43,7 @@ class Servicio {
|
||||
'color': color,
|
||||
'dia_vencimiento': diaVencimiento,
|
||||
'fecha_creacion': fechaCreacion,
|
||||
'es_recurrente': esRecurrente ? 1 : 0,
|
||||
};
|
||||
|
||||
factory Servicio.fromMap(Map<String, dynamic> map) => Servicio(
|
||||
@@ -31,5 +53,6 @@ class Servicio {
|
||||
color: map['color'] as int,
|
||||
diaVencimiento: map['dia_vencimiento'] as int,
|
||||
fechaCreacion: map['fecha_creacion'] as String,
|
||||
esRecurrente: (map['es_recurrente'] as int? ?? 0) == 1,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user