Expand new transaction form.

This commit is contained in:
James Cole
2024-01-03 17:43:05 +01:00
parent e6fe08dd61
commit 211526c032
10 changed files with 262 additions and 100 deletions

View File

@@ -55,14 +55,24 @@ export function parseFromEntries(entries, transactionType) {
current.category_name = entry.category_name;
current.piggy_bank_id = entry.piggy_bank_id;
current.bill_id = entry.bill_id;
current.tags = entry.tags;
current.notes = entry.notes;
// more meta
current.internal_reference = entry.internal_reference;
current.external_url = entry.external_url;
// location
current.store_location = false;
if (entry.hasLocation) {
current.store_location = true;
current.longitude = entry.longitude.toString();
current.latitude = entry.latitude.toString();
current.zoom_level = entry.zoomLevel;
}
// if foreign amount currency code is set:
if (typeof entry.foreign_currency_code !== 'undefined' && '' !== entry.foreign_currency_code.toString()) {
current.foreign_currency_code = entry.foreign_currency_code;