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:
@@ -18,6 +18,7 @@ class _CrearServicioScreenState extends State<CrearServicioScreen> {
|
||||
String _iconoSeleccionado = 'recibo';
|
||||
Color _colorSeleccionado = Colors.purple;
|
||||
int _diaVencimiento = 15;
|
||||
bool _esRecurrente = false;
|
||||
|
||||
final List<Map<String, dynamic>> _iconos = [
|
||||
{'key': 'electricidad', 'icon': Icons.bolt, 'label': 'Electricidad'},
|
||||
@@ -46,6 +47,7 @@ class _CrearServicioScreenState extends State<CrearServicioScreen> {
|
||||
_iconoSeleccionado = widget.servicio!.icono;
|
||||
_colorSeleccionado = Color(widget.servicio!.color);
|
||||
_diaVencimiento = widget.servicio!.diaVencimiento;
|
||||
_esRecurrente = widget.servicio!.esRecurrente;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +113,13 @@ class _CrearServicioScreenState extends State<CrearServicioScreen> {
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SwitchListTile(
|
||||
title: const Text('Factura recurrente'),
|
||||
subtitle: const Text('Generar automáticamente la siguiente factura al pagar'),
|
||||
value: _esRecurrente,
|
||||
onChanged: (v) => setState(() => _esRecurrente = v),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text('Día de vencimiento', style: Theme.of(context).textTheme.titleSmall),
|
||||
const SizedBox(height: 8),
|
||||
@@ -131,6 +140,7 @@ class _CrearServicioScreenState extends State<CrearServicioScreen> {
|
||||
color: _colorSeleccionado.value,
|
||||
diaVencimiento: _diaVencimiento,
|
||||
fechaCreacion: widget.servicio?.fechaCreacion ?? DateFormat('yyyy-MM-dd').format(DateTime.now()),
|
||||
esRecurrente: _esRecurrente,
|
||||
);
|
||||
if (widget.servicio != null) {
|
||||
await provider.actualizarServicio(servicio);
|
||||
|
||||
Reference in New Issue
Block a user