+Archive *da_archive_init_from_transaction(Archive *arc, Transaction *txn)
+{
+ //fill it
+ arc->amount = txn->amount;
+ arc->kacc = txn->kacc;
+ arc->kxferacc = txn->kxferacc;
+ arc->paymode = txn->paymode;
+ arc->flags = txn->flags & (OF_INCOME);
+ arc->status = txn->status;
+ arc->kpay = txn->kpay;
+ arc->kcat = txn->kcat;
+ if(txn->wording != NULL)
+ arc->wording = g_strdup(txn->wording);
+ else
+ arc->wording = g_strdup(_("(new archive)"));
+
+ if( da_splits_clone(txn->splits, arc->splits) > 0)
+ arc->flags |= OF_SPLIT; //Flag that Splits are active
+
+ return arc;
+}
+
+
+
+