Automatically copy shipping address from billing if none present

This commit is contained in:
Rob Harrington
2017-03-17 11:27:26 +11:00
parent 7d1fc8cbe1
commit 2a3fc8cfec
2 changed files with 12 additions and 3 deletions

View File

@@ -53,6 +53,7 @@ angular.module("admin.standingOrders").controller "StandingOrderController", ($s
delete response.ship_address.id
angular.extend($scope.standingOrder.bill_address, response.bill_address)
angular.extend($scope.standingOrder.ship_address, response.ship_address)
$scope.shipAddressFromBilling() unless response.ship_address.address1?
$scope.shipAddressFromBilling = =>
angular.extend($scope.standingOrder.ship_address, $scope.standingOrder.bill_address)