public function getMake($invoice_id)
 {
     $accountCategories = new AccountCategory();
     $accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown();
     $purchaseDetails = new PurchaseInvoiceDetail();
     $transactions = new Transaction();
     $purchaseDetailsAmount = $purchaseDetails->getTotalAmount($invoice_id);
     $transactionsPaid = $transactions->getTotalPaidPurchase($invoice_id);
     $due = $purchaseDetails->getPurchasedue($invoice_id);
     $purchaseDetailsBranch = PurchaseInvoiceDetail::where('detail_invoice_id', '=', $invoice_id)->first();
     return view('PurchaseInvoice.paymentAdd', compact('accountCategoriesAll', 'due'))->with('purchaseDetailsAmount', $purchaseDetailsAmount)->with('invoice_id', $invoice_id)->with('purchaseDetailsBranch', $purchaseDetailsBranch->branch_id)->with('transactionsPaid', $transactionsPaid);
 }
 public function getMake($invoice_id)
 {
     $accountCategories = new AccountCategory();
     $accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown();
     $purchaseDetails = new PurchaseInvoiceDetail();
     $transactions = new Transaction();
     $purchaseDetailsAmount = $purchaseDetails->getTotalAmount($invoice_id);
     $transactionsPaid = $transactions->getTotalPaidPurchase($invoice_id);
     return view('PurchaseInvoice.paymentAdd', compact('accountCategoriesAll'))->with('purchaseDetailsAmount', $purchaseDetailsAmount)->with('transactionsPaid', $transactionsPaid);
 }