mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-30 22:47:30 -04:00 
			
		
		
		
	bulk actions for purchase orders
This commit is contained in:
		
							parent
							
								
									7d5bf2c794
								
							
						
					
					
						commit
						b705cf0520
					
				| @ -633,11 +633,23 @@ class PurchaseOrderController extends BaseController | ||||
|                 //check query parameter for email_type and set the template else use calculateTemplate
 | ||||
|                 PurchaseOrderEmail::dispatch($purchase_order, $purchase_order->company); | ||||
| 
 | ||||
| 
 | ||||
|                 if (! $bulk) { | ||||
|                     return response()->json(['message' => 'email sent'], 200); | ||||
|                 } | ||||
| 
 | ||||
|             case 'cancel': | ||||
| 
 | ||||
|                 if($purchase_order->status_id <= PurchaseOrder::STATUS_SENT) | ||||
|                 { | ||||
|                     $purchase_order->status_id = PurchaseOrder::STATUS_CANCELLED; | ||||
|                     $purchase_order->save(); | ||||
|                 } | ||||
|                  | ||||
|                 if (! $bulk) { | ||||
|                     return $this->listResponse($purchase_order); | ||||
|                 } | ||||
|                 break; | ||||
| 
 | ||||
|             default: | ||||
|                 return response()->json(['message' => ctrans('texts.action_unavailable', ['action' => $action])], 400); | ||||
|                 break; | ||||
|  | ||||
| @ -51,7 +51,6 @@ class PurchaseOrderService | ||||
| 
 | ||||
|         // //TODO implement design, footer, terms
 | ||||
| 
 | ||||
| 
 | ||||
|         // /* If client currency differs from the company default currency, then insert the client exchange rate on the model.*/
 | ||||
|         // if (!isset($this->purchase_order->exchange_rate) && $this->purchase_order->client->currency()->id != (int)$this->purchase_order->company->settings->currency_id)
 | ||||
|         //     $this->purchase_order->exchange_rate = $this->purchase_order->client->currency()->exchange_rate;
 | ||||
| @ -89,7 +88,6 @@ class PurchaseOrderService | ||||
|         return $this; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public function touchPdf($force = false) | ||||
|     { | ||||
|         try { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user