Index: src/register/ledger-core/split-register-model-save.c
===================================================================
--- src/register/ledger-core/split-register-model-save.c	(Revision 22597)
+++ src/register/ledger-core/split-register-model-save.c	(Arbeitskopie)
@@ -42,6 +42,7 @@
     Split *split;
 
     gboolean handled_dc; /* We have already handled the debit/credit cells. */
+    gboolean handled_baln; /* We have already handled the balance cells. */
     gboolean do_scrub;   /* Scrub other split at the end. */
     gboolean reg_expanded; /* Register is in expanded (split) mode */
 };
@@ -359,6 +360,37 @@
     return new_amount;
 }
 
+gnc_numeric
+gnc_split_register_balance_cell_value (SplitRegister *reg)
+{
+    PriceCell *cell;
+    gnc_numeric balance;
+
+    cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout,
+            BALN_CELL);
+    balance = gnc_price_cell_get_value (cell);
+
+    return balance;
+}
+
+gnc_numeric
+gnc_split_register_old_balance (SplitRegister *reg, Split *split)
+{
+    gnc_numeric balance;
+    Split *blank_split;
+    
+    blank_split = gnc_split_register_get_blank_split(reg);
+
+    if (split == blank_split) {
+    	Account *acc = xaccSplitGetAccount (split);
+	balance = xaccAccountGetBalance (acc);
+    } else {
+    	balance = xaccSplitGetBalance (split);
+    }
+
+    return balance;
+}
+
 static gnc_numeric
 gnc_split_register_get_rate_cell (SplitRegister *reg, const char *cell_name)
 {
@@ -387,10 +419,17 @@
 {
     Account *acc;
     gnc_numeric new_amount, convrate, amtconv, value;
+    gnc_numeric debcred_amount, old_balance, new_balance, balance_diff;
     gnc_commodity *curr, *reg_com, *xfer_com;
     Account *xfer_acc;
 
-    new_amount = gnc_split_register_debcred_cell_value (reg);
+    debcred_amount = gnc_split_register_debcred_cell_value (reg);
+
+    old_balance = gnc_split_register_old_balance(reg, sd->split);
+    new_balance = gnc_split_register_balance_cell_value (reg);
+    balance_diff = gnc_numeric_sub(new_balance, old_balance, GNC_DENOM_AUTO, GNC_HOW_DENOM_REDUCE| GNC_HOW_RND_NEVER);
+    new_amount = gnc_numeric_add(debcred_amount, balance_diff, GNC_DENOM_AUTO, GNC_HOW_DENOM_REDUCE| GNC_HOW_RND_NEVER);
+
     acc = gnc_split_register_get_default_account (reg);
 
     xfer_acc = xaccSplitGetAccount (sd->split);
@@ -514,6 +553,25 @@
 }
 
 static void
+gnc_split_register_save_balance_cell (BasicCell * bcell,
+                                      gpointer save_data,
+                                      gpointer user_data)
+{
+    SRSaveData *sd = save_data;
+    SplitRegister *reg = user_data;
+
+    g_return_if_fail (gnc_basic_cell_has_name (bcell, BALN_CELL));
+
+    if (sd->handled_baln)
+        return;
+
+    gnc_split_register_save_amount_values (sd, reg);
+
+    sd->handled_baln = TRUE;
+    sd->do_scrub = TRUE;
+}
+
+static void
 gnc_split_register_save_rate_cell (BasicCell * bcell,
                                    gpointer save_data,
                                    gpointer user_data)
@@ -839,6 +897,10 @@
                                       CRED_CELL);
 
     gnc_table_model_set_save_handler (model,
+                                      gnc_split_register_save_balance_cell,
+                                      BALN_CELL);
+
+    gnc_table_model_set_save_handler (model,
                                       gnc_split_register_save_rate_cell,
                                       RATE_CELL);
 
Index: src/register/ledger-core/split-register-p.h
===================================================================
--- src/register/ledger-core/split-register-p.h	(Revision 22597)
+++ src/register/ledger-core/split-register-p.h	(Arbeitskopie)
@@ -180,6 +180,10 @@
 
 gnc_numeric gnc_split_register_debcred_cell_value (SplitRegister *reg);
 
+gnc_numeric gnc_split_register_balance_cell_value (SplitRegister *reg);
+
+gnc_numeric gnc_split_register_old_balance (SplitRegister *reg, Split *split);
+
 /* Determine if we need to perform any conversion on the splits in this
  * transaction, and if so, what conversion we need
  */
Index: src/register/ledger-core/split-register-model.c
===================================================================
--- src/register/ledger-core/split-register-model.c	(Revision 22597)
+++ src/register/ledger-core/split-register-model.c	(Arbeitskopie)
@@ -1870,6 +1870,24 @@
 }
 
 static CellIOFlags
+gnc_split_register_get_baln_io_flags (VirtualLocation virt_loc,
+        gpointer user_data)
+{
+    SplitRegister *reg = user_data;
+    Split *split;
+
+    if (gnc_split_register_cursor_is_readonly (virt_loc, user_data))
+        return XACC_CELL_ALLOW_READ_ONLY;
+
+    split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);
+
+    if (g_strcmp0 ("stock-split", xaccSplitGetType (split)) == 0)
+        return XACC_CELL_ALLOW_NONE;
+
+    return XACC_CELL_ALLOW_ALL;
+}
+
+static CellIOFlags
 gnc_split_register_get_security_io_flags (VirtualLocation virt_loc,
         gpointer user_data)
 {
@@ -2507,6 +2525,9 @@
         model, gnc_split_register_get_debcred_io_flags, DEBT_CELL);
 
     gnc_table_model_set_io_flags_handler(
+        model, gnc_split_register_get_baln_io_flags, BALN_CELL);
+
+    gnc_table_model_set_io_flags_handler(
         model, gnc_split_register_get_recn_io_flags, RECN_CELL);
 
     gnc_table_model_set_io_flags_handler(
