mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 11:08:28 +00:00
Code for new release.
This commit is contained in:
@@ -43,19 +43,32 @@ export function parseFromEntries(entries, transactionType) {
|
||||
|
||||
// dates
|
||||
current.date = entry.date;
|
||||
current.interest_date = entry.interest_date;
|
||||
current.book_date = entry.book_date;
|
||||
current.process_date = entry.process_date;
|
||||
current.due_date = entry.due_date;
|
||||
current.payment_date = entry.payment_date;
|
||||
current.invoice_date = entry.invoice_date;
|
||||
|
||||
// meta
|
||||
current.budget_id = entry.budget_id;
|
||||
current.category_name = entry.category_name;
|
||||
current.piggy_bank_id = entry.piggy_bank_id;
|
||||
|
||||
// location
|
||||
if (entry.hasLocation) {
|
||||
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;
|
||||
if(typeof entry.foreign_amount !== 'undefined' && '' !== entry.foreign_amount.toString()) {
|
||||
if (typeof entry.foreign_amount !== 'undefined' && '' !== entry.foreign_amount.toString()) {
|
||||
current.foreign_amount = entry.foreign_amount;
|
||||
}
|
||||
if(typeof entry.foreign_amount === 'undefined' || '' === entry.foreign_amount.toString()) {
|
||||
if (typeof entry.foreign_amount === 'undefined' || '' === entry.foreign_amount.toString()) {
|
||||
delete current.foreign_amount;
|
||||
delete current.foreign_currency_code;
|
||||
}
|
||||
|
Reference in New Issue
Block a user