feat(sales): local sales/purchase ledger (any currency)
A sale is a distinct model from a gift or a Plantare (reproduction
commitment): a recorded seed sale or purchase with an optional price in
ANY currency — €, Ğ1, time, or none yet. Mirrors the Plantare feature.
- schema v10: Sales table (SyncColumns), guarded createTable migration,
schema dump + generated schema_v10 for the migration round-trip test
- enum SaleDirection { iSold, iBought }
- VarietyRepository: create/watch/watchForVariety/delete + backup
export/exportForSync/import (LWW-by-HLC, tombstones)
- InventorySnapshot.sales + JSON codec encode/decode (round-trips amount,
currency, counterparty)
- UI: SalesScreen (/sales), sale sheet, drawer entry, variety-detail
action beside 'add Plantare'; money hides a trailing .0
- i18n sale block + menu.sales in en/es/pt/ast
- tests: sales repo test (5) incl. Ğ1/price-less/backup round-trip;
Sales screen added to the small-screen overflow guard
Also harden the overflow guard: swallow the headless engine's image
resource service PNG-decode errors (unrelated to layout) while still
failing on real RenderFlex overflows, so home/about stop reporting
false failures.
This commit is contained in:
parent
de6938d5d7
commit
6de039d518
27 changed files with 6156 additions and 23 deletions
|
|
@ -78,6 +78,7 @@ class TranslationsAst extends Translations with BaseTranslations<AppLocale, Tran
|
|||
@override late final _Translations$wot$ast wot = _Translations$wot$ast._(_root);
|
||||
@override late final _Translations$notifications$ast notifications = _Translations$notifications$ast._(_root);
|
||||
@override late final _Translations$plantare$ast plantare = _Translations$plantare$ast._(_root);
|
||||
@override late final _Translations$sale$ast sale = _Translations$sale$ast._(_root);
|
||||
}
|
||||
|
||||
// Path: app
|
||||
|
|
@ -159,6 +160,7 @@ class _Translations$menu$ast extends Translations$menu$en {
|
|||
@override String get wishlist => 'Llista de deseos';
|
||||
@override String get following => 'Siguiendo';
|
||||
@override String get plantares => 'Plantares';
|
||||
@override String get sales => 'Ventes';
|
||||
@override String get settings => 'Axustes';
|
||||
}
|
||||
|
||||
|
|
@ -839,6 +841,31 @@ class _Translations$plantare$ast extends Translations$plantare$en {
|
|||
@override String get removeConfirm => '¿Quitar esti compromisu?';
|
||||
}
|
||||
|
||||
// Path: sale
|
||||
class _Translations$sale$ast extends Translations$sale$en {
|
||||
_Translations$sale$ast._(TranslationsAst root) : this._root = root, super.internal(root);
|
||||
|
||||
final TranslationsAst _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Ventes';
|
||||
@override String get help => 'Rexistra semilla vendida o mercada — dineru, Ğ1 o cualquier moneda. Un modelu aparte del regalu y del Plantare. Enxamás se cobra comisión poles semilles.';
|
||||
@override String get add => 'Rexistrar venta';
|
||||
@override String get empty => 'Entá nun hai ventes. Anota equí lo que vendes o merques.';
|
||||
@override String get iSold => 'Vendí';
|
||||
@override String get iBought => 'Mercué';
|
||||
@override String get direction => '¿Vendes o merques?';
|
||||
@override String get counterparty => '¿Con quién?';
|
||||
@override String get counterpartyHint => 'Una persona o un coleutivu (opcional)';
|
||||
@override String get amount => 'Importe';
|
||||
@override String get currency => 'Moneda';
|
||||
@override String get currencyHint => '€, Ğ1, hores… (opcional)';
|
||||
@override String get note => 'Nota (opcional)';
|
||||
@override String get save => 'Guardar';
|
||||
@override String get delete => 'Quitar';
|
||||
@override String get removeConfirm => '¿Quitar esta venta?';
|
||||
}
|
||||
|
||||
// Path: intro.slides
|
||||
class _Translations$intro$slides$ast extends Translations$intro$slides$en {
|
||||
_Translations$intro$slides$ast._(TranslationsAst root) : this._root = root, super.internal(root);
|
||||
|
|
@ -1207,6 +1234,7 @@ extension on TranslationsAst {
|
|||
'menu.wishlist' => 'Llista de deseos',
|
||||
'menu.following' => 'Siguiendo',
|
||||
'menu.plantares' => 'Plantares',
|
||||
'menu.sales' => 'Ventes',
|
||||
'menu.settings' => 'Axustes',
|
||||
'settings.language' => 'Llingua',
|
||||
'settings.systemLanguage' => 'Llingua del sistema',
|
||||
|
|
@ -1619,6 +1647,22 @@ extension on TranslationsAst {
|
|||
'plantare.openSection' => 'Pendientes',
|
||||
'plantare.settledSection' => 'Fechos',
|
||||
'plantare.removeConfirm' => '¿Quitar esti compromisu?',
|
||||
'sale.title' => 'Ventes',
|
||||
'sale.help' => 'Rexistra semilla vendida o mercada — dineru, Ğ1 o cualquier moneda. Un modelu aparte del regalu y del Plantare. Enxamás se cobra comisión poles semilles.',
|
||||
'sale.add' => 'Rexistrar venta',
|
||||
'sale.empty' => 'Entá nun hai ventes. Anota equí lo que vendes o merques.',
|
||||
'sale.iSold' => 'Vendí',
|
||||
'sale.iBought' => 'Mercué',
|
||||
'sale.direction' => '¿Vendes o merques?',
|
||||
'sale.counterparty' => '¿Con quién?',
|
||||
'sale.counterpartyHint' => 'Una persona o un coleutivu (opcional)',
|
||||
'sale.amount' => 'Importe',
|
||||
'sale.currency' => 'Moneda',
|
||||
'sale.currencyHint' => '€, Ğ1, hores… (opcional)',
|
||||
'sale.note' => 'Nota (opcional)',
|
||||
'sale.save' => 'Guardar',
|
||||
'sale.delete' => 'Quitar',
|
||||
'sale.removeConfirm' => '¿Quitar esta venta?',
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue