| | |
| | | FROM ContentVersion |
| | | WHERE ContentDocumentId IN :documentIds |
| | | ]; |
| | | |
| | | |
| | | if (cvInfo.size() > 0) { |
| | | for (Integer i = 0; i < cvInfo.size(); i++) { |
| | | attachmentRecoeds.add(new InvoiceOrderInfo(cvInfo[i])); |
| | |
| | | invoiceHead.Order_ForDealer__c = SecondDealer; |
| | | } |
| | | invoiceHead.Order_ForDealerText__c = coc.Order_ForDealerText__c; |
| | | if(Test.isRunningTest()){ |
| | | invoiceHead.Order_ForHospital__c = null; |
| | | if (Test.isRunningTest()) { |
| | | invoiceHead.Order_ForHospital__c = null; |
| | | } |
| | | insert invoiceHead; |
| | | invoiceId = invoiceHead.Id; |
| | |
| | | invoiceHead.Order_ForDealer__c = SecondDealer; |
| | | } |
| | | invoiceHead.Order_ForDealerText__c = coc.Order_ForDealerText__c; |
| | | if(Test.isRunningTest()){ |
| | | invoiceHead.Order_ForHospital__c = null; |
| | | if (Test.isRunningTest()) { |
| | | invoiceHead.Order_ForHospital__c = null; |
| | | } |
| | | insert invoiceHead; |
| | | System.debug('invoiceHead = ' + invoiceHead); |
| | |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | } |