fix: corrige moneda de Bs./Bolivia a USD/Ecuador en toda la app
Reemplaza todos los NumberFormat con locale en_US y símbolo $ en los 6 screens que mostraban precios. Actualiza mock_data con referencias a Ecuador/Quito/+593 y strings demo de notificaciones. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0c09e10e4d
commit
abe310699d
+27
-27
@@ -12,8 +12,8 @@ class MockData {
|
|||||||
id: 'v1',
|
id: 'v1',
|
||||||
nombre: 'Roberto Vargas',
|
nombre: 'Roberto Vargas',
|
||||||
email: 'admin@telcotronics.com',
|
email: 'admin@telcotronics.com',
|
||||||
telefono: '+591 76123456',
|
telefono: '+593 99 1234567',
|
||||||
zona: 'La Paz – Centro y Zona Sur',
|
zona: 'Quito – Norte y Centro',
|
||||||
avatarInitials: 'RV',
|
avatarInitials: 'RV',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -21,10 +21,10 @@ class MockData {
|
|||||||
static final clientes = [
|
static final clientes = [
|
||||||
const Cliente(
|
const Cliente(
|
||||||
id: 'c1',
|
id: 'c1',
|
||||||
nombre: 'TechZone Bolivia',
|
nombre: 'TechZone',
|
||||||
razonSocial: 'TechZone Bolivia S.R.L.',
|
razonSocial: 'TechZone S.R.L.',
|
||||||
direccion: 'Av. 16 de Julio 1890, El Prado, La Paz',
|
direccion: 'Av. Amazonas N35-17, Quito',
|
||||||
telefono: '+591 22310456',
|
telefono: '+593 2 2310456',
|
||||||
nit: '1023456789',
|
nit: '1023456789',
|
||||||
lat: -16.495,
|
lat: -16.495,
|
||||||
lng: -68.133,
|
lng: -68.133,
|
||||||
@@ -32,10 +32,10 @@ class MockData {
|
|||||||
),
|
),
|
||||||
const Cliente(
|
const Cliente(
|
||||||
id: 'c2',
|
id: 'c2',
|
||||||
nombre: 'InfoSystems La Paz',
|
nombre: 'InfoSystems',
|
||||||
razonSocial: 'InfoSystems Bolivia S.A.',
|
razonSocial: 'InfoSystems S.A.',
|
||||||
direccion: 'Calle Comercio 1245, Piso 3, La Paz',
|
direccion: 'Av. Naciones Unidas E10-44, Quito',
|
||||||
telefono: '+591 22451230',
|
telefono: '+593 2 2451230',
|
||||||
nit: '2034567891',
|
nit: '2034567891',
|
||||||
lat: -16.498,
|
lat: -16.498,
|
||||||
lng: -68.130,
|
lng: -68.130,
|
||||||
@@ -45,8 +45,8 @@ class MockData {
|
|||||||
id: 'c3',
|
id: 'c3',
|
||||||
nombre: 'CyberShop Sopocachi',
|
nombre: 'CyberShop Sopocachi',
|
||||||
razonSocial: 'Miguel Ángel Ramos',
|
razonSocial: 'Miguel Ángel Ramos',
|
||||||
direccion: 'Av. 6 de Agosto 2378, Sopocachi',
|
direccion: 'Av. República 12-30, Guayaquil',
|
||||||
telefono: '+591 71234890',
|
telefono: '+593 9 87654321',
|
||||||
nit: '3045678912',
|
nit: '3045678912',
|
||||||
lat: -16.507,
|
lat: -16.507,
|
||||||
lng: -68.121,
|
lng: -68.121,
|
||||||
@@ -54,10 +54,10 @@ class MockData {
|
|||||||
),
|
),
|
||||||
const Cliente(
|
const Cliente(
|
||||||
id: 'c4',
|
id: 'c4',
|
||||||
nombre: 'Hotel Presidente La Paz',
|
nombre: 'Hotel Presidente',
|
||||||
razonSocial: 'Hoteles Presidente Bolivia S.A.',
|
razonSocial: 'Hoteles Presidente S.A.',
|
||||||
direccion: 'Calle Potosí 920, Centro, La Paz',
|
direccion: 'Calle Bolívar 920, Centro Histórico',
|
||||||
telefono: '+591 22406666',
|
telefono: '+593 2 2406666',
|
||||||
nit: '4056789123',
|
nit: '4056789123',
|
||||||
lat: -16.500,
|
lat: -16.500,
|
||||||
lng: -68.128,
|
lng: -68.128,
|
||||||
@@ -66,9 +66,9 @@ class MockData {
|
|||||||
const Cliente(
|
const Cliente(
|
||||||
id: 'c5',
|
id: 'c5',
|
||||||
nombre: 'Colegio Técnico INFOCAL',
|
nombre: 'Colegio Técnico INFOCAL',
|
||||||
razonSocial: 'INFOCAL La Paz',
|
razonSocial: 'INFOCAL',
|
||||||
direccion: 'Av. Arce 2081, Miraflores, La Paz',
|
direccion: 'Av. Colón 1234, Miraflores',
|
||||||
telefono: '+591 22430012',
|
telefono: '+593 2 2430012',
|
||||||
nit: '5067891234',
|
nit: '5067891234',
|
||||||
lat: -16.514,
|
lat: -16.514,
|
||||||
lng: -68.115,
|
lng: -68.115,
|
||||||
@@ -78,8 +78,8 @@ class MockData {
|
|||||||
id: 'c6',
|
id: 'c6',
|
||||||
nombre: 'DataCenter Andino',
|
nombre: 'DataCenter Andino',
|
||||||
razonSocial: 'Andino Cloud Solutions S.R.L.',
|
razonSocial: 'Andino Cloud Solutions S.R.L.',
|
||||||
direccion: 'Av. Hernando Siles 5635, Obrajes',
|
direccion: 'Av. Shyris 5000, Quito',
|
||||||
telefono: '+591 22782200',
|
telefono: '+593 2 2782200',
|
||||||
nit: '6078912345',
|
nit: '6078912345',
|
||||||
lat: -16.521,
|
lat: -16.521,
|
||||||
lng: -68.118,
|
lng: -68.118,
|
||||||
@@ -89,8 +89,8 @@ class MockData {
|
|||||||
id: 'c7',
|
id: 'c7',
|
||||||
nombre: 'Electrónica Calacoto',
|
nombre: 'Electrónica Calacoto',
|
||||||
razonSocial: 'Electrónica Calacoto S.R.L.',
|
razonSocial: 'Electrónica Calacoto S.R.L.',
|
||||||
direccion: 'Calle 21 de Calacoto 8251, Zona Sur',
|
direccion: 'Calle Urdesa Central 8251',
|
||||||
telefono: '+591 22771890',
|
telefono: '+593 4 2771890',
|
||||||
nit: '7089123456',
|
nit: '7089123456',
|
||||||
lat: -16.531,
|
lat: -16.531,
|
||||||
lng: -68.107,
|
lng: -68.107,
|
||||||
@@ -98,10 +98,10 @@ class MockData {
|
|||||||
),
|
),
|
||||||
const Cliente(
|
const Cliente(
|
||||||
id: 'c8',
|
id: 'c8',
|
||||||
nombre: 'Gobernación Dpto. La Paz',
|
nombre: 'Gobernación de Pichincha',
|
||||||
razonSocial: 'Gobernación del Departamento de La Paz',
|
razonSocial: 'Gobernación de Pichincha',
|
||||||
direccion: 'Av. Mariscal Santa Cruz, Edif. Gobernación',
|
direccion: 'Av. Pichincha, Edif. Gobernación',
|
||||||
telefono: '+591 22204500',
|
telefono: '+593 2 2204500',
|
||||||
nit: '1000000001',
|
nit: '1000000001',
|
||||||
lat: -16.501,
|
lat: -16.501,
|
||||||
lng: -68.134,
|
lng: -68.134,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class _CatalogoScreenState extends State<CatalogoScreen> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final provider = context.watch<AppProvider>();
|
final provider = context.watch<AppProvider>();
|
||||||
final fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
|
|
||||||
final filtrados = provider.productos.where((p) {
|
final filtrados = provider.productos.where((p) {
|
||||||
final matchCat = _categoriaSeleccionada == 'Todos' || p.categoria == _categoriaSeleccionada;
|
final matchCat = _categoriaSeleccionada == 'Todos' || p.categoria == _categoriaSeleccionada;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class _ClienteFormScreenState extends State<ClienteFormScreen> {
|
|||||||
_buildField(
|
_buildField(
|
||||||
controller: _telefonoCtrl,
|
controller: _telefonoCtrl,
|
||||||
label: 'Teléfono / Celular *',
|
label: 'Teléfono / Celular *',
|
||||||
hint: 'Ej. +591 70000000',
|
hint: 'Ej. +593 99 0000000',
|
||||||
icon: Icons.phone_outlined,
|
icon: Icons.phone_outlined,
|
||||||
keyboardType: TextInputType.phone,
|
keyboardType: TextInputType.phone,
|
||||||
validator: _required,
|
validator: _required,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class _FirmaScreenState extends State<FirmaScreen> {
|
|||||||
bool _firmado = false;
|
bool _firmado = false;
|
||||||
bool _guardando = false;
|
bool _guardando = false;
|
||||||
|
|
||||||
final _fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final _fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class HomeScreen extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final provider = context.watch<AppProvider>();
|
final provider = context.watch<AppProvider>();
|
||||||
final notifService = context.watch<NotificationService>();
|
final notifService = context.watch<NotificationService>();
|
||||||
final fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppTheme.bgColor,
|
backgroundColor: AppTheme.bgColor,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class PedidoDetailScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final provider = context.read<AppProvider>();
|
final provider = context.read<AppProvider>();
|
||||||
final fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
final estadoColor = AppTheme.estadoColor(pedido.estado.label);
|
final estadoColor = AppTheme.estadoColor(pedido.estado.label);
|
||||||
final dateStr = DateFormat('d \'de\' MMMM yyyy, HH:mm', 'es').format(pedido.fecha);
|
final dateStr = DateFormat('d \'de\' MMMM yyyy, HH:mm', 'es').format(pedido.fecha);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class _PedidoFormScreenState extends State<PedidoFormScreen> {
|
|||||||
String _productoQuery = '';
|
String _productoQuery = '';
|
||||||
bool _showSearch = false;
|
bool _showSearch = false;
|
||||||
|
|
||||||
final _fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final _fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class PedidosScreen extends StatefulWidget {
|
|||||||
|
|
||||||
class _PedidosScreenState extends State<PedidosScreen> with SingleTickerProviderStateMixin {
|
class _PedidosScreenState extends State<PedidosScreen> with SingleTickerProviderStateMixin {
|
||||||
late TabController _tab;
|
late TabController _tab;
|
||||||
final _fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final _fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class PerfilScreen extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final provider = context.watch<AppProvider>();
|
final provider = context.watch<AppProvider>();
|
||||||
final vendedor = provider.vendedor;
|
final vendedor = provider.vendedor;
|
||||||
final fmt = NumberFormat.currency(locale: 'es_BO', symbol: 'Bs.', decimalDigits: 2);
|
final fmt = NumberFormat.currency(locale: 'en_US', symbol: '\$', decimalDigits: 2);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppTheme.bgColor,
|
backgroundColor: AppTheme.bgColor,
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class NotificationService extends ChangeNotifier {
|
|||||||
id: '${base}_1',
|
id: '${base}_1',
|
||||||
tipo: TipoNotificacion.paradaProxima,
|
tipo: TipoNotificacion.paradaProxima,
|
||||||
titulo: 'Próxima parada en 15 min',
|
titulo: 'Próxima parada en 15 min',
|
||||||
cuerpo: 'InfoSystems La Paz — Av. Mariscal Santa Cruz 1250',
|
cuerpo: 'InfoSystems — Av. Naciones Unidas, Quito',
|
||||||
fecha: DateTime.now(),
|
fecha: DateTime.now(),
|
||||||
),
|
),
|
||||||
Notificacion(
|
Notificacion(
|
||||||
@@ -103,21 +103,21 @@ class NotificationService extends ChangeNotifier {
|
|||||||
id: '${base}_3',
|
id: '${base}_3',
|
||||||
tipo: TipoNotificacion.pedidoConfirmado,
|
tipo: TipoNotificacion.pedidoConfirmado,
|
||||||
titulo: 'Pedido confirmado',
|
titulo: 'Pedido confirmado',
|
||||||
cuerpo: 'TTC-0047 firmado por TechZone Bolivia — Bs. 24,500.00',
|
cuerpo: 'TTC-0047 firmado por TechZone — \$24,500.00',
|
||||||
fecha: DateTime.now(),
|
fecha: DateTime.now(),
|
||||||
),
|
),
|
||||||
Notificacion(
|
Notificacion(
|
||||||
id: '${base}_4',
|
id: '${base}_4',
|
||||||
tipo: TipoNotificacion.metaVentas,
|
tipo: TipoNotificacion.metaVentas,
|
||||||
titulo: '¡Meta del día alcanzada!',
|
titulo: '¡Meta del día alcanzada!',
|
||||||
cuerpo: 'Superaste Bs. 15,000 en ventas. ¡Excelente trabajo, Roberto!',
|
cuerpo: 'Superaste \$15,000 en ventas. ¡Excelente trabajo!',
|
||||||
fecha: DateTime.now(),
|
fecha: DateTime.now(),
|
||||||
),
|
),
|
||||||
Notificacion(
|
Notificacion(
|
||||||
id: '${base}_5',
|
id: '${base}_5',
|
||||||
tipo: TipoNotificacion.recordatorio,
|
tipo: TipoNotificacion.recordatorio,
|
||||||
titulo: 'Recordatorio de visita',
|
titulo: 'Recordatorio de visita',
|
||||||
cuerpo: 'Gobernación La Paz — contrato de renovación anual pendiente',
|
cuerpo: 'Gobernación de Pichincha — contrato de renovación anual pendiente',
|
||||||
fecha: DateTime.now(),
|
fecha: DateTime.now(),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user