Short answer. Generally no. Article 1718 of the Civil Code denies compensation to a contractor who supplied only labor or skill if the work is destroyed before delivery, unless the owner delayed in receiving it, or the destruction was caused by poor material quality that you had timely reported to the owner.
What the law says
The contractor who has undertaken to put only his work or skill, cannot claim any compensation if the work should be destroyed before its delivery, unless there has been delay in receiving it, or if the destruction was caused by the poor quality of the material, provided this fact was communicated in due time to the owner.
Civil Code, Article 1718 — Loss Where Contractor Furnished Only Labor. Read the full provision →
The general rule: no pay for work destroyed before delivery
Where you supplied only your work or skill, meaning the owner provided the materials, Article 1718's default rule is unfavorable if the work is destroyed before you deliver it: the contractor cannot claim any compensation. Because you did not furnish the materials, the loss of the finished work before turnover generally falls on the owner as a matter of ownership of those materials, but that does not automatically translate into a right for you to be paid for labor already invested in work that no longer exists.
The first exception: delay in receiving the work
Article 1718 carves out an exception where there has been delay in receiving the work. If the work was ready for delivery and the owner delayed in accepting it, and it was destroyed during that period of delay, the general bar on compensation does not apply in the same way; the owner's own delay in taking delivery changes the analysis in the contractor's favor rather than leaving the loss to fall on the contractor's uncompensated labor.
The second exception: poor material quality you reported
The article also excepts destruction caused by the poor quality of the material, provided this fact was communicated in due time to the owner. This means if you warned the owner about a problem with the materials they supplied, and the work was destroyed because of that defect despite your warning, you are not barred from compensation the way you would be for an ordinary loss. Timely communication is essential; the exception protects a contractor who flagged the risk, not one who stayed silent about a known problem.
What happens to the material itself
Article 1718 separately addresses the fortuitous loss of the material itself, as opposed to the finished or partly finished work: if the material is lost through a fortuitous event, the contract is extinguished. This is a related but distinct rule from the compensation question, since it speaks to the survival of the contract as a whole rather than to whether you can be paid for labor already performed on work that was ultimately destroyed.