Guest User

Untitled

a guest
Jan 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. $http.get('config/get/getOrders.php', {cache: true}).then(function(response){
  2. $scope.orders = response.data.orders.order;
  3. $scope.orders.map( function addPlace(item) {
  4. item.firstname = $scope.customers.reduce(function(a,customers){
  5. return item.id_customer === customers.id ? customers.firstname : a;
  6. }, '');
  7. return item;
  8. });
  9. });
  10.  
  11. $http.get('config/get/getProducts.php', {cache: true}).then(function(response){
  12. $scope.products = response.data.products.product;
  13. $scope.products.map( function addPlace(item) {
  14. item.eanCombination = $scope.productCombinations.reduce(function(a, productCombinations, stock_availables){
  15. return item.id === stock_availables.id + stock_availables.id === stock_availables.id_product_attribute + stock_availables.id_product_attribute === productCombinations.id ? productCombinations.ean13: a;
  16. }, '');
  17. return item;
  18. });
  19. });
Add Comment
Please, Sign In to add comment